You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en_US/data-integration/snowflake.md
+91-10Lines changed: 91 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,18 +50,71 @@ For more information, refer to the official [ODBC Driver](https://docs.snowflake
50
50
51
51
#### Linux
52
52
53
-
Run the following script to install the Snowflake ODBC driver and configure the `odbc.ini` file:
54
-
55
-
```
56
-
scripts/install-snowflake-driver.sh
57
-
```
53
+
EMQX provides an [installation script](https://github.com/emqx/emqx/blob/master/scripts/install-snowflake-driver.sh) designed specifically for the quick deployment of the Snowflake ODBC driver on Debian-based systems (such as Ubuntu), along with the required system configuration.
58
54
59
55
::: tip Note
60
56
61
57
This script is for testing only, not a recommendation on how to set up the ODBC driver in production environments. You can refer to the official [installation instructions for Linux](https://docs.snowflake.com/en/developer-guide/odbc/odbc-linux).
62
58
63
59
:::
64
60
61
+
**Run the Installation Script**
62
+
63
+
Copy the `scripts/install-snowflake-driver.sh` script to your local machine. Run `chmod a+x` to make the script executable, and run it with `sudo`:
64
+
65
+
```bash
66
+
chmod a+x scripts/install-snowflake-driver.sh
67
+
sudo ./scripts/install-snowflake-driver.sh
68
+
```
69
+
70
+
The script automatically downloads the Snowflake ODBC `.deb` installation package (e.g., `snowflake-odbc-3.4.1.x86_64.deb`) to the current working directory. It then installs the driver and updates the following system configuration files:
71
+
72
+
-`/etc/odbc.ini`: Adds the Snowflake data source configuration
73
+
-`/etc/odbcinst.ini`: Registers the Snowflake driver path
74
+
75
+
**Sample Configuration**
76
+
77
+
Run the following command to view the configurations in the `/etc/odbc.ini` file:
78
+
79
+
```
80
+
emqx@emqx-0:~$ cat /etc/odbc.ini
81
+
82
+
[snowflake]
83
+
Description=SnowflakeDB
84
+
Driver=SnowflakeDSIIDriver
85
+
Locale=en-US
86
+
PORT=443
87
+
SSL=on
88
+
89
+
[ODBC Data Sources]
90
+
snowflake = SnowflakeDSIIDriver
91
+
```
92
+
93
+
Run the following command to view the configurations in the `/etc/odbcinst.ini` file:
94
+
95
+
```
96
+
emqx@emqx-0:~$ cat /etc/odbcinst.ini
97
+
98
+
[ODBC Driver 18 for SQL Server]
99
+
Description=Microsoft ODBC Driver 18 for SQL Server
To install and configure the Snowflake ODBC driver on macOS, follow these steps:
@@ -108,7 +161,7 @@ To install and configure the Snowflake ODBC driver on macOS, follow these steps:
108
161
109
162
### Create a User Account and Database
110
163
111
-
Once the Snowflake ODBC driver is installed, you need to set up a user account, database, and related resources fordata ingestion. The following credentials will be required later for configuring the connector and Sinkin EMQX:
164
+
Once the Snowflake ODBC driver is installed, you need to set up a user account, database, and related resources fordata ingestion. The following credentials will be required later for configuring the Connector and Sinkin EMQX:
@@ -201,18 +254,46 @@ Once the ODBC driver is set up and the RSA key pair is generated, you can set up
201
254
Before adding the Snowflake Sink, you need to create the corresponding connector in EMQX to establish the connection with Snowflake.
202
255
203
256
1. Go to the Dashboard **Integration** ->**Connector** page.
257
+
204
258
2. Click the **Create** button in the top right corner.
259
+
205
260
3. Select **Snowflake** as the connector type and click next.
261
+
206
262
4. Enter the connector name, a combination of upper and lowercase letters and numbers. Here, enter `my-snowflake`.
263
+
207
264
5. Enter the connection information.
208
-
- **Account**: Enter your Snowflake Organization ID and Snowflake account name separated by a dash (`-`), which is part of the URL you use to access the Snowflake platform and can be found in your Snowflake console.
209
265
- **Server Host**: The server host is the Snowflake endpoint URL, typically in the format `<Your Snowflake Organization ID>-<Your Snowflake Account Name>.snowflakecomputing.com`. You need to replace `<Your Snowflake Organization ID>-<Your Snowflake Account Name>` with the subdomain specific to your Snowflake instance.
266
+
210
267
- **Data Source Name(DSN)**: Enter `snowflake`, which corresponds to the DSN configured in the `.odbc.ini` file during ODBC driver setup.
268
+
269
+
- **Account**: Enter your Snowflake Organization ID and Snowflake account name separated by a dash (`-`), which is part of the URL you use to access the Snowflake platform and can be found in your Snowflake console.
270
+
211
271
- **Username**: Enter `snowpipeuser`, as defined during the previous setup process.
212
-
- **Password**: Enter `Snowpipeuser99`, as defined during the previous setup process.
272
+
273
+
- **Password**: The password for authenticating with Snowflake via ODBC using username/password authentication. This field is optional:
274
+
275
+
- You may enter the password here, e.g., `Snowpipeuser99`, as defined during the previous setup process;
276
+
- Or configure it in`/etc/odbc.ini`;
277
+
- If using key-pair authentication instead, leave this field blank.
278
+
279
+
::: tip
280
+
281
+
Use either Password or Private Key forauthentication, not both. If neither is configured here, ensure the appropriate credentials are setin`/etc/odbc.ini`.
282
+
283
+
:::
284
+
285
+
- **Proxy**: Configuration settings for connecting to Snowflake through an HTTP proxy server. HTTPS proxies are **not** supported. By default, no proxy is used. To enable proxy support, selectthe`Enable Proxy` and provide the following:
286
+
- **Proxy Host**: The hostname or IP address of the proxy server.
287
+
- **Proxy Port**: The port number used by the proxy server.
288
+
- **Private Key Path**: The absolute file path to the private RSA key used for authenticating with Snowflake via ODBC. This path must be the same on all nodes of the cluster. The path must begin with `file://`, for example: `file:///etc/emqx/certs/snowflake_rsa_key.private.pem`.
289
+
- **Private Key Password**: The password used to decrypt the private RSA key file, if the key is encrypted. Leave this field blank if the key was generated without encryption (i.e., with the `-nocrypt` option in OpenSSL).
290
+
213
291
6. If you want to establish an encrypted connection, click the **Enable TLS** toggle switch. For more information about TLS connection, see [TLS for External Resource Access](../network/overview.md/#tls-for-external-resource-access).
214
-
6. Advanced settings (optional): See [Advanced Settings](#advanced-settings).
215
-
6. Before clicking **Create**, you can click **Test Connectivity** to testif the connector can connect to the Snowflake.
292
+
293
+
7. Advanced settings (optional): See [Advanced Settings](#advanced-settings).
294
+
295
+
8. Before clicking **Create**, you can click **Test Connectivity** to testif the connector can connect to the Snowflake.
296
+
216
297
7. Click the **Create** button at the bottom to complete the connector creation.
217
298
218
299
You have now completed the connector creation and can proceed to create a rule and Sink to specify how the data will be written into Snowflake.
0 commit comments