Destinations
Exporting data
Destinations are used when exporting audience data from a DCN. The type of data exported from an audience to a destination consists of type-prefixed identifiers and identity clusters. There are different types of destinations, such as Google Cloud Storage (GCS) and Amazon Simple Storage (S3) buckets.

Creating a Destination

You can create a new destination from your DCN UI or using the CLI by running optable-cli destination create with the type of destination, the bucket location, and access credentials. You can create as many destinations as you like.

Google Cloud Storage (GCS)

To create a GCS destination you can use optable-cli destination create gcs <bucket> <credentials-path>, for example:
$ optable-cli destination create gcs my-gs-bucket-name \
/path/to/credentials.json
The <credentials-path> is required and should refer to a GCP service account's credential JSON file, which you can download from IAM. The service account must have at least write permissions to the specified bucket (storage.objects.create).

Amazon Simple Storage (AWS S3)

To create an AWS S3 destination, you can use optable-cli destination create s3 <bucket> <access-id> <secret-key>, for example:
$ optable-cli destination create s3 my-s3-bucket-name \
ACCESS_ID SECRET_KEY
The <access-id> and <secret-key> are required and should specify the AWS access ID and secret associated with a service account having at least write permissions to the specified bucket (s3:PutObject).

Optional Arguments

By default, created destination have the same name as the specified bucket name. Because destination names must be unique in the DCN, if you wish to create multiple destinations with the same bucket name, you can specify a custom name for the destination itself with the --name=<name> option.
In case of an AWS S3 destination, you can optionally supply region=<region> to specify an AWS region to use. Automatic selection is used by default. Specify a custom AWS S3 endpoint with --endpoint=<endpoint>.

Listing Destinations

You can list all destinations with the CLI by running optable-cli destination list command. The command returns a list of destinations encoded in JSON. You can use the excellent jq utility to parse and manipulate JSON from the command line. For example, to list just the names and type of all destinations:
$ optable-cli destination list | jq '[.name,.kind]'
[
"example-s3-bucket-name",
"DESTINATION_KIND_S3"
]

Archiving a Destination

Destinations can be deleted from the DCN UI or by using optable-cli with the following invocation optable-cli destination archive <id>
Note that data (exported results) will not be deleted from the destination when archiving said destination.