|
| 1 | +# Connect Data Warehouse |
| 2 | + |
| 3 | +**Goal:** Connect your data warehouse to Recce Cloud to enable data diffing on PRs. |
| 4 | + |
| 5 | +Recce Cloud supports **[Snowflake](#connect-snowflake), [Databricks](#connect-databricks), [BigQuery](#connect-bigquery), and [Redshift](connect-redshift)**. Using a different warehouse? Contact us at support@reccehq.com. |
| 6 | + |
| 7 | +## Prerequisites |
| 8 | + |
| 9 | +- [x] Warehouse credentials with read access |
| 10 | +- [x] Network access configured (IP whitelisting if required) |
| 11 | + |
| 12 | +## Security |
| 13 | + |
| 14 | +Recce Cloud queries your warehouse directly to compare Base and Current environments. Recce encrypts and stores credentials securely. Read-only access is sufficient for all data diffing features. |
| 15 | + |
| 16 | +## Connect Snowflake |
| 17 | + |
| 18 | +### Option 1: Username/Password |
| 19 | + |
| 20 | +| Field | Description | Example | |
| 21 | +|-------|-------------|---------| |
| 22 | +| Account | Snowflake account identifier | `xxxxxx.us-central1.gcp` | |
| 23 | +| Username | Database username | `MY_USER` | |
| 24 | +| Password | Database password | `my_password` | |
| 25 | +| Role | Role with read access | `ANALYST_ROLE` | |
| 26 | +| Warehouse | Compute warehouse name | `WH_LOAD` | |
| 27 | + |
| 28 | +### Option 2: Key Pair Authentication |
| 29 | + |
| 30 | +| Field | Description | Example | |
| 31 | +|-------|-------------|---------| |
| 32 | +| Account | Snowflake account identifier | `xxxxxx.us-central1.gcp` | |
| 33 | +| Username | Service account username | `MY_USER` | |
| 34 | +| Private Key | PEM-formatted private key | `-----BEGIN RSA PRIVATE KEY-----...` | |
| 35 | +| Passphrase | Key passphrase (if encrypted) | `my_passphrase` | |
| 36 | +| Role | Role with read access | `ANALYST_ROLE` | |
| 37 | +| Warehouse | Compute warehouse name | `WH_LOAD` | |
| 38 | + |
| 39 | +## Connect Databricks |
| 40 | + |
| 41 | +### Option 1: Personal Access Token |
| 42 | + |
| 43 | +| Field | Description | Example | |
| 44 | +|-------|-------------|---------| |
| 45 | +| Host | Workspace URL | `adb-1234567890123456.7.azuredatabricks.net` | |
| 46 | +| HTTP Path | SQL warehouse path | `/sql/1.0/warehouses/abc123def456` | |
| 47 | +| Token | Personal access token | `dapiXXXXXXXXXXXXXXXXXXXXXXX` | |
| 48 | +| Catalog | Unity Catalog name (optional) | `my_catalog` | |
| 49 | + |
| 50 | +### Option 2: OAuth (M2M) |
| 51 | + |
| 52 | +| Field | Description | Example | |
| 53 | +|-------|-------------|---------| |
| 54 | +| Host | Workspace URL | `adb-1234567890123456.7.azuredatabricks.net` | |
| 55 | +| HTTP Path | SQL warehouse path | `/sql/1.0/warehouses/abc123def456` | |
| 56 | +| Client ID | Service principal client ID | `12345678-1234-1234-1234-123456789012` | |
| 57 | +| Client Secret | Service principal secret | `dose1234567890abcdef` | |
| 58 | +| Catalog | Unity Catalog name (optional) | `my_catalog` | |
| 59 | + |
| 60 | + |
| 61 | +> **Note**: OAuth M2M is auto-enabled in Databricks accounts. For setup details, see [dbt Databricks setup](https://docs.getdbt.com/docs/core/connect-data-platform/databricks-setup#oauth-machine-to-machine-m2m-authentication). |
| 62 | +
|
| 63 | +## Connect BigQuery |
| 64 | + |
| 65 | +| Field | Description | Example | |
| 66 | +|-------|-------------|---------| |
| 67 | +| Project | GCP project ID | `my-gcp-project-123456` | |
| 68 | +| Service Account JSON | Full JSON key file contents | `{"type": "service_account", ...}` | |
| 69 | + |
| 70 | + |
| 71 | +> **Note**: For authentication, we currently provide support for service account JSON only. More details [here](https://docs.getdbt.com/docs/core/connect-data-platform/bigquery-setup#service-account-json). |
| 72 | +
|
| 73 | +## Connect Redshift |
| 74 | + |
| 75 | +| Field | Description | Example | |
| 76 | +|-------|-------------|---------| |
| 77 | +| Host | Cluster endpoint | `my-cluster.abc123xyz.us-west-2.redshift.amazonaws.com` | |
| 78 | +| Port | Database port | `5439` (Default) | |
| 79 | +| Database | Database name | `analytics_db` | |
| 80 | +| Username | Database user | `admin_user` | |
| 81 | +| Password | Database password | `my_password` | |
| 82 | + |
| 83 | + |
| 84 | +> **Note**: We currently support Database (Password-based authentication) only. More details [here](https://docs.getdbt.com/docs/core/connect-data-platform/redshift-setup#authentication-parameters). |
| 85 | +
|
| 86 | +## Save Connection |
| 87 | + |
| 88 | +After entering your connection details, click **Save**. Recce Cloud runs a connection test automatically and displays "Connected" on success. |
| 89 | + |
| 90 | +## Verify Success |
| 91 | + |
| 92 | +Navigate to Organization Settings in Recce Cloud. Your data warehouse should appear. |
| 93 | + |
| 94 | +{: .shadow} |
| 95 | + |
| 96 | +## Troubleshooting |
| 97 | + |
| 98 | +| Issue | Solution | |
| 99 | +| --- | --- | |
| 100 | +| Connection refused | Whitelist Recce Cloud IP ranges in your network configuration | |
| 101 | +| Authentication failed | Verify credentials and regenerate if expired | |
| 102 | +| Permission denied on table | Grant SELECT permissions on target schemas | |
| 103 | + |
| 104 | +## Next Steps |
| 105 | + |
| 106 | +- [Add Recce to CI/CD](../7-cicd/setup-ci.md) |
| 107 | +- [Run Your First Data Diff](../5-data-diffing/row-count-diff.md) |
0 commit comments