====== Tabli - Data Fill (with generated data) ====== ===== About ===== The [[..:tabli|Tabli]] ''data fill'' [[docs:tabli:command|command]] from the [[start|table module]] insert [[docs:generator:generator|generated]] data into a [[docs:resource:content|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] where: Arguments: One or more data selectors that will select the target data resources to be filled. Cross Data Transfer Options: -bs,--buffer-size defines the size of the memory buffer between the source and target threads -mdu,--metrics-data-uri defines a target data uri where the data metrics should be exported -sfs,--source-fetch-size defines the fetch size against the source connection -tbs,--target-batch-size defines the batch size against the target data resource -tcf,--target-commit-frequency defines the commit frequency in number of batches against the target data resource -tw,--target-worker 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 One or more data selector that selects one or more data resource generator ( --datagen.yml ) -mrc,--max-record-count 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 Set a target data resource attribute Transfer Operation Options: -to,--target-operation defines the data operations (replace, truncate) on the existing target before transfer. -op,--transfer-operation 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 The path to a configuration file -cv,--connection-vault The path where the connection vault is located -h,--help Print this help -l,--log-level Set the log level -ns,--not-strict A minor error will not stop the process. -odu,--output-data-uri defines the output data uri for the feedback data (default: console) -oo,--output-operation defines the data operations (replace, truncate) on an existing output resource before transfer. -oop,--output-transfer-operation defines the output transfer operation (insert, update, merge, copy). Default to `copy` for a file system and `insert` for a database. -pp,--passphrase A passphrase (master password) to decrypt the encrypted values