Teradata¶
Teradata data sources and sinks are in the database category of I/O connectors.
Tool documentation¶
Connector type values¶
The "type": value to use in the source or sink JSON files.
| Connector type | Value |
|---|---|
| Data source | DKDataSource_Teradata |
| Data sink | DKDataSink_Teradata |
Connection properties¶
The properties to use when connecting to a Teradata instance from Automation.
| Field | Scope | Type | Required? | Description |
|---|---|---|---|---|
hostname |
source/sink | string | yes | Teradata host name. |
username |
source/sink | string | yes | Teradata username. |
password |
source/sink | string | yes | Teradata password. |
retry-interval |
source/sink | integer | variables only | Specifies the frequency in seconds to attempt a connection. Default is 10. |
retry-count |
source/sink | integer | variables only | Specifies the number of attempts the system makes to establish a connection. Default is 1. |
Connections¶
See Connection Properties for more details on connection configurations.
Defined in kitchen-level variables¶
teradataconfig in kitchen overrides
{
"teradataconfig": {
"hostname": "#{vault://teradata/hostname}",
"username": "#{vault://teradata/username}",
"password": "#{vault://teradata/password}"
}
}
The Connection tab in a Node Editor¶

Expanded connection syntax¶
For a data source¶
teradata_datasource.json
{
"name": "teradata_datasource",
"type": "DKDataSource_Teradata",
"config":{
"hostname": "{{teradataconfig.hostname}}",
"username": "{{teradataconfig.username}}",
"password": "{{teradataconfig.password}}"
},
"keys": {},
"tests": {}
}
For a data sink¶
teradata_datasink.json
{
"name": "teradata_datasink",
"type": "DKDataSink_Teradata",
"config":{
"hostname": "{{teradataconfig.hostname}}",
"username": "{{teradataconfig.username}}",
"password": "{{teradataconfig.password}}"
},
"keys": {},
"tests": {}
}
Condensed connection syntax¶
Note
Note: Do not use quotes for your condensed connection configuration variables.
For a data source¶
teradata_datasource.json
{
"type": "DKDataSource_Teradata",
"name": "teradata_datasource",
"config-ref": "teradataconfig",
"keys": {},
"tests": {}
}
For a data sink¶
teradata_datasink.json
{
"type": "DKDataSink_Teradata",
"name": "teradata_datasink",
"config-ref": "teradataconfig",
"keys": {},
"tests": {}
}
Other configuration properties¶
See the following topics for common properties and runtime variables:
File encoding requirements¶
Files used with data sources and data sinks must be encoded in UTF-8 in order to avoid non-Unicode characters causing problems with sinking data to database tables and errors when running related tests
For CSV and other delimited files, use Save as in the program and select the proper encoding, or consider using a text editor with encoding options.
Data source example¶
Data transfer from Teradata to FTP server¶
description.json
notebook.json
{
"mappings": {
"mapping1": {
"source-name": "teradata_source",
"source-key": "mapping1_source",
"sink-name": "ftp_sink",
"sink-key": "mapping1_sink"
}
}
}
/data_sources/source.json
{
"name": "source",
"type": "DKDataSource_Teradata",
"config": {
"username": "vault://teradata/username",
"password": "vault://teradata/password",
"hostname": "vault://teradata/hostname"
},
"keys": {
"mapping1_source": {
"sql": "SELECT * FROM test_data.td_testing",
"query-type": "execute_query",
"format": "csv"
}
}
}
{
"name": "source",
"type": "DKDataSource_Teradata",
"config": {
"username": "vault://teradata/username",
"password": "vault://teradata/password",
"hostname": "vault://teradata/hostname"
},
"keys": {
"mapping1_source": {
"sql": "SELECT * FROM test_data.td_testing",
"query-type": "execute_query",
"format": "csv"
}
}
}
/data_sinks/sink.json
{
"name": "sink",
"type": "DKDataSink_FTP",
"config": {
"username": "vault://ftp/username",
"hostname": "vault://ftp/hostname",
"port": "vault://ftp/port",
"password": "vault://ftp/password",
},
"keys": {
"mapping1_sink": {
"file-key": "output.csv",
"use-only-file-key": true
}
}
}
{
"name": "sink",
"type": "DKDataSink_FTP",
"config": {
"username": "vault://ftp/username",
"hostname": "vault://ftp/hostname",
"port": "vault://ftp/port",
"password": "vault://ftp/password",
},
"keys": {
"mapping1_sink": {
"file-key": "output.csv",
"use-only-file-key": true
}
}
}
Data sink example¶
Data transfer from FTP server to Teradata¶
description.json
notebook.json
{
"mappings": {
"ftp_to_td": {
"source-name": "ftp_source",
"source-key": "ftp_to_td_source",
"sink-name": "teradata_sink",
"sink-key": "ftp_to_td_sink"
}
}
}
/data_sources/source.json
{
"name": "source",
"type": "DKDataSource_FTP",
"config": {
"username": "vault://ftp/username",
"hostname": "vault://ftp/hostname",
"port": "vault://ftp/port",
"password": "vault://ftp/password",
"passive": true
},
"keys": {
"ftp_to_td_source": {
"file-key": "example.csv",
"use-only-file-key": true
}
}
}
/data_sinks/sink.json
{
"name": "sink",
"type": "DKDataSink_Teradata",
"config": {
"username": "vault://teradata/username",
"password": "vault://teradata/password",
"hostname": "vault://teradata/hostname"
},
"keys": {
"ftp_to_td_sink": {
"query-type": "bulk_insert",
"table-name": "test_data.td_testing",
"format": "csv"
}
}
}