Tabli - Data Fill (with generated data)
About
The Tabli data fill command from the table module insert generated data into a content resource (file, sql table).
Syntax
tabli data fill --help
Tabli data fill
===============
Load generated data into data resources.
You select the data resources to be filled with:
* the data selector argument (`target-selector...`)
* and optionally the dependency option (`--with-dependencies`)
For more control on the data generated, you can add the data resource generators (`*--datagen.yml`)
by selecting them with the generator selector option (--generator-selector)
This is an alias to the `transfer` command where:
* the targets are the selected data resources
* the sources are generated from the generator data resources and/of target metadatas
The default transfer operation is `upsert`.
Examples
--------
1 - To load the table `D_TIME` from the connection `sqlite` with auto-generated data:
tabli data fill D_TIME@sqlite
2 - To load the table `D_TIME` with the data generation file `D_TIME--datagen.yml` present in the current directory:
tabli data fill --generator-selector D_TIME D_TIME@connection
3 - To load all data in the whole schema with the data generation file in the dir directory:
tabli data fill --generator-selector dir/* *@connection
4 - Load auto generated data into the table F_SALES and its dependencies
tabli data fill--with-dependencies F_SALES@sqlite
Syntax
------
tabli data fill [options|flags] <target-selector...>
where:
Arguments:
<target-selector...> One or more data selectors that will select the target data resources to be filled.
Cross Data Transfer Options:
-bs,--buffer-size <bufferSize> defines the size of the memory buffer between the source and target threads
-mdu,--metrics-data-uri <metricsDataUri> defines a target data uri where the data metrics should be exported
-sfs,--source-fetch-size <fetchSize> defines the fetch size against the source connection
-tbs,--target-batch-size <batchSize> defines the batch size against the target data resource
-tcf,--target-commit-frequency <commitFrequency> defines the commit frequency in number of batches against the target data resource
-tw,--target-worker <targetWorkerCount> defines the target number of thread against the target connection
-wbv,--with-bind-variables defines if bind variables are used in the SQL statement
Fill Options:
-gs,--generator-selector <generatorSelector...> One or more data selector that selects one or more data resource generator ( --datagen.yml )
-mrc,--max-record-count <maxRecordCount> This option defines the maximum total number of record that the data resource(s) must have when no data resource generator was found.
Data Definition Options:
-ta,--target-attribute <attributeName=value> Set a target data resource attribute
Transfer Operation Options:
-to,--target-operation <targetDataOperation> defines the data operations (replace, truncate) on the existing target before transfer.
-op,--transfer-operation <transferOperation> defines the transfer operation (insert, update, delete, upsert, merge, move, copy). Default to `copy` for a file system and `insert` for a database.
Selection Options:
-wd,--with-dependencies If this flag is present, the dependencies of the selected target tables (ie parent/foreign tables) will be also be filled with data
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