{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Google Cloud Storage Export V2 Integration","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":"google-cloud-storage-export-v2-integration","__idx":0},"children":["Google Cloud Storage Export V2 Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can write job results directly to your Google Cloud Storage."]},{"$$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, including ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["TD Toolbelt"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["A Google Cloud Platform account with specific permissions"]}]},{"$$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":3,"id":"obtain-the-destination-bucket-in-google-cloud-storage","__idx":3},"children":["Obtain the Destination Bucket in Google Cloud Storage"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["List the Cloud Storage buckets. They are ordered in the list lexicographically by name."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To list the buckets in a project:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the Cloud Storage browser in the Google Cloud Console."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select Cloud Storage on the left menu then choose Buckets"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_8.f2477a540ce86f84fcce77b22f568b25265e7e0da618489bb31770b24972d066.74434350.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Buckets that are part of the currently selected project, appear in the browser list."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"optionally-create-the-destination-bucket-in-google-cloud-storage","__idx":4},"children":["Optionally Create the Destination Bucket in Google Cloud Storage"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To create a new storage bucket:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Open the Cloud Storage browser in the Google Cloud Console."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create bucket"]}," to open the bucket creation form."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_9.41b626a3319ad2aca0022f40b6996bff18f0a4a35a53385b9c8ac309b95e9c90.74434350.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Enter your bucket information and select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]}," to complete each step:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Specify a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Name"]},", subject to the bucket name requirements."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Location type"]}," and ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Location"]}," where the bucket data will be permanently stored."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Default storage class"]}," for the bucket. The default storage class is assigned by default to all objects uploaded to the bucket."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Select an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Access control"]}," model to determine how you control access to the bucket's objects. To support Workload Identity Federation please choose ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Uniform"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_1.b8400fdb899deb619c7911366518f74298a44f437ca5091d7fba887012e6c2a6.74434350.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Optionally, you can set Data protection and Data encryption."]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create"]},"."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"obtain-the-google-json-credentials","__idx":5},"children":["Obtain the Google JSON Credentials"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The integration with Google Cloud Storage is based on server-to-server API authentication."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The Service Account used to generate the JSON Credentials must have Storage Object User permissions."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Visit your Google Developer Console."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select Credentials under APIs & Services at the left menu."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_2.d96a9f7dec347056740ae90fc6866fbc6c78f9d9b5d1a999dc0a3663452e4f1f.74434350.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select Create credentials then choose Service account:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_3.6a564dc9b561061e0b5fa0f783c196f3585cd3309c397bd56f2e713dce828210.74434350.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["From Permissions add Storage Object User Role."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"obtain-application-default-credentials-adc-keyfile","__idx":6},"children":["Obtain Application Default Credentials (ADC) Keyfile"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select create pool under IAM & Admin / Workload Identity Pools or choose existing Pool"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_5.b29c6dbd8144a5c1208953a7129b820e778c43284075c479a9ebd04dc834d2a8.74434350.png","alt":""},"children":[]}," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_4.8c6962bc70473778e721ddf4e7e6ae5c7c2e9cb26bc8510be8f55a328670d354.74434350.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add an AWS provider with account ID ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["523683666290"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_6.3e3283ca2462b5e616ca1ffa6d5b2cc5a76b0b6327e096428c01db5d5cb40652.74434350.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["From Configure provider attributes click Add mapping. Add attribute with name ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["attribute.account"]}," and value ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["assertion.account"]}," then Save"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["From Workload Identity Pools select created pool then select Download config from Connected service accounts"," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_7.9399e7b93f7f9b6239278e8f87af939fc11f0fd1c06199569a5394340e6090c3.74434350.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select AWS provider that created for account ID ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["523683666290"]}," then click Download and store config file (Application default credential keyfile)."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"grant-aws-provider-permission-to-access-destination-bucket","__idx":7},"children":["Grant AWS provider permission to access destination bucket"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select destination bucket from your buckets list then click permissions tab"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Click on Grant access then add Principals value ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["principalSet://iam.googleapis.com/projects/{PROJECT_NUMBER}/locations/global/workloadIdentityPools/{POOL_ID}/attribute.account/523683666290"]}," with roles Storage Object User"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_10.2c69560a43e6aa632bf83ee8b04441e42c3fbd8926f1c820cfc9c0f44116736a.74434350.png","alt":""},"children":[]}," ",{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_11.61fd4999a78444d32248ae89c67881555f3005de4825f1cb24b01b129f8b35c1.74434350.png","alt":""},"children":[]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"use-the-treasure-console-to-create-your-connection","__idx":8},"children":["Use the Treasure Console to Create Your Connection"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"create-a-new-authentication","__idx":9},"children":["Create a New Authentication"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In Treasure Data, you must create and configure the data connection before running your query. As part of the data connection, you provide authentication to access the integration."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Open ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Treasure Console"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","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":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Search for and select Google Cloud Storage V2."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_12.4c53928180751cb2fe12c8abe6bbd276c87d3670b1bb12c494840f482ad9caa7.74434350.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Create Authentication"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Choose Authentication Method and input the credentials."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_13.cb9ab21dd436bcf45f8846088a5ffa3e8ef4b4c42592817d868907667d46bf4c.74434350.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Type a name for your connection."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Continue"]},"."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"define-your-query","__idx":10},"children":["Define your Query"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Complete the instructions in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/batch/export/creating-a-destination-integration"},"children":["Creating a Destination Integration"]},"."]}]},{"$$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":["Select a query for which you would like to export data."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run the query to validate the result set."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Export Results"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select an existing integration authentication."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_15.1c74570eefcf79f633e3ab3bec247ede3394d9cc9a5255a108c797b55dfeed2e.74434350.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Define any additional Export Results details. In your export integration content, review the integration parameters. For example, your Export Results screen might be different, or you might not have additional details to fill out."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_14.f25fe76be733bc2aa2870a3048be84583db32cea8b9bce3d3aebcea9236d313e.74434350.png","alt":""},"children":[]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Select ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Done"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Run your query."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Validate that your data moved to the destination you specified."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"integration-parameters-for-googlecloudstorage","__idx":11},"children":["Integration Parameters for Google Cloud Storage"]},{"$$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":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mandatory"},"children":["Mandatory"]},{"$$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":["Bucket"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google Cloud Storage bucket name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["File Path"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Object path, including the filename. Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/filename.csv"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Content type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MIME type of the output file. Default value: application/octet-stream"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Format"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output file format. Default value: csv"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Encoders"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Compression applied to the exported file. Default value: none"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Public Key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes if Encoders is PGP Encryption"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The public key to use for encryption."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Key Identifier"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no, only apply if Encoders is PGP Encryption"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Key ID or Fingerprint (as a hexadecimal string) of the public key used for encryption"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Armor"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no, only apply if Encoders is PGP Encryption"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether to use ASCII armor or not (as a hexadecimal string) of the public key used for encryption"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Compression Type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no, only apply if Encoders is PGP Encryption"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Specifies the compression algorithm to be used for compressing the file. Default value: none"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Header line?"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Write the header line with column names as the first line. Default value: true"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Delimiter"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Character used to separate columns. Default value: Default"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Null string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Substitution string for NULL values. Default value: Default"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["End-of-line character"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Line termination character. Default value: CRLF"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"example-query","__idx":12},"children":["Example Query"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"sql","header":{"controls":{"copy":{}}},"source":"SELECT \n  col_1\nFROM \n  tbl \nWHERE col_1 != 'email'\n","lang":"sql"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"validating-export-results","__idx":13},"children":["Validating Export Results"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Upon successful completion of the query, the results are automatically imported to the specified Google Cloud Storage destination:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/gcs_v2_16.20e88d749df90fa6376351d0cdbe4e628d255ab5d27d0a0d06ed8b0c7c529b71.74434350.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"activate-a-segment-in-audience-studio","__idx":14},"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":"exporting-data-from-google-cloud-storage-v2-cli","__idx":15},"children":["Exporting Data from Google Cloud Storage V2 CLI"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following command allows you to set a scheduled query that sends query results to Google Cloud Storage."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["With authentication mode JSONKey"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Specify your JSON key in the following sample syntax."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use backslash to break a line without breaking the code syntax."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"'{\"type\":\"gcs_v2\",\"bucket\":\"samplebucket\",\"file_path\":\"output/test.csv\",\"format\":\"csv\",\"compression\":\"none\",\"header_line\":false,\"delimiter\":\",\",\"null_string\":\"\",\"newline\":\"CRLF\",\"auth_method\":\"json_key\",\"json_keyfile\":\"{\\\"private_key_id\\\": \\\"ABCDEFGHIJ\\\", \\\"private_key\\\": \\\"-----BEGIN PRIVATE KEY-----\\\\nABCDEFGHIJ\\\\ABCDEFGHIJ\\\\n-----END PRIVATE KEY-----\\\\n\\\", \\\"client_email\\\": \\\"ABCDEFGHIJ@developer.gserviceaccount.com\\\", \\\"client_id\\\": \\\"ABCDEFGHIJ.apps.googleusercontent.com\\\", \\\"type\\\": \\\"service_account\\\"}\"}'\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["With authentication mode Workload Identity Federation"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Specify your ADC key in the following sample syntax."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Use backslash to break a line without breaking the code syntax."]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"'{\"type\":\"gcs_v2\",\"bucket\":\"samplebucket\",\"file_path\":\"output/test.csv\",\"format\":\"csv\",\"compression\":\"none\",\"header_line\":false,\"delimiter\":\",\",\"null_string\":\"\",\"newline\":\"CRLF\",\"auth_method\":\"wif\",\"adc_keyfile\":\"{\\\"universe_domain\\\": \\\"googleapis.com\\\"......}\"}'\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example,"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td sched:create scheduled_gcs_v2 \"10 6 * * *\" \\\n-d dataconnector_db \"SELECT id,account,purchase,comment,time FROM data_connectors\" \\\n-r '{\"type\":\"gcs_v2\",\"bucket\":\"samplebucket\",\"file_path\":\"output/test.csv\",\"format\":\"csv\",\"compression\":\"none\",\"header_line\":false,\"delimiter\":\",\",\"null_string\":\"\",\"newline\":\"CRLF\",\"auth_method\":\"json_key\",\"json_keyfile\":\"{\\\"private_key_id\\\": \\\"ABCDEFGHIJ\\\", \\\"private_key\\\": \\\"-----BEGIN PRIVATE KEY-----\\\\nABCDEFGHIJ\\\\ABCDEFGHIJ\\\\n-----END PRIVATE KEY-----\\\\n\\\", \\\"client_email\\\": \\\"ABCDEFGHIJ@developer.gserviceaccount.com\\\", \\\"client_id\\\": \\\"ABCDEFGHIJ.apps.googleusercontent.com\\\", \\\"type\\\": \\\"service_account\\\"}\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["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":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Data Type"},"children":["Data Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Mandatory"},"children":["Mandatory"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default Value"},"children":["Default 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":["bucket"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google Cloud Storage bucket name"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["file_path"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Object path , including the filename. Example: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["path/to/filename.csv"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["content_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["application/octet-stream"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MIME type of the output file."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["format"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["csv"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output file format. Supported values: csv/tsv"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["compression"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["none"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Compression applied to the exported file. Supported values: 'none', 'gz', 'bzip2', 'encrypt_pgp'"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["public_key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes if compression is encrypt_pgp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The public key to use for encryption."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["key_identifier"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no, only apply if compression is encrypt_pgp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The Key ID or Fingerprint (as a hexadecimal string) of the public key used for encryption"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["armor"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no, only apply if compression is encrypt_pgp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Whether to use ASCII armor or not (as a hexadecimal string) of the public key used for encryption"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["compression_type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no, only apply if compression is encrypt_pgp"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["N/A"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Specifies the compression algorithm to be used for compressing the file. Supported values: 'none', 'gzip', 'bzip2', 'bzip2_built_in', 'zip_built_in', 'zlib_built_in'"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["header_line"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["true"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Write the header line with column names as the first line. Supported values: true/false"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["delimiter"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["default"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Character used to separate columns. Supported values: 'default', ',', '\\t', '|'"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null_string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["default"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Substitution string for NULL values (string, optional). Supported values: 'default', '', '\\N', 'NULL', 'null'"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["newline"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["string"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CRLF"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Line termination character (string, optional).  Supported values: 'CRLF', 'LF', 'CR'"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"other-configurations","__idx":16},"children":["Other configurations"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The Result Export can be ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/queries/scheduled/scheduling-a-query"},"children":["scheduled"]}," to upload data to a target destination periodically."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["All import and export integrations can be added to a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/workflows"},"children":["Treasure Workflow"]},". The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["td"]}," workflow operator can be used to export a query result to a specified connector. For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/data-workbench/workflows/operators"},"children":["Workflow Operators"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"references","__idx":17},"children":["References"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/int/embulk-encoder-encryption-pgp"},"children":["The Embulk-encoder-Encryption document"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"faq-for-the-gcs-v2-data-connector","__idx":18},"children":["FAQ for the GCS V2 Data Connector"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Note: Please ensure that you compress your file before encrypting and uploading."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you decrypt using non-built-in encryption, the file will return to a compressed format such as .gz or .bz2."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When you decrypt using built-in encryption, the file will return to raw data."]}]}]}]},"headings":[{"value":"Google Cloud Storage Export V2 Integration","id":"google-cloud-storage-export-v2-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":"Obtain the Destination Bucket in Google Cloud Storage","id":"obtain-the-destination-bucket-in-google-cloud-storage","depth":3},{"value":"Optionally Create the Destination Bucket in Google Cloud Storage","id":"optionally-create-the-destination-bucket-in-google-cloud-storage","depth":3},{"value":"Obtain the Google JSON Credentials","id":"obtain-the-google-json-credentials","depth":3},{"value":"Obtain Application Default Credentials (ADC) Keyfile","id":"obtain-application-default-credentials-adc-keyfile","depth":3},{"value":"Grant AWS provider permission to access destination bucket","id":"grant-aws-provider-permission-to-access-destination-bucket","depth":3},{"value":"Use the Treasure Console to Create Your Connection","id":"use-the-treasure-console-to-create-your-connection","depth":2},{"value":"Create a New Authentication","id":"create-a-new-authentication","depth":3},{"value":"Define your Query","id":"define-your-query","depth":2},{"value":"Integration Parameters for Google Cloud Storage","id":"integration-parameters-for-googlecloudstorage","depth":3},{"value":"Example Query","id":"example-query","depth":3},{"value":"Validating Export Results","id":"validating-export-results","depth":3},{"value":"Activate a Segment in Audience Studio","id":"activate-a-segment-in-audience-studio","depth":2},{"value":"Exporting Data from Google Cloud Storage V2 CLI","id":"exporting-data-from-google-cloud-storage-v2-cli","depth":2},{"value":"Other configurations","id":"other-configurations","depth":2},{"value":"References","id":"references","depth":2},{"value":"FAQ for the GCS V2 Data Connector","id":"faq-for-the-gcs-v2-data-connector","depth":2}],"frontmatter":{"seo":{"title":"Google Cloud Storage Export V2 Integration"}},"lastModified":"2026-06-01T09:09:59.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/google-cloud-storage-export-v2-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}