Tabul - Upsert (Update/Insert) a Connection
About
upsert is an action of the connection module that update a connection or create it if it doesn't exist yet in the connection vault.
Example
Modifying the connection URL
tabul connection upsert --uri "jdbc:sqlite:///tmp/mySqliteDb.db" mySqliteDB
- Update the URL attribute
tabul connection upsert --uri "jdbc:sqlite:///tmp/db.db" mySqliteDB
- With the info action, we can see that the URL has changed
tabul connection info mySqliteDB
Information about the connection (mySqliteDB)
Attribute Value Description
-------------------------- ------------------------ --------------------------------------------------------------------
BOOLEAN_DATA_TYPE Native Boolean data type used to store boolean values
BUILDER_CACHE_ENABLED true Enable or disable the builder cache
CHAR_DEFAULT_PRECISION 1 Default CHAR precision
COMMENT A connection description
DATABASE_MAJOR_VERSION The major version number of the database
DATABASE_MINOR_VERSION The minor version number of the database
DATABASE_PRODUCT_NAME The name of the database
DATABASE_PRODUCT_VERSION The version of the database
DATE_DATA_TYPE NATIVE Date data type used to store date values
DRIVER The jdbc driver class
DRIVER_NAME The driver name
DRIVER_VERSION The driver version
HOST Host Server
JDBC_MAJOR_VERSION The major version number of JDBC
JDBC_MINOR_VERSION The minor version number of JDBC
LOGIN_STATEMENTS Statements that runs after a connection has been established
MAX_CONCURRENT_THREAD The maximum number of threads that can be created against the system
MAX_NAME_IN_PATH The maximum number of names in a path
NAME mySqliteDB The name of the connection
NAME_QUOTING_DISABLED_CASE UPPERCASE The case to apply when quoting is disabled
NAME_QUOTING_ENABLED true Enable quoting of names
NATIVES Native Driver attributes (jdbc properties, ...)
NCHAR_DEFAULT_PRECISION 1 Default NCHAR precision
NVARCHAR_DEFAULT_PRECISION 0 Default NVARCHAR precision
ORIGIN CONF The origin of the connection
PASSWORD The user password
PORT Host Port
SUPPORT_BATCH_UPDATES If the system supports batch SQL updates
SUPPORT_NAMED_PARAMETERS If the system supports named parameters in the SQL statement
TIMESTAMP_DATA_TYPE NATIVE Timestamp data type used to store timestamp values
TIME_DATA_TYPE NATIVE Time format data type to store time values
TYPE_AFFINITY_CONVERSION false If true, the type name are converted to affinity name
URI jdbc:sqlite:///tmp/db.db The uri of the connection
USER The user name
VARCHAR_DEFAULT_PRECISION 0 Default VARCHAR precision
WORKING_PATH The working path (Schema for database, directory for file system)
Syntax
tabul connection upsert --help
Tabul connection upsert
=======================
Update or insert a connection
Example
-------
1 - To upsert the information of the connection called `db`
tabul connection upsert --uri jdbc:sqlite///tmp/db.db db
Syntax
------
tabul connection upsert [options|flags] <name> <uri>
where:
Arguments:
<name> the connection name
<uri> No Description available
Data Definition Options:
-a,--attribute <key=value> A tabulify connection attribute
Connection Properties:
-a,--attribute <key=value> A tabulify connection attribute
-d,--driver <tld.package.driverClass> The jdbc driver (JDBC URL only)
--native-attribute <key=value> A native connection attribute (Example: JDBC driver property
-p,--password <password> The user password (Clear password is encrypted only if a passphrase is provided)
-u,--user <user> The user name (ie the login name)
Options:
--uri <value> The system connection string (a JDBC Uri for a database or a file system URI).
If the connection doesn't exist, this option is mandatory.
Global Options:
-ah,--app-home <path> The app home directory (default to the .tabul.yml file directory)
-vf,--conf <path> The path to a configuration file
-ee,--exec-env <name> The execution environment (prod or dev)
-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 vault values (Env: TABUL_PASSPHRASE)
--pipe-mode Use pipe mode if you want to pipe the output in a shell. Pipe mode will not print the headers (ie column name) and will not make the control character visible
-v,--version Print version information