Tabli - Truncate data command

Undraw Windows

About

The data truncate command of the data module permits to truncate one or more data resources.

How-to's

Syntax

tabli data truncate --help
Tabli data truncate
===================

Truncate data resources(s) - ie remove all records/content from a data resource



Examples
--------

 1 - To truncate the tables D_TIME and F_SALES:


    tabli data truncateD_TIME@connection F_SALES@connection


 2 - To truncate only the table D_TIME with force (ie deleting the foreign keys constraint):


    tabli data truncate--forceD_TIME@database


 3 - To truncate all dimension tables that begins with (D_):


    tabli data truncate D_*@connection


 4 - To truncate all tables from the current schema:


    tabli data truncate *@database




Syntax
------


    tabli data truncate [options|flags] <data-selector...>


where:


  Arguments:

    <data-selector...>                                      One or more data or script selectors


  Options:

    --force                                                 Delete the foreign keys constraint


  Selection Options:

    -wd,--with-dependencies                                 If set, the dependencies will be also selected


  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




Related HowTo
Undraw Windows
Learning Tabulify - Step 9 - How to fill a data resource with generated data ?

Tabulify integrates natively a data generator. You can generate realistic production data and start working on your project right away. anonymize production data in your development environment because...

Task Runner