Skip to content

Commit 3106730

Browse files
committed
Access nested data
1 parent f1af0b2 commit 3106730

File tree

1 file changed

+5
-4
lines changed
  • src/connections/destinations/catalog/actions-singlestore

1 file changed

+5
-4
lines changed

src/connections/destinations/catalog/actions-singlestore/index.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,15 @@ Segment writes data to your specified table in SingleStore (by default, this is
5959
| `context` | JSON | The context of the event. Contains user environment information. |
6060

6161

62-
### Accessing data
63-
To query specific data from the Segment event within SingleStore, you can select columns directly. For example, to retrieve the `properties` object:
62+
### Accessing nested data
63+
To query nested information from the `traits`, `context`, or `properties` JSON columns, use the `::` operator to access nested properties within the JSON column. For example:
6464

65+
To extract a property1 from the `properties` column:
6566
```sql
66-
SELECT properties FROM your_table_name;
67+
SELECT properties::property1 AS property_1 FROM <your_table_name>;
6768
```
6869

69-
This query retrieves the `properties` object from the specified table, allowing you to work with event data.
70+
This query allows you to extract specific nested properties from the JSON column for analysis.
7071

7172
## Troubleshooting
7273

0 commit comments

Comments
 (0)