Skip to content

Commit 08b6fe8

Browse files
docs: fix html table to headers (#8053)
* fix html table to headers * Update src/connections/storage/warehouses/schema.md Co-authored-by: forstisabella <92472883+forstisabella@users.noreply.github.com> --------- Co-authored-by: forstisabella <92472883+forstisabella@users.noreply.github.com>
1 parent f02239b commit 08b6fe8

File tree

1 file changed

+53
-73
lines changed

1 file changed

+53
-73
lines changed

src/connections/storage/warehouses/schema.md

Lines changed: 53 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -22,99 +22,79 @@ Segment's libraries pass nested objects and arrays into tracking calls as **prop
2222
- The warehouse connector optionally stringifies **arrays** when they follow the [Ecommerce spec](/docs/connections/spec/ecommerce/v2/)
2323
- The warehouse connector "flattens" all **context fields** that contain a nested **object** (for example, context.field.nestedA.nestedB becomes a column called context_field_nestedA_nestedB)
2424

25-
<table>
26-
<thead>
27-
<tr>
28-
<th> Field </th>
29-
<th> Code (Example) </th>
30-
<th> Schema (Example) </th>
31-
</tr>
32-
</thead>
33-
34-
<tr>
35-
<td><b>Object (Context):</b> Flatten </td>
36-
<td markdown="1">
37-
38-
``` json
39-
context: {
40-
app: {
41-
version: "1.0.0"
25+
### Schema objects
26+
27+
The following examples show how Segment transforms nested objects and arrays into warehouse columns.
28+
29+
#### Context
30+
31+
**Type:** Object
32+
33+
```json
34+
{
35+
"context": {
36+
"app": {
37+
"version": "1.0.0"
38+
}
4239
}
4340
}
4441
```
45-
</td>
46-
<td>
47-
<b>Column Name:</b><br/>
48-
context_app_version
49-
<br/><br/>
50-
<b>Value:</b><br/>
51-
"1.0.0"
52-
</td>
53-
</tr>
54-
55-
<tr>
56-
<td> <b>Object (Traits):</b> Flatten </td>
57-
<td markdown= "1">
42+
43+
Segment flattens nested objects in context fields.
44+
45+
**Result:** Column `context_app_version` with value `"1.0.0"`
46+
47+
#### Traits
48+
49+
**Type:** Object
5850

5951
```json
60-
traits: {
61-
address: {
62-
street: "6th Street"
52+
{
53+
"traits": {
54+
"address": {
55+
"street": "6th Street"
56+
}
6357
}
6458
}
6559
```
6660

67-
</td>
68-
<td>
69-
<b>Column Name:</b><br/>
70-
address_street<br/>
71-
<br/>
72-
<b>Value:</b><br/>
73-
"6th Street"
74-
</td>
75-
</tr>
61+
Segment flattens nested objects in traits.
7662

77-
<tr>
78-
<td><b>Object (Properties):</b> Flatten</td>
79-
<td markdown="1">
63+
**Result:** Column `address_street` with value `"6th Street"`
64+
65+
#### Properties
66+
67+
**Type:** Object
8068

8169
```json
82-
properties: {
83-
product_id: {
84-
sku: "G-32"
70+
{
71+
"properties": {
72+
"product_id": {
73+
"sku": "G-32"
74+
}
8575
}
8676
}
8777
```
88-
</td>
89-
<td>
90-
<b>Column Name:</b><br/>
91-
product_id_sku<br/><br/>
92-
<b>Value:</b><br/>
93-
"G-32"
94-
</td>
95-
</tr>
96-
97-
<tr>
98-
<td><b>Array (Any):</b> Stringify</td>
99-
<td markdown="1">
78+
79+
Segment flattens nested objects in properties.
80+
81+
**Result:** Column `product_id_sku` with value `"G-32"`
82+
83+
#### Array (String)
84+
85+
**Type**: String array
10086

10187
```json
102-
products: {
103-
product_id: [
104-
"507f1", "505bd"
105-
]
88+
{
89+
"products": {
90+
"product_id": ["507f1", "505bd"]
91+
}
10692
}
10793
```
10894

109-
</td>
110-
<td>
111-
<b>Column Name:</b> <br/>
112-
product_id <br/><br/>
113-
<b>Value:</b>
114-
"[507f1, 505bd]"
115-
</td>
116-
</tr>
117-
</table>
95+
Segment stringifes arrays.
96+
97+
**Result:** Column `product_id` with value `"[507f1, 505bd]"`
11898

11999
## Warehouse tables
120100

0 commit comments

Comments
 (0)