Skip to content

Commit 600d5fd

Browse files
Carlo JavierGitHub Enterprise
authored andcommitted
Merge pull request #6556 from ens60013/snowflake-batch-updates
Snowflake batch updates
2 parents c3afa1d + 687363a commit 600d5fd

File tree

1 file changed

+43
-40
lines changed

1 file changed

+43
-40
lines changed

help/sources/connectors/databases/snowflake.md

Lines changed: 43 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ exl-id: df066463-1ae6-4ecd-ae0e-fb291cec4bd5
1212
>* By default, the [!DNL Snowflake] source interprets `null` as an empty string. Contact your Adobe representative to ensure that your `null` values are correctly written as `null` in Adobe Experience Platform.
1313
>* For Experience Platform to ingest data, timezones for all table-based batch sources must be configured to UTC. The only time stamp that is supported for the [!DNL Snowflake] source is TIMESTAMP_NTZ with UTC time.
1414
15-
Adobe Experience Platform allows data to be ingested from external sources while providing you with the ability to structure, label, and enhance incoming data using Experience Platform services. You can ingest data from a variety of sources such as Adobe applications, cloud-based storage, databases, and many others.
15+
[!DNL Snowflake] is a cloud-based data warehouse platform designed to enable organizations to store, process, and analyze large volumes of data efficiently. Built to leverage the scalability and flexibility of the cloud, [!DNL Snowflake] supports data integration, advanced analytics, and seamless sharing across teams. As a fully managed service, [!DNL Snowflake] eliminates maintenance complexities common to traditional databases, empowering you to focus on deriving insights and value from your data.
1616

17-
Experience Platform provides support for ingesting data from a third-party database. Experience Platform can connect to different types of databases such as relational, NoSQL, or data warehouses. Support for database providers include [!DNL Snowflake].
17+
You can use the [!DNL Snowflake] source to connect and bring your data from [!DNL Snowflake] to Adobe Experience Platform. Read the documentation below to learn how to set up your [!DNL Snowflake] source and connect to Experience Platform.
1818

1919
## Prerequisites {#prerequisites}
2020

@@ -36,7 +36,7 @@ Provide values for the following credentials to connect [!DNL Snowflake] to Expe
3636

