{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Batch Export Integration","description":"Export customer profile data from Treasure AI to the Batch Profile Mass Update API, mapping query result columns to Batch native and custom profile attributes or events.","siteUrl":"https://docs.treasure.ai","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":"batch-export-integration","__idx":0},"children":["Batch Export Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This integration exports customer profile data from Treasure AI directly to ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://batch.com"},"children":["Batch"]}," using the Batch Profile Mass Update API. Batch is a customer engagement platform (CEP) for omnichannel campaigns across mobile push, web push, in-app messaging, email, and SMS."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The integration maps each query result row to a Batch profile operation. Identity, native attributes, custom attributes, and events are all declared through a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["column-name prefix convention"]}," in your query, so no per-column configuration is needed. You can run the integration in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Attributes"]}," mode (one row updates one profile) or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}," mode (one row records one event, grouped by identifier)."]},{"$$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 AI."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Basic knowledge of Batch profiles, custom IDs, installation identities, native attributes, and events."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A Batch REST API key."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A Batch project key."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A query that exposes a profile identity through the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__"]}," column-name prefix (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__custom_id"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__apikey"]}," together with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__installation_id"]},")."]}]},{"$$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":"limitations","__idx":3},"children":["Limitations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["All array-valued attributes are replace-only. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string_array__"]}," custom attributes and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$topic_preferences"]}," are always sent as the complete array. Incremental ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$add"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$remove"]}," operations are not supported in this version, even though the Batch API supports them. Your query must emit the full desired array."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["There is no opt-out for the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__"]}," prefix. A column named ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__region"]}," always maps to the native ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$region"]}," attribute. To send a custom attribute instead, alias the column to a name without the prefix."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Profile Mass Update API is synchronous. There is no async indexing token or polling. (The Batch Audience API has async tokens; do not conflate the two.)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Throughput (10,000 profile updates per second) is not actively throttled client-side. Only ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]}," responses trigger a back-off."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Column names are normalized to lower case automatically, so uppercase or mixed-case names are accepted. Names that still do not match ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["^[a-z0-9_]{1,30}$"]}," after lower-casing (for example, names containing hyphens or dots, or longer than 30 characters) must be aliased in the query. No runtime rename beyond case-folding is supported."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Rate-limit (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]},") and server errors (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["5xx"]},", network timeouts) are retried with exponential back-off. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}," responses fail fast because they indicate a payload or authentication problem."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-a-new-authentication","__idx":4},"children":["Create a New Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Treasure AI, you must create and configure the data connection before running your query. As part of the data connection, you provide authentication to access Batch."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TD Console"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Integrations Hub"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Catalog"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click the search icon on the far right of the Catalog screen and enter ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batch"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Hover over the Batch connector and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Authentication"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/catalog-search-result.ed86b857058e515e7a1efb35617afba20c82725d7acc3efb79cbd2df97350495.8b63bc27.webp","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The New Authentication dialog opens."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/create-auth-dialog.3f69a78e1f80dca150017bedf124670add1609d1a6eaf6f84b3f98d4d4b80b2f.8b63bc27.webp","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter your Batch ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["REST API Key"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter your Batch ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Project Key"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enter a name for your connection."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"."]}]},{"$$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":{"width":"20%","data-label":"Parameter"},"children":["Parameter "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"Required"},"children":["Required "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rest_api_key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Batch REST API key."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["project_key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Batch project key."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configure-export-results","__idx":5},"children":["Configure Export Results"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To configure the integration:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TD Console"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench"]}," > ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Queries"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Click ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New Query"]}," to create a query, or open a saved query that you want to export."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["At the top of the query editor, select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export Results"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the Batch authentication that you created."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Configure the export parameters."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/export-configuration-dialog.a007ae95980378a54512a979ca20d54d24fb66c2da0a93a9f1420bb3569a6d5c.8b63bc27.webp","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"how-the-export-works","__idx":6},"children":["How the Export Works"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Column prefix detection"]},": The integration inspects each query result column name and classifies it as an identifier (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__"]},"), a native attribute (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__"]},"), a type-prefixed custom attribute (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date__"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url__"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string_array__"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["object__"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array__"]},"), or a plain custom attribute (no prefix, type inferred from the Embulk column type)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Identity extraction"]},": For each row, the integration reads the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__"]}," value and builds the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifiers"]}," block, using either ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["custom_id"]}," or the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["installation"]}," form (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apikey"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["installation_id"]},")."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Attribute or event mapping"]},": In ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Attributes"]}," mode, native columns are emitted under their reserved ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$…"]}," wire keys and custom columns under wrapped or plain keys. In ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}," mode, each row builds one event, and events are grouped by identifier into the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["events[]"]}," array."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Per-row validation"]},": The integration validates key formats, value limits, native attribute types, and the 25 kB serialized attributes size before sending."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Batching"]},": Operations are buffered and flushed in batches (up to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch_size"]},", maximum 10,000 operations per request)."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Retry and partial errors"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]}," and server errors are retried with back-off. Batch's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUCCESS_WITH_PARTIAL_ERRORS"]}," response is handled according to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ignore_partial_errors"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"export-parameters","__idx":7},"children":["Export Parameters"]},{"$$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":{"width":"24%","data-label":"Parameter"},"children":["Parameter "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"10%","data-label":"Required"},"children":["Required "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"18%","data-label":"Default"},"children":["Default "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Profile"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fixed constant identifying this as a Profile connector. Reserved for forward compatibility. An unknown value causes a configuration error."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile_sync_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Attributes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export mode. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Attributes"]}," maps one row to one profile update. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}," maps one row to one event, grouped by identifier."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch_size"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["10000"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of profile operations per request. Must be an integer from 1 to 10000. A value of 0 or greater than 10000 causes a configuration error."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["omit_null_fields"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", null-valued fields are stripped from the payload and the attribute is left unmodified. When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},", null fields are emitted as JSON ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]}," so Batch erases the attribute. Applies to both profile attributes and event properties."]}]},{"$$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":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", rows that fail client-side validation are skipped, logged, and counted, and valid rows continue. When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},", the task fails on the first invalid row and nothing is sent."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ignore_partial_errors"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Governs Batch's server-side ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUCCESS_WITH_PARTIAL_ERRORS"]}," response only. When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", per-record errors are logged and the task continues. When ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]},", the task aborts."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"data-mapping","__idx":8},"children":["Data Mapping"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Identity and attribute type are declared by column-name prefixes in the query result schema. No column configuration is needed. Columns fall into three groups."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Column names are matched and serialized ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["case-insensitively"]},". The integration lower-cases each column name before detecting its prefix and deriving the Batch wire key, so ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IDENTIFIER__Custom_Id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BATCH__Email_Address"]},", and a plain ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["LoyaltyTier"]}," are treated as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__custom_id"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__email_address"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["loyaltytier"]}," respectively. Custom attribute keys are therefore always sent to Batch in lower case (Batch requires them to match ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["^[a-z0-9_]{1,30}$"]},"). In ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}," mode the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__name"]}," value is also lower-cased before it is validated and sent, so ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Purchase_Completed"]}," becomes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["purchase_completed"]},"."]},{"$$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":{"width":"28%","data-label":"Treasure AI query result"},"children":["Treasure AI query result "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"25%","data-label":"Batch destination"},"children":["Batch destination "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__custom_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifiers.custom_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Profile identity. Use this form, or the installation form below. Exactly one form must be present. String, 512 characters maximum."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__apikey"]}," + ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__installation_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifiers.installation.apikey"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifiers.installation.installation_id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Installation identity form. Both columns must appear together."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__<native_name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$<native_name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Native profile attribute. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__"]}," prefix is stripped and the reserved ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$…"]}," wire key is emitted. See the native attribute list below."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date__<name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date(<name>)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom date attribute. Value is epoch seconds or an RFC 3339 string."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url__<name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url(<name>)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom URL attribute. Value must include a scheme (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["://"]},") and be 2048 characters maximum."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string_array__<name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom string array attribute (replace-only). JSON array of non-empty strings, each 300 characters maximum, 25 items maximum."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["object__<name>"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array__<name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom object or array attribute. The cell must be a well-formed JSON object or array string."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<name>"]}," (no prefix)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<name>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom attribute, type inferred from the Embulk column type. The key must match ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["^[a-z0-9_]{1,30}$"]},"."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Attributes"]}," mode, the supported ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__"]}," native attribute names are ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email_address"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email_marketing"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["phone_number"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sms_marketing"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["email_open_tracking_consent"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["language"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timezone"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["region"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["topic_preferences"]},". In ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}," mode, the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__"]}," prefix instead carries the reserved event fields ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["name"]}," (required), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["time"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["label"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["tags"]},". The native attribute set is gated by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile_sync_type"]},": profile-native names are rejected in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}," mode and event-reserved names are rejected in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Attributes"]}," mode."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The connector infers Batch types for plain (no-prefix) custom attributes from the Treasure AI column type."]},{"$$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":{"width":"25%","data-label":"Treasure AI type"},"children":["Treasure AI type "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Batch data type"},"children":["Batch data type"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["long"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["double"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["number"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timestamp"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date__<name>"]}," to send as a Batch ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date(<name>)"]}," attribute."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sync-modes","__idx":9},"children":["Sync Modes"]},{"$$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":{"width":"28%","data-label":"Parameter"},"children":["Parameter "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"22%","data-label":"Value"},"children":["Value "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Behavior"},"children":["Behavior"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile_sync_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Attributes"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One input row maps to one profile update. Native and custom attributes are written to the profile."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile_sync_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["One input row maps to one event. Events are grouped by identifier into the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["events[]"]}," array. Up to 15 events accumulate per identifier before a flush."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["omit_null_fields"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Null-valued fields are stripped client-side; the attribute is left unmodified on the Batch profile."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["omit_null_fields"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Null-valued fields are emitted as JSON ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["null"]},"; Batch erases the attribute. For typed ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date__"]},"/",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url__"]}," attributes, the plain unwrapped key is emitted for deletion."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sample-queries","__idx":10},"children":["Sample Queries"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"profile-attributes-export","__idx":11},"children":["Profile Attributes Export"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This example exports customer profiles with native attributes (email, language, region) and custom attributes (a signup date, a profile URL, and a loyalty tier)."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT\n  customer_id          AS identifier__custom_id,\n  email                AS batch__email_address,\n  marketing_consent    AS batch__email_marketing,\n  phone                AS batch__phone_number,\n  preferred_language   AS batch__language,\n  timezone             AS batch__timezone,\n  country_code         AS batch__region,\n  CAST(signup_ts AS VARCHAR) AS date__signup_date,\n  profile_url          AS url__profile_url,\n  loyalty_tier,\n  interests            AS string_array__interests,\n  preferences_json     AS object__preferences\nFROM customer_profiles\nWHERE TD_TIME_RANGE(time, TD_DATE_TRUNC('day', TD_SCHEDULER_TIME() - 86400, 'UTC'), NULL)\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample query result"]}]},{"$$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":{"width":"22%","data-label":"identifier__custom_id"},"children":["identifier__custom_id "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"24%","data-label":"batch__email_address"},"children":["batch__email_address "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"14%","data-label":"batch__language"},"children":["batch__language "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"12%","data-label":"batch__region"},"children":["batch__region "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"loyalty_tier"},"children":["loyalty_tier"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["abc123"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["user@example.com"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["en"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["FR"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["gold"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["def456"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["jane@example.com"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["fr"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["fr"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["silver"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This produces one ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /2.11/profiles/mass-update"]}," request. Each row becomes one operation with an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifiers.custom_id"]}," block and an ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attributes"]}," object using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$email_address"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$language"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["$region"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["date(signup_date)"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url(profile_url)"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["loyalty_tier"]}," wire keys. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__region"]}," value ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fr"]}," is normalized to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FR"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Required configuration"]}]},{"$$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":{"width":"35%","data-label":"Parameter"},"children":["Parameter "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Profile"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile_sync_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Attributes"]}]}]},{"$$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":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["omit_null_fields"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"events-export","__idx":12},"children":["Events Export"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This example records one purchase event per row in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}," mode. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__name"]}," column is required; events are grouped under each identifier."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT\n  customer_id          AS identifier__custom_id,\n  'purchase'           AS batch__name,\n  CAST(purchased_at AS VARCHAR) AS batch__time,\n  product_category     AS category,\n  order_amount         AS amount\nFROM purchases\nWHERE TD_TIME_RANGE(time, TD_DATE_TRUNC('day', TD_SCHEDULER_TIME() - 86400, 'UTC'), NULL)\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample query result"]}]},{"$$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":{"width":"22%","data-label":"identifier__custom_id"},"children":["identifier__custom_id "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"16%","data-label":"batch__name"},"children":["batch__name "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"26%","data-label":"batch__time"},"children":["batch__time "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"18%","data-label":"category"},"children":["category "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"amount"},"children":["amount"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["abc123"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["purchase"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2026-06-21T10:00:00Z"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["electronics"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["299"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["abc123"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["purchase"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["2026-06-21T14:30:00Z"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["books"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["42"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Both rows share ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["custom_id"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["abc123"]},", so they are grouped into a single operation with two entries in the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["events[]"]}," array. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["category"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]}," columns become event attributes under ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["events[].attributes"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Required configuration"]}]},{"$$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":{"width":"35%","data-label":"Parameter"},"children":["Parameter "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Profile"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile_sync_type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}]}]},{"$$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":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Event recency window"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Batch enforces a 24-hour recency window on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__time"]}," server-side: an event can be at most 24 hours old and cannot be in the future. For scheduled syncs, ensure event timestamps fall within the last 24 hours of the connector run time, not the data's logical day. Omit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__time"]}," to let Batch stamp the request arrival time instead."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"schedule-the-query-export-jobs-optional","__idx":13},"children":["Schedule the Query Export Jobs (Optional)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use Scheduled Jobs with Result Export to periodically write the output result to Batch."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure AI's scheduler feature supports periodic query execution to achieve high availability."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"optional-schedule-query-export-jobs","__idx":14},"children":["(Optional) Schedule Query Export Jobs"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can use Scheduled Jobs with Result Export to periodically write the output result to a target destination that you specify."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data's scheduler feature supports periodic query execution to achieve high availability."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When two specifications provide conflicting schedule specifications, the specification requesting to execute more often is followed while the other schedule specification is ignored."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example, if the cron schedule is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1 * 1'"]},", then the 'day of month' specification and 'day of week' are discordant because the former specification requires it to run every first day of each month at midnight (00:00), while the latter specification requires it to run every Monday at midnight (00:00). The latter specification is followed."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"scheduling-your-job-using-treasure-console","__idx":15},"children":["Scheduling your Job Using Treasure Console"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Workbench > Queries"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Create a new query or select an existing query."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Next to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},", select None."," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-28-51.f1b242f6ecc7666a0097fdf37edd1682786ec11ef80eff68c66f091bc405c371.0f87d8d4.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In the drop-down, select one of the following schedule options:"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-29-47.45289a1c99256f125f4d887e501e204ed61f02223fde0927af5f425a89ace0c0.0f87d8d4.png","alt":""},"children":[]}]},{"$$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":"Drop-down Value"},"children":["Drop-down Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Custom cron..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Review ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#custom-cron-details"},"children":["Custom cron... details"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["@daily (midnight)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once a day at midnight (00:00 am) in the specified time zone."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["@hourly (:00)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run every hour at 00 minutes."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No schedule."]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"custom-cron-details","__idx":16},"children":["Custom cron... Details"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2021-1-15_17-30-23.0f94a8aa5f75ea03e3fec0c25b0640cd59ee48d1804a83701e5f2372deae466c.0f87d8d4.png","alt":""},"children":[]}]},{"$$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":["Cron Value"]}]},{"$$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":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 * * * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once an hour."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 0 * * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once a day at midnight."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0 0 1 * *"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Run once a month at midnight on the morning of the first day of the month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["\"\""]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Create a job that has no scheduled run time."]}]}]}]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":" *    *    *    *    *\n -    -    -    -    -\n |    |    |    |    |\n |    |    |    |    +----- day of week (0 - 6) (Sunday=0)\n |    |    |    +---------- month (1 - 12)\n |    |    +--------------- day of month (1 - 31)\n |    +-------------------- hour (0 - 23)\n +------------------------- min (0 - 59)\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following named entries can be used:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Day of Week: sun, mon, tue, wed, thu, fri, sat."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Month: jan, feb, mar, apr, may, jun, jul, aug, sep, oct, nov, dec."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A single space is required between each field. The values for each field can be composed of:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"fixed-table"},"children":[{"$$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":{"width":"35%","data-label":"Field Value"},"children":["Field Value "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"20%","data-label":"Example"},"children":["Example "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"45%","data-label":"Example Description"},"children":["Example Description "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A single value, within the limits displayed above for each field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A wildcard ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*'"]}," to indicate no restriction based on the field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) on the first day of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A range ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2-5'"]},", indicating the range of accepted values for the field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1-10 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) on the first 10 days of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A list of comma-separated values ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2,3,4,5'"]},", indicating the list of accepted values for the field."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 1,11,21 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) every 1st, 11th, and 21st day of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A periodicity indicator ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*/5'"]}," to express how often based on the field's valid range of values a schedule is allowed to run."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'30 */2 1 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run on the 1st of every month, every 2 hours starting at 00:30. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 */5 * *'"]}," configures the schedule to run at midnight (00:00) every 5 days starting on the 5th of each month."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A comma-separated list of any of the above except the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'*'"]}," wildcard is also supported ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'2,*/5,8-10'"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["'0 0 5,*/10,25 * *'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Configures the schedule to run at midnight (00:00) every 5th, 10th, 20th, and 25th day of each month."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["(Optional) You can delay the start time of a query by enabling the Delay execution."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"execute-the-query","__idx":17},"children":["Execute the Query"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Save the query with a name and run, or just run the query. Upon successful completion of the query, the query result is automatically exported to the specified destination."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Scheduled jobs that continuously fail due to configuration errors may be disabled on the system side after several notifications."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["(Optional) You can delay the start time of a query by enabling the Delay execution."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"activate-a-segment-in-audience-studio","__idx":18},"children":["Activate a Segment in Audience Studio"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can also send segment data to the target platform by creating an activation in the Audience Studio."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Navigate to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Audience Studio"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select a parent segment."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the target segment, right-mouse click, and then select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Activation."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Details"]}," panel, enter an Activation name and configure the activation according to the previous section on Configuration Parameters."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Customize the activation output in the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Output Mapping"]}," panel."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/ouput.b2c7f1d909c4f98ed10f5300df858a4b19f71a3b0834df952f5fb24018a5ea78.8ebdf569.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Attribute Columns",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export All Columns"]}," to export all columns without making any changes."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add Columns"]}," to add specific columns for the export. The Output Column Name pre-populates with the same Source column name. You can update the Output Column Name. Continue to select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add Columns"]},"to add new columns for your activation output."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["String Builder",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["+ Add string"]}," to create strings for export. Select from the following values:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["String: Choose any value; use text to create a custom value."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Timestamp: The date and time of the export."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Segment Id: The segment ID number."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Segment Name: The segment name."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Audience Id: The parent segment number."]}]}]}]}]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":6},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Set a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Schedule"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/snippet-output-connector-on-audience-studio-2024-08-28.a99525173709da1eb537f839019fa7876ffae95045154c8f2941b030022f792c.8ebdf569.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select the values to define your schedule and optionally include email notifications."]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":7},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create"]},"."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you need to create an activation for a batch journey, review ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/journey-orchestration/batch/creating-a-batch-journey-activation"},"children":["Creating a Batch Journey Activation"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"configure-export-results-in-workflow-optional","__idx":19},"children":["Configure Export Results in Workflow (Optional)"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Within Treasure Workflow, you can specify the use of a data connector to export data."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Learn more at ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/tools/cli-and-sdks/api#workflow-commands"},"children":["Using Workflows to Export Data with the TD Toolbelt"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sample Workflow Configuration"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"timezone: UTC\n\n_export:\n  td:\n    database: sample_datasets\n\n+td-result-into-batch:\n  td>: queries/batch_export.sql\n  result_connection: batch\n  result_settings:\n    target: Profile\n    profile_sync_type: Attributes\n    batch_size: 10000\n    skip_invalid_records: true\n    ignore_partial_errors: true\n    omit_null_fields: true\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"troubleshooting","__idx":20},"children":["Troubleshooting"]},{"$$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":{"width":"30%","data-label":"Error or symptom"},"children":["Error or symptom "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"Cause"},"children":["Cause "]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Solution"},"children":["Solution"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authentication fails with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["rest_api_key"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["project_key"]}," is incorrect, or the credentials do not have access to the project."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Verify the REST API key and project key in the Batch console under Settings."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The export fails at configuration time with \"unknown Batch native attribute\"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__"]}," column uses a suffix that is not a supported native attribute, or it is used in the wrong mode (for example, a profile-native name in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Events"]}," mode)."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Check the supported native attribute names and confirm they match ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["profile_sync_type"]},". Incremental forms such as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["batch__topic_preferences__add"]}," are not supported."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The export fails because no identity column is present."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The query has no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__custom_id"]}," and no installation columns, or it includes both identity forms."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Provide exactly one identity form: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__custom_id"]},", or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__apikey"]}," together with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["identifier__installation_id"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The export fails with a custom key error."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A custom attribute column name does not match ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["^[a-z0-9_]{1,30}$"]}," even after lower-casing (for example, it contains hyphens or dots, or is longer than 30 characters). Uppercase alone does not cause this error, because names are lower-cased automatically."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Alias the column in the query to a name that uses only lowercase letters, digits, and underscores, 30 characters or fewer."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rows are skipped."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A row fails client-side validation (for example, an invalid email format or an attributes object larger than 25 kB) and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skip_invalid_records"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Review the job logs for the row index, column, and rule, then correct the source data. Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skip_invalid_records"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," to fail the export instead of skipping rows."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The export is rate limited."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Batch returned ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429 Too Many Requests"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["No action is required. The connector waits at least 5 seconds and retries automatically."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Batch returns ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUCCESS_WITH_PARTIAL_ERRORS"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Batch accepted the request but rejected some records."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Review the per-record diagnostics (bulk index, category, attribute, reason) in the job logs and correct the source data. Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ignore_partial_errors"]}," to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," to fail the export when partial errors occur."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"see-also","__idx":21},"children":["See Also"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://doc.batch.com/developer/api/cep/profiles/mass-update-profile"},"children":["Batch Profile Mass Update API documentation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://doc.batch.com/developer/api/cep/profiles/update#the-attributes-object"},"children":["Batch Profile Attributes specification"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/batch-integration-overview"},"children":["Batch Integration Overview"]}]}]}]},"headings":[{"value":"Batch Export Integration","id":"batch-export-integration","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":"Limitations","id":"limitations","depth":2},{"value":"Create a New Authentication","id":"create-a-new-authentication","depth":2},{"value":"Configure Export Results","id":"configure-export-results","depth":2},{"value":"How the Export Works","id":"how-the-export-works","depth":3},{"value":"Export Parameters","id":"export-parameters","depth":3},{"value":"Data Mapping","id":"data-mapping","depth":3},{"value":"Sync Modes","id":"sync-modes","depth":3},{"value":"Sample Queries","id":"sample-queries","depth":2},{"value":"Profile Attributes Export","id":"profile-attributes-export","depth":3},{"value":"Events Export","id":"events-export","depth":3},{"value":"Schedule the Query Export Jobs (Optional)","id":"schedule-the-query-export-jobs-optional","depth":2},{"value":"(Optional) Schedule Query Export Jobs","id":"optional-schedule-query-export-jobs","depth":3},{"value":"Scheduling your Job Using Treasure Console","id":"scheduling-your-job-using-treasure-console","depth":4},{"value":"Custom cron... Details","id":"custom-cron-details","depth":4},{"value":"Execute the Query","id":"execute-the-query","depth":3},{"value":"Activate a Segment in Audience Studio","id":"activate-a-segment-in-audience-studio","depth":2},{"value":"Configure Export Results in Workflow (Optional)","id":"configure-export-results-in-workflow-optional","depth":2},{"value":"Troubleshooting","id":"troubleshooting","depth":2},{"value":"See Also","id":"see-also","depth":2}],"frontmatter":{"seo":{"title":"Batch Export Integration","description":"Export customer profile data from Treasure AI to the Batch Profile Mass Update API, mapping query result columns to Batch native and custom profile attributes or events."}},"lastModified":"2026-07-01T04:33:57.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/batch-export-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}