{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Airship Export Integration CLI","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"airship-export-integration-cli","__idx":0},"children":["Airship Export Integration CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can write job results from Treasure Data directly to Airship Audience Lists. In Airship, you can then use the List to target specific users."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"prerequisites","__idx":1},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic Knowledge of Treasure Data."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Airship / Airship Audience Lists"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"static-ip-address-of-treasure-data-integration","__idx":2},"children":["Static IP Address of Treasure Data Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your security policy requires IP whitelisting, you must add Treasure Data's IP addresses to your allowlist to ensure a successful connection."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Please find the complete list of static IP addresses, organized by region, at the following ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/ip-addresses-integrations-result-workers"},"children":["document"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"creating-your-connection-from-the-command-line","__idx":3},"children":["Creating Your Connection from the Command Line"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use the CLI to configure your connection."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database your_database --result configuration query\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following table identifies the configuration keys with descriptions."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Config Key"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Type"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Required"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Airship"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["base_url"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["- Airship North America cloud site: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://go.urbanairship.com/"},"children":["https://go.urbanairship.com"]}," - Airship Europe cloud site: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://go.airship.eu/"},"children":["https://go.airship.eu"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Airship ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.airship.com/tutorials/manage-project/messaging/bearer-tokens/"},"children":["Bearer access token"]},"   Note: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["access_token"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app_key, app_secret"]}," is required"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app_key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.airship.com/reference/security/app-keys-secrets/"},"children":["See App Keys & Secrets"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app_key_custom_events"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required if data_type is custom_events"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app_secret"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["App Secret or Master secret"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["data_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:  - static_list (default) - non_json_attributes - json_attributes - custom_events"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["non_json_target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if data_type=non_json_attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:  - named_users - channels"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json_target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if data_type=json_attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:  - named_users - channels"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["non_json_action"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if data_type=json_attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:  - batch_csv - set - remove"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["json_action"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if data_type=json_attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Supported values:  - set - remove"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list_name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if data_type=static_list"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Audience List name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["list_description"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Audience List description"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attribute_name"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes if data_type=json_attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attribute name to be updated"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skip_invalid_records"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If set to true (default), this will skip invalid records and continue uploading valid ones.  If set to false, this will terminate the job when an invalid record is encountered."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skip_invalid_nonjson_att"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If set to true (default), this will skip invalid records and continue uploading valid ones.  If set to false, this will terminate the job when an invalid record is encountered."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skip_invalid_json_att"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If set to true (default), this will skip invalid records and continue uploading valid ones.  If set to false, this will terminate the job when an invalid record is encountered."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["skip_invalid_custom_events"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If set to true (default), this will skip invalid records and continue uploading valid ones.  If set to false, this will terminate the job when an invalid record is encountered."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["json_composer_custom_events"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If set to true, this will compose json request from properties fields.  If set to false (default), this will use json value from properties field."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["retry_limit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["int"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maximum retry times for each API call (Default: 5)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initial_retry_wait_msecs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["long"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Wait time for the first retry (Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["60000"]}," milliseconds)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["max_retry_wait_msecs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["long"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maximum time between retries (Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["30000"]}," milliseconds)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["connection_timeout_secs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["long"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The amount of time before the connection times out when doing API calls (Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["300"]}," seconds)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["write_timeout_secs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["long"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The amount of time waiting for writing data into the request (Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["300"]}," seconds)"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["read_timeout_secs"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["long"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The amount of time waiting for reading data from the response (Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["300"]}," seconds)"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example Query that Exports Results to an Airship Audience List"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database my_db \\\n--result '{\"type\": \"airship\",\"app_key\": \"xxx\",\"app_secret\": \"yyy\",\"list_name: amazon_channels,\"list_description\": \"amazone collected channels for marketing\"}' \\\n'SELECT identifier_type, identifier from my_table'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example Query that Exports Results to an Airship Named Users Non Json Attributes"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database my_db --query 'SELECT named_user, first_name, last_name, fav_color FROM my_table' --type presto \\\n--result '{\"type\":\"airship\",\"base_url\":\"https://go.urbanairship.com\",       \"auth_method\":\"access_token\",\"access_token\":\"xxx\", \"data_type\":\"non_json_attributes\",\"non_json_target\":\"named_users\",\"non_json_action\":\"set\", \"skip_invalid_nonjson_att\":true}';\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example: Query and export results to an Airship Named UsersJson Attributes"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query --database my_db --query 'SELECT named_user, instance_id, first_name, last_name, fav_color FROM my_table' --type presto \\\n--result '{\"type\":\"airship\", \"base_url\":\"https://go.urbanairship.com\",       \"auth_method\":\"access_token\", \"access_token\":\"xxx\",\"data_type\":\"json_attributes\",        \"json_target\":\"named_users\", \"json_action\":\"set\",\"skip_invalid_json_att\":true}';\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Example: Query and export results to an Airship Custom Events"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"td query -d database -w -q query.txt --type presto \\\n--result '{\"type\":\"airship\",\"base_url\":\"https://go.urbanairship.com\",\"auth_method\":\"access_token\", \"access_token\":\"xxx\",\"app_key_custom_events\":\"xxx\", \"data_type\":\"custom_events\", \"skip_invalid_custom_events\":true}';\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"see-also","__idx":4},"children":["See Also"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/scheduling-a-data-connector-job-execution-from-the-cli"},"children":["Scheduling Data Connector Job Execution from the CLI"]}]}]}]},"headings":[{"value":"Airship Export Integration CLI","id":"airship-export-integration-cli","depth":1},{"value":"Prerequisites","id":"prerequisites","depth":2},{"value":"Static IP Address of Treasure Data Integration","id":"static-ip-address-of-treasure-data-integration","depth":2},{"value":"Creating Your Connection from the Command Line","id":"creating-your-connection-from-the-command-line","depth":2},{"value":"See Also","id":"see-also","depth":2}],"frontmatter":{"seo":{"title":"Airship Export Integration CLI"}},"lastModified":"2025-11-07T02:49:55.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/airship-export-integration-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}