Skip to content

Commit

Permalink
Update derivations.md with select JSON($flow_document) (#1747)
Browse files Browse the repository at this point in the history
Adding use of `JSON($flow_document)` for selecting all input parameters in a derivation, as per https://estuaryworkspace.slack.com/archives/C03Q9A3GFEE/p1729516762991479
  • Loading branch information
jwhartley authored Nov 1, 2024
1 parent 2a3deff commit 3e059d1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions site/docs/concepts/derivations.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ into JSON arrays or objects and embeds them into the mapped document:
`{"greeting": "hello", "items": [1, "two", 3]}`.
If parsing fails, the raw string is used instead.

If you would like to select all columns of the input collection,
rather than `select *`, use `select JSON($flow_document)`, e.g.
`select JSON($flow_document where $status = open;`.

As a special case if your query selects a _single_ column
having a name that begins with `json` or `JSON`,
as is common when working with SQLite's [JSON functions](https://www.sqlite.org/json1.html),
Expand Down

0 comments on commit 3e059d1

Please sign in to comment.