...
The distribution profile can specify one or several destinations (sinks) to distribute the data. For example, to distribute to two different SFTP destinations the following profile can may be used:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "data_sinks": [ { "sink": "sftp_sink", "type": "sftp", "credentials": { "user_id": "eagle", "password": "eagle1" }, "cfg": { "host": "inno-mlperfapp01", "port": 22, "compression_codec": "gzip" } }, { "sink": "sftp_extracts", "type": "sftp", "credentials": { "user_id": "eagle", "password": "eagle1" }, "cfg": { "host": "inno-mlperfapp01", "port": 22, "compression_codec": "gzip", "location": "extracts" } } ] } |
The distribution profile can may be specified in the RTR either by name using the DistributionProfileName parameter or as an embedded distribution profile in the DistributionProfileJsonDefinition parameter as a JSON document.
For example, if we have a eagle/estar/tpe/dynamic/metadata/distributions/client_destinations_profile.json we can refer it is defined, it may be referenced in the RTR by using using the DistributionProfileName=client_destinations parameter.
Encrypted Credentials
The credentials can credentials may be embedded in the distribution profile as shown in the example above , or the credentials can credentials may point to an encrypted configuration file.
...
"credentials": "clientcredentials/sftpcrendentials"
In this case, the credentials are encrypted and retrieved from a file infrom
dynamic/dataservices/configs/clientcredentials.json.
The credentials reference has two parts - : a credential group name and the specific credential name. In the above example, the credentials group name is clientcredentials and is translated into the credentials file name. The credential name is sftpcredentials and points to a section within the credentials file name.
Each encrypted credentials file has a region designation, which is the Oracle SID of the environment. If the credentials file is copied to a different environment, it will fail to work.
There is a SOAP endpoint provided to save encrypted credentials. An example RTR to save the credentials is provided below:
...
The above RTR will create a credentials configuration which can which may be referred with the "credentials": "clientcredentials/sftpcrendentials" element in the distribution profile file.
Data Encryption
The data to be distributed can distributed may be encrypted. Currently only Only GPG is supported currently. The encryption is enabled using the encryption_policy element in the distribution profile as shown in the example below.
...
The credentials/client_id specifies the GPG destination name.
The "credentials" element can element may be an embedded configuration as shown in the example or a string with a reference to the encrypted configuration as shown in Encrypted Credentials section.
The "encryption_policy" can may be a string reference to an encryption policy configuration stored in the eagle/estar/tpe/dynamic/metadata/encryptions/polycyname.json files.
For example if we have , a file eagle/estar/tpe/dynamic/metadata/encryptions/gpgpolicy.json may exist with the following content:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "encryption_policies" : { "gpg_policy" : { "codec" : "GPG", "armor": "gpgarmor", "credentials" : "eagle_certificates/gpgcert" } } } |
we can refer to it from It may be referenced from the distribution profile as:
...
Including Sink Definitions
The Distribution Profile can Profile may include other sink definitions and redefine their parameters. For example if we have a file named , if the file is named "test_sinks.json" in the eagle/estar/tpe/dynamic/metadata/distributions/ path with the following content:
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{ "sinks": { "sftp_sink": { "type":"SFTP", "credentials" : "test_cred/test_credentials", "cfg" : { "host":"sftp.eagleinvsys.com", "port":22, "location" : "client1/extract", "encryption_policy" : "test_encryption_policy/enc_policy1", "compression_codec": "GZIP" } } } } |
We can include it into It may be included into a policy file "send_to_sftp_profile.json" as:
...
Data Compression
The distributed data can data may be compressed by adding the "compression_codec": "GZIP" parameter to the "cfg" section of the sink definition. Currently only Only GZIP is supported presently.
SFTP Distribution Sink Parameters
The SFTP sink is designated with a "type": "SFTP" sink parameter.
The SFTP Distribution can Distribution may take the following parameters:
...
"credentials"/"private_key" - the name to the private key file, if necessary. The private key file should be in the estar/tpe/dynamic/dataservices/certificates folder.
...
"cfg"/"port" - the port number of the SFTP server, usually should be 22usually set to 22
"cfg"/"make_dir" - values of true or fale. Set to true to create missing directories in the distribution path on the SFTP server , false and false to fail if the directory is missing. The default is true.
"cfg"/"location" - a path on the SFTP server to distribute the files to.
...