-
Notifications
You must be signed in to change notification settings - Fork 367
Updating public docs with Reverse-ETL DB2 source setup guide #7664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
ded4a49
53a2fc0
0fb8cb6
efae4b2
cd96a3a
9f68558
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,70 @@ | ||||||||||||||||||||||
--- | ||||||||||||||||||||||
title: DB2 Reverse ETL Setup | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
--- | ||||||||||||||||||||||
|
||||||||||||||||||||||
Set up DB2 as your Reverse ETL source. | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
At a high level, when you set up DB2 for Reverse ETL, the configured database user must have read permissions on any tables involved in the query, and write permissions on a managed schema (`SEGMENT_REVERSE_ETL`) that Segment uses to track sync progress. Authentication is handled through username and password credentials configured in the Segment app. | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
## Required permissions | ||||||||||||||||||||||
|
||||||||||||||||||||||
In order to run a Reverse ETL sync in a DB2 warehouse, Segment needs the following permissions: | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
* **Permission to read from all tables used in the model** (i.e., the tables included in your SELECT query). | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
* **Permission to create and manage a schema** for tracking sync metadata. | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
* **Permission to create tables in the database**, needed for internal metadata tables. | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
> info "Use a dedicated user for Segment" | ||||||||||||||||||||||
> It's recommended to create a dedicated DB2 user for Segment with access limited to only the relevant schemas and tables. | ||||||||||||||||||||||
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
1. In IBM Cloud, go to your DB2 instance and navigate to **Administration > User management**. | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
2. Click **Add**. | ||||||||||||||||||||||
3. Create a new user with *user* privileges. Make sure to save the username and password—these are needed to configure the Segment | ||||||||||||||||||||||
source connection later. | ||||||||||||||||||||||
Comment on lines
+25
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
> info "" | ||||||||||||||||||||||
> The `SEGMENT_REVERSE_ETL` schema will be created and managed by Segment to track the status of each sync. | ||||||||||||||||||||||
> You can also choose to create this schema yourself by running: | ||||||||||||||||||||||
> `CREATE SCHEMA SEGMENT_REVERSE_ETL` | ||||||||||||||||||||||
> Then grant Segment the appropriate privileges. | ||||||||||||||||||||||
Comment on lines
+29
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
Run the following SQL commands to grant Segment the required permissions: | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where would someone run these commands? Is it in a workbook/workspace/warehouse/etc.? just looking for more context on this step. |
||||||||||||||||||||||
|
||||||||||||||||||||||
```sql | ||||||||||||||||||||||
-- Grant permissions to create and manage objects within the SEGMENT_REVERSE_ETL schema | ||||||||||||||||||||||
GRANT CREATEIN, DROPIN ON SCHEMA SEGMENT_REVERSE_ETL TO USER <username>; | ||||||||||||||||||||||
|
||||||||||||||||||||||
-- Grant permission to create tables in the database | ||||||||||||||||||||||
GRANT CREATETAB ON DATABASE TO USER <username>; | ||||||||||||||||||||||
|
||||||||||||||||||||||
-- Grant read access on each table used in the model | ||||||||||||||||||||||
GRANT SELECT ON TABLE <schema_name>.<table_name> TO USER <username>; | ||||||||||||||||||||||
-- Repeat the above command for all tables involved in your model | ||||||||||||||||||||||
``` | ||||||||||||||||||||||
|
||||||||||||||||||||||
|
||||||||||||||||||||||
## Set Up Guide | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
To set up DB2 as your Reverse ETL source: | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
1. Make sure your DB2 database is network-accessible from [Segment's IPs](/docs/connections/storage/warehouses/faq/#which-ips-should-i-allowlist). | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
2. Open [your Segment workspace](https://app.segment.com/workspaces){:target="_blank"}. | ||||||||||||||||||||||
3. Navigate to **Connections > Sources** then select the **Reverse ETL** tab. | ||||||||||||||||||||||
4. Click **+ Add Reverse ETL source**. | ||||||||||||||||||||||
5. Select **DB2** and click **Add Source**. | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this
Suggested change
|
||||||||||||||||||||||
6. Fill in the DB2 connection settings: | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
* Hostname: `<hostname>` | ||||||||||||||||||||||
* Port: `<port>` | ||||||||||||||||||||||
* Database: `<db_name>` | ||||||||||||||||||||||
* Username: `<segment_db2_user>` | ||||||||||||||||||||||
* Password: `<password>` | ||||||||||||||||||||||
7. Click **Test Connection** to validate the setup. | ||||||||||||||||||||||
8. If the connection is successful, click **Add source**. | ||||||||||||||||||||||
|
||||||||||||||||||||||
After successfully adding your DB2 source, [add a model](/docs/connections/reverse-etl/setup/#step-2-add-a-model) and follow the rest of the steps in the Reverse ETL setup guide. | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -28,6 +28,7 @@ To add your warehouse as a source: | |||||
- [Azure Reverse ETL setup guide](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/azure-setup) | ||||||
- [BigQuery Reverse ETL setup guide](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/bigquery-setup) | ||||||
- [Databricks Reverse ETL setup guide](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/databricks-setup) | ||||||
- [DB2 Reverse ETL setup guide](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/db2-setup) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
- [Postgres Reverse ETL setup guide](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/postgres-setup) | ||||||
- [Redshift Reverse ETL setup guide](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/redshift-setup) | ||||||
- [Snowflake Reverse ETL setup guide](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/snowflake-setup) | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.