Connection Properties¶
Configuration properties required to connect to data sources and data sinks are specific to the source/sink type. The connection configurations can be expressed in two ways: expanded or condensed.
- Expanded syntax expression: the connection information is written out line-by-line in the data source or sink JSON file.
- Condensed syntax expression: the connection information is defined in kitchen overrides, potentially using vault secrets, then expressed in the data source or sink JSON file with a configuration dictionary.
How to access connection properties¶
Connection properties can be found in the Connections tab of the Node Editor and in the JSON file of the File Editor.
Connection examples¶
Expanded syntax in a recipe¶
sftp_datasource.json
{
"type" : "DKDataSource_SFTP",
"name" : "sftp_datasource",
"config":{
"hostname" : "{{sftpconfg.hostname}}",
"username" : "{{sftpconfg.username}}",
"password" : "{{sftpconfg.password}}"
},
"keys" : {},
"tests": {}
}
Kitchen override and condensed syntax¶
In support of clean deployments across separated kitchen environments, data source and data sink connection configurations should be defined at the kitchen level using kitchen overrides. These overrides can then be set to reference secrets in a kitchen vault.
sftpConfig in kitchen overrides
{
"recipeoverrides": {
"sftpConfig": {
"hostname": "#{vault://sftp/hostname}",
"username": "#{vault://sftp/username}",
"password": "#{vault://sftp/password}"
}
}
}
sftp_datasource.json
{
"type": "DKDataSource_SFTP",
"name": "sftp_datasource",
"config-ref": "sftpconfig",
"keys": {},
"tests": {}
}
Condensed syntax notes¶
- The condensed syntax for connection properties for data sources and sinks is not yet supported in UI forms found in the Connection tab; use the File Editor to access these files.
- Do not use quotes for your condensed connection configuration variables.