How to push results to an SFTP server
After running an activation query, you can push the resulting file to an SFTP server.
To do so, you will need to create a connection between InfoSum Platform and the SFTP server. The query results will then be streamed to the destination and then the connection will be removed.
Before starting, you will need the following information to hand:
Private Key Pem (Password-less connection).
Path (push directory needs to have a relative path - i.e. must not begin with a '/')
- Host public key in one of the format:
- OpenSSH authorised_keys - "Authorised Keys"
- OpenSSH known_hosts - "Known Hosts"
- PEM - "Public Key PEM"
- GPG Public Key (to export an encrypted file)
Important: If your destination SFTP server needs to whitelist any addresses to establish a connection, you must contact email@example.com to obtain the list of InfoSum IP addresses that needs to be whitelisted.
You activate the results in two ways.
- Define your audiences by creating an audience using the Audience tab.
- Go to Segments, click new Segment, and select the previously created AUDIENCE from the drop-down under the Audience.
- Once you defined your targeted audience, click on New Activation button on top right
- Select the Activation partner from the Activation Dataset dropdown and output column
- Give a name to the campaign
Write the activation query and select Create Campaign.
For information on how to write IQL queries, please see the language documentation.
You will then be taken to the Activation tab, where you will see some information about the campaign and its status. The total rows gives you an insight into the size of the dataset, before pushing it to the destination.
At the bottom of the page, you will see a box providing more details on the campaign, such as the query used and the name of the output column. There are three menu tabs within this box - Details, Pushes, and Push Connectors. Once you've pushed the results, the details and status will be viewable under the Pushes tab.
For now, switch to Push Connectors and use the slider to enable SFTP. The form below will now appear. Once you've filled in and saved the connection details, press Save and switch to Host Verification.
The above form contains four different tabs:
- Connection - Fields: Host, Port, Path
- Authentication - Fields: Username, Password or Private Key Pem
- Host Verification - Fields: Authorized Keys or Known Hosts or Public Key Pem
- GPG Encryption - GPG Public to encrypt the file
You may need to enter three different keys for different purposes. Here are the keys.
User's SSH private key:
You can ignore this field if you are establishing a connection using a password.
This is a user authorisation key (User's SSH private key) replacing the password and will be in the form of a public/private key pair.
If you are establishing a connection using SSH key/password-less, you will need to add the public ssh key into the authorized keys file on your server and put the private SSH key in the Private Key Pem field in UI.
Host Verification Key:
You will need to enter a host public key in one of the below format (You need to enter only one)
- Host Public Keys (OpenSSH authorized_keys format) - "Authorised Keys" in Bunker UI
- Host Public Keys (OpenSSH known_hosts format) - "Known Hosts" in Bunker UI
- Host Public Keys (PEM Format) - "Public Key PEM" in Bunker UI. Currently, we only support PKIX format for public keys. The PEM block with "PUBLIC KEY" will go to this field.
Please note this key is NOT the same as the public part of the user SSH key, this is a public key associated with your server, not with your user.
You can find this key in one of two ways.
1) Your IT team can look it up on the server (probably in the /etc/ssh directory) and there will be a number of files e.g.
The contents of one of these files can just be put straight into the "Authorised Keys" field on the bunker UI. An example format for the ecdsa file:
2) Alternatively, you can SSH into your server then generate a key pair using the following command "ssh-keygen -F <hostname>" then look up in your local known_hosts file for the public key for that host.
You can ignore this field if you are not exporting an encrypted file.
You will need to generate a public/private key pair. You need to provide GPG public key to encrypt your file.
When you entered all required fields, click Save. When you select Save, the Activate button will become clickable. Selecting this button will begin the file stream.
Switch to the Pushes tab to see the status and check for any errors. Once the status has a green tick, the file has been successfully pushed to the SFTP server.