====== Tabli - Data Create command ====== ===== About ===== ''data create'' is a [[docs:tabli:command|command]] of the [[start|data operations module]] that creates one or more [[docs:resource:resource|data resources]]. (ie creates an empty data resource and its [[docs:resource:metadata|metadata]]) If the [[docs:flow:target|target data resource]] is: * specified, the [[docs:resource:metadata|metadata definition]] of the [[docs:op:select|selected data resources]] will be copied * not specified, * if the [[docs:resource:data_selector|data selector]] is a [[docs:resource:script_selector|script selector]], the [[docs:resource:script|script]] (DDL, ..) will be executed * otherwise the ''data resource'' specified by the ''data selector'' will be created. * This command does not create any data. It creates only the [[docs:resource:metadata|metadata]]. * By default, a [[transfer|transfer command]] will create the [[docs:flow:target|target data resource]] from the source if it does not exist * The [[template|template command]] can also create data resources. ===== Syntax ===== tabli data create --help Tabli data create ================= Create a data resource(s) (table, file, ..) from: * the metadata of another data resource * a script (DDL) If the `target uri` is: * not specified, if the `data selector` is: * a script selector, the selected resources will be executed * otherwise, a data resource will be created (with the `data selector` as `data uri`) * specified, the metadata of the selected resources will copied Syntax ------ tabli data create [options|flags] where: Arguments: A data selectors that select one or more data resources (Example: `*--datadef.yml@connection`) A target data Uri that defines the connection and optionally the table name. If the target is not specified, the selected data resource must be scripts and will just run. Data Definition Options: -sa,--source-attribute Set a source data resource attribute -ta,--target-attribute Set a target data resource attribute Selection Options: -wd,--with-dependencies Create also the table dependencies (ie the foreign data resources will also be created). 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