Tabli - Data Query Command

Undraw Windows

About

data query is a command that permits you to execute query in batch and create a benchmark workload against a system.

Syntax

tabli data query --help
Tabli data query
================

The query command allows performance test.

This command will execute one or multiple queries, fetch the data (ie get the data locally) and returns the performance metrics

A query is an executable statement that returns data.
In Sql, if the statement is a `select` statement it will be executed, otherwise the query will be created for a table or a view.
This means that you can also use this command to measure the fetch of data on your network.


Note: If you want to:
  * show the data result of a query execution, the `print`, `head`, `tail` command is recommended
  * transfer/load the result of a query, you should use the `transfer` command
  * shows the structure of a query, you should use the `struct` command



Examples
--------

 1 - Execute all the queries written in the sql files that begins with `dim` in the current directory (ie `local` connection)


        tabli data query (dim*.sql@local)@sqlite


 2 - Execute the query written in the file `Query1.sql` against the `sqlite` connection and execute the query written in the file `Query2.sql` against the `oracle` connection


        tabli data query (Query1.sql)@sqlite (Query2.sql)@oracle


 3 - Execute all sql files present in the local directory `project/withQueries` against the `postgres` data store and store the result in the `perf` table.


        tabli data query --output-data-uri perf@postgres (project/withQueries/*.sql)@postgres




Syntax
------


    tabli data query <data-selector...>


where:


  Arguments:

    <data-selector...>                                      One or several data selectors that selects data resource (query, view, table)


  Global Options:

    -cf,--conf <path>                                       The path to a configuration file

    -cv,--connection-vault <path>                           The path where the connection vault is located

    -h,--help                                               Print this help

    -l,--log-level <error|warning|tip|info|fine>            Set the log level

    -ns,--not-strict                                        A minor error will not stop the process.

    -odu,--output-data-uri <outputDataUri>                  defines the output data uri for the feedback data (default: console)

    -oo,--output-operation <dataOperation>                  defines the data operations (replace, truncate) on an existing output resource before transfer.

    -oop,--output-transfer-operation <transferOperation>    defines the output transfer operation (insert, update, merge, copy). Default to `copy` for a file system and `insert` for a database.

    -pp,--passphrase <passphrase>                           A passphrase (master password) to decrypt the encrypted values

Task Runner