DEFINE CONNECTION

Purpose

Defines the specified connection for the target system <target system name>.

Syntax

[DEFINE] CONNECTION FOR
TARGET SYSTEM <target system name>
IN [ENVIRONMENT] <environment name>
TECHNOLOGY VERSION <technology version identifier>
ACCESS TYPE (
( JDBC
    URI <connection string>
    USER <user name>
    IDENTIFIED BY <password string>)
    [POOLING (ENABLED | DISABLED)]
    [(MIN | MINIMUM) POOL SIZE <integer>]
    [(MAX | MAXIMUM) POOL SIZE <integer>]
    [IDLE TIMEOUT <timeout in ms>]
    [(MAX | MAXIMUM) LIFETIME <max lifetime in ms>])
";"

For an explanation of the syntax notation, see TinML Syntax Notation.

Examples

Replace the placeholders in the examples with your own values.

Exasol

DEFINE CONNECTION 
    FOR TARGET SYSTEM "MY_DWH" IN DEVELOPMENT
    TECHNOLOGY VERSION EXASOL_7
    ACCESS TYPE JDBC
    URI "jdbc:exa:my_host:8563"
    USER "my_user" IDENTIFIED BY "my_password"
;

// If you cannot use TLS and you trust the server, you can include the fingerprint in the URL:

DEFINE CONNECTION 
    FOR TARGET SYSTEM "MY_DWH" IN DEVELOPMENT
    TECHNOLOGY VERSION EXASOL_7
    ACCESS TYPE JDBC
    URI "jdbc:exa:my_host/72975B4D331DEEB44FA41FB858A5417E163151BBFB45376574706800A8DCCE30:8563"
    USER "my_user" IDENTIFIED BY "my_password"
;

Snowflake

DEFINE CONNECTION
  FOR TARGET SYSTEM "MY_DWH"
  IN DEVELOPMENT
  TECHNOLOGY VERSION SNOWFLAKE_1
  ACCESS TYPE JDBC
URI "jdbc:snowflake://myorg_myaccount.snowflakecomputing.com?warehouse=my_wh&db=my_dwh&role=yotilla_execute_templates_role"
  USER "my_user" IDENTIFIED BY "my_password"
;
  • The warehouse parameter in the JDBC connection string is only required if a default warehouse for the user has not been defined in Snowflake.

  • The role parameter in the connection string is required if a default role for the user has not been defined, or if the defined default role for the user is not yotilla_execute_templates_role (see Database Preparation - Snowflake).

Amazon Redshift

DEFINE CONNECTION 
    FOR TARGET SYSTEM "MY_DWH" IN DEVELOPMENT
    TECHNOLOGY VERSION REDSHIFT_1
    ACCESS TYPE JDBC
    URI "jdbc:redshift://my_redshift_endpoint.eu-central-1.redshift.amazonaws.com:5439/my_dwh"
    USER "my_user" IDENTIFIED BY "my_password"
;

Expected result (all platforms)

Target System Connection for Target System "MY_DWH" in Environment "DEVELOPMENT" defined.