Skip to content

Commit 08eb0e8

Browse files
committed
[netlify-build] explain DB2 array and json support
1 parent 062de4a commit 08eb0e8

File tree

1 file changed

+16
-0
lines changed
  • src/connections/reverse-etl/reverse-etl-source-setup-guides

1 file changed

+16
-0
lines changed

src/connections/reverse-etl/reverse-etl-source-setup-guides/db2-setup.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,19 @@ To set up Db2 as your Reverse ETL source:
7070
8. If the connection is successful, click **Add source**.
7171

7272
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.
73+
74+
> info "Array and JSON Support"
75+
> Db2 does not have native `ARRAY` or `JSON` data types. Segment provides a simple convention-based workaround:
76+
>
77+
> **JSON columns**
78+
> JSON values can be stored as `VARCHAR` or `CLOB`. Segment will detect them as JSON if the column name (or column alias) ends with `_JSON`.
79+
>
80+
> Example:
81+
> `SELECT data AS data_JSON FROM my_table;`
82+
>
83+
>
84+
> **Array columns**
85+
> Arrays can be represented as `VARCHAR` columns with names ending in `_ARRAY`.
86+
> The value should be either:
87+
> - a JSON-encoded array (e.g. `'["a","b","c"]'`), or
88+
> - a comma-separated string (e.g. `'a,b,c'`).

0 commit comments

Comments
 (0)