3737
| Credential | Description |
3838
| ---------- | ----------- |
39-
| `account` | An account name uniquely identifies an account within your organization. In this case, you must uniquely identify an account across different [!DNL Snowflake] organizations. To do this, you must prepend your organization name to the account name. For example: `orgname-account_name`. Read the section on [retrieving your [!DNL Snowflake] account identifier](#retrieve-your-account-identifier) for additional guidance. For more information, refer to the [[!DNL Snowflake] documentation](https://docs.snowflake.com/en/user-guide/admin-account-identifier#format-1-preferred-account-name-in-your-organization).|
39+
| `account` | An account name uniquely identifies an account within your organization. In this case, you must uniquely identify an account across different [!DNL Snowflake] organizations. To do this, you must prepend your organization name to the account name. For example: `myorg-myaccount.snowflakecomputing.com`. Read the section on [retrieving your [!DNL Snowflake] account identifier](#retrieve-your-account-identifier) for additional guidance. For more information, refer to the [[!DNL Snowflake] documentation](https://docs.snowflake.com/en/user-guide/admin-account-identifier#format-1-preferred-account-name-in-your-organization).|
4040
| `warehouse` | The [!DNL Snowflake] warehouse manages the query execution process for the application. Each [!DNL Snowflake] warehouse is independent from one another and must be accessed individually when bringing data over to Experience Platform. |
4141
| `database` | The [!DNL Snowflake] database contains the data you want to bring the Experience Platform. |
4242
| `username` | The username for the [!DNL Snowflake] account. |
@@ -50,7 +50,7 @@ To use key-pair authentication, first generate a 2048-bit RSA key pair. Next, pr
5050

5151
| Credential | Description |
5252
| --- | --- |
53-
| `account` | An account name uniquely identifies an account within your organization. In this case, you must uniquely identify an account across different [!DNL Snowflake] organizations. To do this, you must prepend your organization name to the account name. For example: `orgname-account_name`. Read the section on [retrieving your [!DNL Snowflake] account identifier](#retrieve-your-account-identifier) for additional guidance. For more information, refer to the [[!DNL Snowflake] documentation](https://docs.snowflake.com/en/user-guide/admin-account-identifier#format-1-preferred-account-name-in-your-organization). |
53+
| `account` | An account name uniquely identifies an account within your organization. In this case, you must uniquely identify an account across different [!DNL Snowflake] organizations. To do this, you must prepend your organization name to the account name. For example: `myorg-myaccount.snowflakecomputing.com`. Read the section on [retrieving your [!DNL Snowflake] account identifier](#retrieve-your-account-identifier) for additional guidance. For more information, refer to the [[!DNL Snowflake] documentation](https://docs.snowflake.com/en/user-guide/admin-account-identifier#format-1-preferred-account-name-in-your-organization). |
5454
| `username` | The username of your [!DNL Snowflake] account. |
5555
| `privateKey` | The [!DNL Base64-]encoded private key of your [!DNL Snowflake] account. You can generate either encrypted or unencrypted private keys. If you are using an encrypted private key, then you must also provide a private key passphrase when authenticating against Experience Platform. Read the section on [retrieving your private key](#retrieve-your-private-key) for more information. |
5656
| `privateKeyPassphrase` | The private key passphrase is an additional layer of security that you must use when authenticating with an encrypted private key. You are not required to provide the passphrase if you are using an unencrypted private key. |
@@ -84,7 +84,7 @@ To use key-pair authentication, first generate a 2048-bit RSA key pair. Next, pr
8484

8585
| Credential | Description |
8686
| --- | --- |
87-
| `account` | An account name uniquely identifies an account within your organization. In this case, you must uniquely identify an account across different [!DNL Snowflake] organizations. To do this, you must prepend your organization name to the account name. For example: `orgname-account_name`. Read the guide on [retrieving your [!DNL Snowflake] account identifier](#etrieve-your-account-identifier) for additional guidance. For more information, refer to the [[!DNL Snowflake] documentation](https://docs.snowflake.com/en/user-guide/admin-account-identifier#format-1-preferred-account-name-in-your-organization). |
87+
| `account` | An account name uniquely identifies an account within your organization. In this case, you must uniquely identify an account across different [!DNL Snowflake] organizations. To do this, you must prepend your organization name to the account name. For example: `http://myorg-myaccount.snowflakecomputing.com/`. Read the guide on [retrieving your [!DNL Snowflake] account identifier](#etrieve-your-account-identifier) for additional guidance. For more information, refer to the [[!DNL Snowflake] documentation](https://docs.snowflake.com/en/user-guide/admin-account-identifier#format-1-preferred-account-name-in-your-organization). |
8888
| `username` | The username of your [!DNL Snowflake] account. |
8989
| `privateKey` | The private key for your [!DNL Snowflake] user, base64-encoded as a single line with no headers or line breaks. To prepare it, copy the contents of your PEM file, remove the `BEGIN`/`END` lines and all line breaks, then base64-encode the result. Read the section on [retrieving your private key](#retrieve-your-private-key) for more information. **Note:** Encrypted private keys are not currently supported for an AWS connection. |
9090
| `port` | The port number that is used by [!DNL Snowflake] when connecting to a server over the internet. |
@@ -97,66 +97,69 @@ For more information about these values, refer the [[!DNL Snowflake] key-pair au
9797
9898
### Retrieve your account identifier {#retrieve-your-account-identifier}
9999

100-
You must retrieve your account identifier from the [!DNL Snowflake] UI dashboard because you will be using the account identifier to authenticate your [!DNL Snowflake] instance on Experience Platform.
100+
You must retrieve your account identifier from the [!DNL Snowflake] UI dashboard as you will be using this to authenticate your [!DNL Snowflake] instance on Experience Platform.
101101

102102
To retrieve your account identifier:
103103

104-
* Navigate to your account on the [[!DNL Snowflake] application UI dashboard](https://app.snowflake.com/).
105-
* In the left navigation, select **[!DNL Accounts]**, followed by **[!DNL Active Accounts]** from the header.
104+
* Use the [[!DNL Snowflake] application UI dashboard](https://app.snowflake.com/) to access your account.
105+
* In the left navigation, select **[!DNL Accounts]** and then select **[!DNL Active Accounts]** from the header.
106106
* Next, select the information icon and then select and copy the domain name of the current URL.
107107

108108
![The Snowflake UI dashboard with the domain name selected.](../../images/tutorials/create/snowflake/snowflake-dashboard.png)
109109

110-
### Retrieve your private key {#retrieve-your-private-key}
110+
### Generate your RSA key pair
111111

112-
If you are using key-pair authentication for your [!DNL Snowflake] connection, then you must also generate your private key before connecting to Experience Platform.
112+
Use OpenSSL in the command line interface to generate a 2048-bit RSA key pair in PKCS#8 format. It's best practice to create an encrypted private key for security, which will require a passphrase.
113113

114114
>[!BEGINTABS]
115115
116-
>[!TAB Create an encrypted private key]
116+
>[!TAB Generate an encrypted private key]
117117
118118
To generate your encrypted [!DNL Snowflake] private key, run the following command on your terminal:
119119

120-
```shell
121-
openssl genrsa 2048 | openssl pkcs8 -topk8 -v2 des3 -inform PEM -out rsa_key.p8
120+
```bash
121+
openssl genrsa 2048 | openssl pkcs8 -topk8 -v2 des3 -inform PEM -out rsa_key.p8# You will be prompted to enter a passphrase. Store this securely!
122122
```
123123

124-
If successful, you should receive your private key in PEM format.
124+
>[!TAB Generate an unencrypted private key]
125125
126-
```shell
127-
|-----BEGIN ENCRYPTED PRIVATE KEY-----
128-
MIIE6T...
129-
|-----END ENCRYPTED PRIVATE KEY-----
126+
To generate your unencrypted [!DNL Snowflake] private key, run the following command on your terminal:
127+
128+
```bash
129+
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt
130130
```
131131

132-
>[!TAB Create an unencrypted private key]
132+
>[!ENDTABS]
133133
134-
To generate your unencrypted [!DNL Snowflake] private key, run the following command on your terminal:
134+
### Generate a public key from your private key
135135

136-
```shell
137-
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform PEM -out rsa_key.p8 -nocrypt
136+
Next, run the following command in your command line interface to create a public key based on your private key.
137+
138+
```bash
139+
openssl rsa -in rsa_key.p8 -pubout -out rsa_key.pub# You will be prompted to enter the passphrase if the private key is encrypted.
138140
```
139141
140-
If successful, you should receive your private key in PEM format.
142+
### Assign the public key to the [!DNL Snowflake] user
143+
144+
You need to use a [!DNL Snowflake] administrator role (like **SECURITYADMIN**) to associate the generated public key with the [!DNL Snowflake] service user that Experience Platform will use. To retrieve the public key content, open the `rsa_key.pub` file and copy the entire content, excluding the `-----BEGIN PUBLIC KEY----- and -----END PUBLIC KEY-----` lines. Next, execute the following SQL in [!DNL Snowflake]:
141145
142-
```shell
143-
|-----BEGIN PRIVATE KEY-----
144-
MIIE6T...
145-
|-----END PRIVATE KEY-----
146+
```sql
147+
ALTER USER {YOUR_SNOWFLAKE_USERNAME}>SET RSA_PUBLIC_KEY='{PUBLIC_KEY_CONTENT}';
146148
```
147149
148-
>[!ENDTABS]
150+
### Encode the private key in [!DNL Base64]
149151
150-
Next, take your private key and encode it in [!DNL Base64]. Ensure that you do not do any transformations or format conversions on your [!DNL Snowflake] private key. Additionally, you must ensure that there are no trailing newline characters at the end of your private key, before encoding it in [!DNL Base64].
152+
Experience Platform requires the private key to be [!DNL Base64]-encoded and provided as a string during the connection setup. Use a suitable tool or script to encode the contents of the `rsa_key.p8` file into a single [!DNL Base64] string.
151153
152-
### Verify configurations
154+
>[!TIP]
155+
>
156+
>Ensure there are no extra spaces or line breaks, including the header/footer lines `(-----BEGIN ENCRYPTED PRIVATE KEY----- and -----END ENCRYPTED PRIVATE KEY-----)`, before or after the encoding process, as this can cause authentication errors.
153157
154-
Before you can create a source connection for your [!DNL Snowflake] data, you must also ensure that the following configurations are met:
158+
### Verify configurations
155159
156-
* The default warehouse assigned to a given user must be the same as the warehouse that you input when authenticating to Experience Platform.
157-
* The default role assigned to a given user must have access to the same database that you input when authenticating to Experience Platform.
160+
Before creating the [!DNL Snowflake] source connection in Experience Platform, you must ensure that the user's **[!DNL Default Role]** and **[!DNL Default Warehouse]** match the values that your provide in Experience Platform. You can verify these settings in the [!DNL Snowflake] UI using the `DESCRIBE USER {USERNAME}` SQL command.
158161
159-
To verify your role and warehouse:
162+
Alternatively, you can follow the steps below to verify your settings:
160163
161164
* Select **[!DNL Admin]** on the left navigation and then select **[!DNL Users & Roles]**.
162165
* Select the appropriate user and then select the ellipses (`...`) on the top-right corner.
@@ -165,17 +168,17 @@ To verify your role and warehouse:
165168
166169
![The Snowflake UI where you can verify your role and warehouse.](../../images/tutorials/create/snowflake/snowflake-configs.png)
167170
168-
Once successfully encoded, you may then used that [!DNL Base64]-encoded private key on Experience Platform to authenticate your [!DNL Snowflake] account.
171+
## Next steps
169172
170-
The documentation below provides information on how to connect [!DNL Snowflake] to Experience Platform using APIs or the user interface:
173+
With your setup complete, you can now proceed to connect your [!DNL Snowflake] account to Experience Platform. Read the following documentation for more information:
171174
172-
## Connect [!DNL Snowflake] to Experience Platform using APIs
175+
### Connect [!DNL Snowflake] to Experience Platform using APIs
173176
174-
* [Create an Snowflake base connection using the Flow Service API](../../tutorials/api/create/databases/snowflake.md)
177+
* [Connect [!DNL Snowflake] to Experience Platform using the API](../../tutorials/api/create/databases/snowflake.md)
175178
* [Explore data tables using the Flow Service API](../../tutorials/api/explore/tabular.md)
176179
* [Create a dataflow for a database source using the Flow Service API](../../tutorials/api/collect/database-nosql.md)
177180
178-
## Connect [!DNL Snowflake] to Experience Platform using the UI
181+
### Connect [!DNL Snowflake] to Experience Platform using the UI
179182
180-
* [Create a Snowflake source connection in the UI](../../tutorials/ui/create/databases/snowflake.md)
183+
* [Connect [!DNL Snowflake] to Experience Platform using the UI](../../tutorials/ui/create/databases/snowflake.md)
181184
* [Create a dataflow for a database source connection in the UI](../../tutorials/ui/dataflow/databases.md)

0 commit comments

Comments
 (0)