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: src/connections/reverse-etl/reverse-etl-source-setup-guides/db2-setup.md
+17-13Lines changed: 17 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -10,57 +10,61 @@ At a high level, when you set up DB2 for Reverse ETL, the configured database us
10
10
11
11
## Required permissions
12
12
13
-
In order to run a Reverse-ETL sync in a DB2 warehouse, Segment needs the following permissions:
13
+
In order to run a ReverseETL sync in a DB2 warehouse, Segment needs the following permissions:
14
14
15
-
1.**Permission to read from all tables used in the model** (i.e., the tables included in your SELECT query).
16
-
2.**Permission to create and manage a schema** for tracking sync metadata.
15
+
***Permission to read from all tables used in the model** (i.e., the tables included in your SELECT query).
16
+
***Permission to create and manage a schema** for tracking sync metadata.
17
+
***Permission to create tables in the database**, needed for internal metadata tables.
17
18
18
19
19
20
> info "Use a dedicated user for Segment"
20
21
> It's recommended to create a dedicated DB2 user for Segment with access limited to only the relevant schemas and tables.
21
22
22
-
1.Open the Db2 warehouse and navigate to**Administration > User management**.
23
+
1.In IBM Cloud, go to your DB2 instance and navigate to **Administration > User management**.
23
24
2. Click **Add**.
24
-
3. Create a new user with *user* privileges. Make sure you save the username and password, as these are required to set up the Segment configuration in a later step.
25
+
3. Create a new user with *user* privileges. Make sure to save the username and password—these are needed to configure the Segment
26
+
source connection later.
25
27
26
28
27
29
> info ""
28
30
> The `SEGMENT_REVERSE_ETL` schema will be created and managed by Segment to track the status of each sync.
29
31
> You can also choose to create this schema yourself by running:
30
32
> `CREATE SCHEMA SEGMENT_REVERSE_ETL`
31
-
> and explicitly grant Segment privileges on it.
33
+
> Then grant Segment the appropriate privileges.
32
34
33
35
34
36
35
-
Run the below SQL commands to grant Segment the required permissions:
37
+
Run the following SQL commands to grant Segment the required permissions:
36
38
37
39
```sql
38
-
-- Grant permissions to create manage objects within the SEGMENT_REVERSE_ETL schema
40
+
-- Grant permissions to create and manage objects within the SEGMENT_REVERSE_ETL schema
39
41
GRANT CREATEIN, DROPIN ON SCHEMA SEGMENT_REVERSE_ETL TO USER <username>;
42
+
43
+
-- Grant permission to create tables in the database
40
44
GRANT CREATETAB ON DATABASE TO USER <username>;
41
45
42
46
-- Grant read access on each table used in the model
43
47
GRANTSELECTON TABLE <schema_name>.<table_name> TO USER <username>;
48
+
-- Repeat the above command for all tables involved in your model
44
49
```
45
50
46
51
47
-
## Set up guide
52
+
## Set Up Guide
48
53
49
54
To set up DB2 as your Reverse ETL source:
50
55
51
56
1. Make sure your DB2 database is network-accessible from [Segment's IPs](/docs/connections/storage/warehouses/faq/#which-ips-should-i-allowlist).
52
57
2. Open [your Segment workspace](https://app.segment.com/workspaces){:target="_blank"}.
53
-
3. Navigate to **Connections > Sources**and select the **Reverse ETL** tab.
58
+
3. Navigate to **Connections > Sources**then select the **Reverse ETL** tab.
54
59
4. Click **+ Add Reverse ETL source**.
55
60
5. Select **DB2** and click **Add Source**.
56
-
6.Enter the configuration settings for your DB2 source:
61
+
6.Fill in the DB2 connection settings:
57
62
* Hostname: `<hostname>`
58
63
* Port: `<port>`
59
64
* Database: `<db_name>`
60
65
* Username: `<segment_db2_user>`
61
66
* Password: `<password>`
62
-
* Schema [optional]: If not specified, Segment will use the user’s default schema
63
67
7. Click **Test Connection** to validate the setup.
64
68
8. If the connection is successful, click **Add source**.
65
69
66
-
After you've successfully added 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.
70
+
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.
0 commit comments