> ## Documentation Index
> Fetch the complete documentation index at: https://brightdata-ipv6-release.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> This article describes the options for getting the dataset once the snapshot is ready.

# Delivery options

To set your delivery preferences for the dataset, simply click on the 'Delivery settings' tab:

* Choose file format :

  * JSON

  * NDJSON

  * CSV

  * JSON lines

* Choose how to receive the data :

  * Amazon S3 ([AWS S3 User Role Permissions](/datasets/custom-datasets/delivery-options#aws-s3-user-role-permissions))

  * Google Cloud Storage ([How to find your google cloud Private Key](/datasets/custom-datasets/delivery-options#how-to-find-your-google-cloud-private-key))

  * Google Cloud PubSub

  * Microsoft Azure Storage

  * SFTP/FTP

  * Snowflake ([Snowflake Delivery Configuration Guide](/datasets/custom-datasets/delivery-options#snowflake-delivery-configuration-guide-only-visible-to-agents-and-admins))

<Frame>
  ![](https://brightdata.zendesk.com/hc/article_attachments/22455157046161)
</Frame>

You can also set delivery preferences per snapshot, to do that simply click on the snapshot and then click 'Export', set required storage parameters:

<Frame>
  ![](https://brightdata.zendesk.com/hc/article_attachments/22455157047441)
</Frame>

There is an option to download the dataset directly from the CP by clicking 'download + format' button:

<Frame>
  ![](https://brightdata.zendesk.com/hc/article_attachments/22455219252497)
</Frame>

## AWS S3 User Role Permissions

<Frame>
  <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/aws-s3-user-role-permissions/delivery-strategy.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=0f8c4765a42fd3b69554d138137bb5bf" alt="delivery-strategy.png" width="723" height="244" data-path="images/datasets/delivery-methods/aws-s3-user-role-permissions/delivery-strategy.png" />
</Frame>

To control access to S3 resources, you can use IAM (Identity and Access Management) to create and manage AWS users and their permissions. One way to do this is by creating IAM roles and attaching them to S3 resources.

<Steps>
  <Step title="Create a Policy">
    Go to the "Policies" section in the IAM console

    <Frame>
      <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/aws-s3-user-role-permissions/policies.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=7f46b4c09fd62d891353910ffa92e84c" alt="policies.png" width="288" height="658" data-path="images/datasets/delivery-methods/aws-s3-user-role-permissions/policies.png" />
    </Frame>

    Create a new policy that defines the permissions for the S3 resources you want to grant access to.

    Example of AWS policy:

    ```json theme={null}
    {
    "Version": "2012-10-17",
    "Statement": [
        {
        "Effect": "Allow",
        "Action": [
            "s3:PutObject",
            "s3:GetObject"
        ],
        "Resource": "arn:aws:s3:::NAME-OF-YOUR-BUCKET/*"
        }
    ]
    }
    ```
  </Step>

  <Step title="Create a Role">
    Go to the "Roles" section in the IAM console

    <Frame>
      <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/aws-s3-user-role-permissions/roles.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=889a2052244246e830ba6b4b1c3ecd02" alt="roles.png" width="284" height="654" data-path="images/datasets/delivery-methods/aws-s3-user-role-permissions/roles.png" />
    </Frame>

    Create a new role and specify the policy created in step 1 in the "Permission policies" section.

    Make a note of the ARN of the role, which will be used for delivery credentials. (The ARN will look like `arn:aws:iam::<ROLE_ID>:role/<ROLE_NAME>`)

    Example of User Role:

    ```json theme={null}
    {
    "Version": "2012-10-17",
    "Statement": [
        {
        "Effect": "Allow",
        "Principal": {
            "AWS": "arn:aws:iam::422310177405:role/brd.ec2.zs-dca-delivery"
        },
        "Action": "sts:AssumeRole",
        "Condition": {
            "StringEquals": {
            "sts:ExternalId": "YOUR EXTERNAL ID"
            }
        }
        }
    ]
    }
    ```
  </Step>

  <Step title="Use the ARN of the role">
    In the S3 resources that you want to grant access to, attach the role created in step 2 by using the ARN.
  </Step>
</Steps>

## How to find your Google Cloud Private Key

1. Go to the Google Cloud Platform Console home page - [https://console.cloud.google.com/](https://console.cloud.google.com/)

2. Expand the menu by Google Cloud Platform, and click IAM & Admin.

3. Click **Service accounts**.

<Frame>
  <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/find-your-google-cloud-private-key/service-accounts.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=8102eef19fc05a6b282d19ff1fff59eb" alt="service-accounts.png" width="1823" height="900" data-path="images/datasets/delivery-methods/find-your-google-cloud-private-key/service-accounts.png" />
</Frame>

1. Choose an existing service account from the list or create one.

<Frame>
  <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/find-your-google-cloud-private-key/create-service-account.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=7ed1ebb00eb8e0b21a9d694f2862ee03" alt="create-service-account.png" width="1824" height="894" data-path="images/datasets/delivery-methods/find-your-google-cloud-private-key/create-service-account.png" />
</Frame>

If the button is not visible, create a project first in order to **Create Service Account**.

<Frame>
  <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/find-your-google-cloud-private-key/create-project.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=4629b7c71f8991947050fb3004673872" alt="create-project.png" width="1823" height="896" data-path="images/datasets/delivery-methods/find-your-google-cloud-private-key/create-project.png" />
</Frame>

1. Create the service account by entering the name, ID, and description at the **Create Service Account** process. Then grant the access and create the account.

<Frame>
  <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/find-your-google-cloud-private-key/service-account-details.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=ba64537bdc5f41d409bf6289d9d676f7" alt="service-account-details.png" width="1826" height="905" data-path="images/datasets/delivery-methods/find-your-google-cloud-private-key/service-account-details.png" />
</Frame>

1. Click on Email of the service account.

<Frame>
  <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/find-your-google-cloud-private-key/email.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=297d3c0f5486f4dd5ce87b3eddb4a8fb" alt="email.png" width="1821" height="907" data-path="images/datasets/delivery-methods/find-your-google-cloud-private-key/email.png" />
</Frame>

1. To access the keys, click on the 'KEYS' tab. Click the "Add Key" dropdown and then select 'Create New Key'.

<Frame>
  <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/find-your-google-cloud-private-key/create-new-key.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=399688146ab16ea860b5da8d52cf9688" alt="create-new-key.png" width="1822" height="911" data-path="images/datasets/delivery-methods/find-your-google-cloud-private-key/create-new-key.png" />
</Frame>

1. Choose JSON as the key type.

<Frame>
  <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/find-your-google-cloud-private-key/type-json.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=750a1d4cf8a4ceab54e812947a2db1ff" alt="type-json.png" width="1820" height="909" data-path="images/datasets/delivery-methods/find-your-google-cloud-private-key/type-json.png" />
</Frame>

1. The service account key JSON file is automatically downloaded to your local machine.

2. Copy `private_key` from the downloaded JSON file & Paste it to Data Collector delivery settings.

<Frame>
  <img src="https://mintcdn.com/brightdata-ipv6-release/jPVVH6uR3S930SIA/images/datasets/delivery-methods/find-your-google-cloud-private-key/private-key.png?fit=max&auto=format&n=jPVVH6uR3S930SIA&q=85&s=a3475d1aba49c1d651e0ab681a959b37" alt="private-key.png" width="1639" height="309" data-path="images/datasets/delivery-methods/find-your-google-cloud-private-key/private-key.png" />
</Frame>

## Snowflake Delivery Configuration Guide

<Note>Snowflake configuration is available for 'Datasets' delivery and not available for data collectors (Web Scraper)</Note>

**Getting Started**

In order to allow efficient delivery of Datasets to your Snowflake environment, we provide a step-by-step guide to set it up. Just follow these steps:

<Steps>
  <Step title="Select or Create a Database">
    Firstly, decide if you will use an existing database or create a new one. If you opt for a new database, here's the command you need:

    ```sh theme={null}
    CREATE DATABASE <database>;
    ```

    Remember to replace `<database>` with the name you want for your database.
  </Step>

  <Step title="Select or Create a Schema">
    Decide if you will use an existing schema or create a new one. By default every database has a PUBLIC schema. If you wish to use a different schema, here's the command you need:

    ```sh theme={null}
    CREATE SCHEMA <schema>;
    ```

    Replace `<schema>` with your own schema name.
  </Step>

  <Step title="Select or Create a Warehouse">
    Choose an existing warehouse or create a new one. When creating a new warehouse, consider Snowflake's recommendations for configuring a warehouse specifically for data loading. Use the following command to create a warehouse:

    ```sh theme={null}
    CREATE WAREHOUSE <warehouse>;
    ```

    Replace `<warehouse>` with your desired warehouse name.
  </Step>

  <Step title="Select or Create an Internal Named Stage">
    Next, choose an existing internal named stage or create a new one. To create a new stage, use this command:

    ```sh theme={null}
    CREATE STAGE <stage>;
    ```

    Don't forget to replace `<stage>` with your preferred stage name.
  </Step>

  <Step title="Create a Role">
    You'll need a role that can write to your chosen stage. To create one, use:

    ```sh theme={null}
    CREATE ROLE <role_name>;
    ```

    Change `<role_name>` to your chosen role name.
  </Step>

  <Step title="Grant Warehouse Rights to the Role">
    Now, grant your new role the necessary rights to operate on your chosen warehouse using:

    ```sh theme={null}
    GRANT OPERATE ON WAREHOUSE <warehouse> TO ROLE <role_name>;
    ```

    Remember to replace `<warehouse>` and `<role_name>` with your specific warehouse and role name respectively.
  </Step>

  <Step title="Enable Write Operations on the Stage for the Role">
    To enable your role to write on the stage, use the command:

    ```sh theme={null}
    GRANT WRITE ON STAGE <stage> TO ROLE <role_name>;
    ```

    Again, replace `<stage>` and `<role_name>` with your chosen stage and role names.
  </Step>

  <Step title="Create a BrightData User">
    Next, create a new user for BrightData that will be used to upload data directly into Snowflake. The command is as follows:

    ```sh theme={null}
    create user <user_name>
    PASSWORD = '<password>'
    LOGIN_NAME = <login>
    MUST_CHANGE_PASSWORD = FALSE
    DISABLED = FALSE  
    COMMENT = 'user for BrightData to upload data directly into Snowflake'
    ```

    Replace `<user_name>`, `<password>`, and `<login>` with your chosen username, password, and login name.
  </Step>

  <Step title="Grant Role Privileges to the New User">
    Finally, grant your new user the privileges of the role you created:

    ```sh theme={null}
    GRANT ROLE <role_name> TO USER <user_name>;
    ```

    Replace `<role_name>` and `<user_name>` with your role and user names.
  </Step>

  <Step title="Whitelist IPs">
    If you have an active [Network Policy](https://docs.snowflake.com/en/user-guide/network-policies) applied in your Snowflake account you need to whiltelist following IPs:

    ```sh theme={null}
    ALTER NETWORK POLICY <policy_name>  
    SET ALLOWED_IP_LIST=(  
    <existing_whitelisted_ips>,  
    '35.169.71.210',  
    '34.233.211.38',  
    '44.194.183.74',  
    '54.243.177.151');
    ```

    Replace `<policy_name>` with your network policy name. Replace `<existing_whiltelisted_ips>` with the list of existing whitelisted IPs.

    And that's it! You have now configured your Snowflake environment to receive data from our platform.

    <Note>
      If you have any issues or need further assistance, please contact our support team.

      If you want to learn more about Data Loading Performance and Warehouse Size Considerations [click here](https://docs.snowflake.com/en/user-guide/warehouses-overview#impact-on-data-loading).
    </Note>
  </Step>
</Steps>
