-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
expr/str: add support for json_extract and split
- Loading branch information
1 parent
149d39a
commit 2beb5ba
Showing
10 changed files
with
194 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -348,6 +348,7 @@ schemaless | |
schemas | ||
sdk | ||
secret | ||
sep | ||
signup | ||
signups | ||
sinked | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: Json Extract | ||
order: 0 | ||
status: published | ||
--- | ||
|
||
### Json Extract | ||
|
||
Function to extract a value from a json encoded string using a json path. | ||
|
||
#### Parameters | ||
<Expandable title="path" type="str"> | ||
The json path to use when extracting the value from the json encoded string. | ||
See [this page](https://goessner.net/articles/JsonPath/) for more details on | ||
json path syntax. The extracted value is always returned as a string or None | ||
if the path is not valid/found. | ||
</Expandable> | ||
|
||
<pre snippet="api-reference/expressions/str#json_extract" | ||
status="success" message="Extracting a value from a json encoded string"> | ||
</pre> | ||
|
||
|
||
#### Returns | ||
<Expandable type="Expr"> | ||
Returns an expression object denoting the result of the `json_extract` expression. | ||
The resulting expression is of type `Optional[str]` and more specifically is None | ||
when the base string is None or the path is not found in the json encoded string. | ||
</Expandable> | ||
|
||
|
||
#### Errors | ||
<Expandable title="Use of invalid types"> | ||
The `str` namespace must be invoked on an expression that evaluates to string | ||
or optional of string. | ||
</Expandable> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
title: Split | ||
order: 0 | ||
status: published | ||
--- | ||
|
||
### Split | ||
|
||
Function to split a string into a list of strings using a separator. | ||
|
||
#### Parameters | ||
<Expandable title="sep" type="str"> | ||
The separator string to use when splitting the string. | ||
</Expandable> | ||
|
||
<pre snippet="api-reference/expressions/str#split" | ||
status="success" message="Splitting a string by comma"> | ||
</pre> | ||
|
||
#### Returns | ||
<Expandable type="Expr"> | ||
Returns an expression object denoting the result of the `split` function. | ||
The resulting expression is of type `List[str]` or `Optional[List[str]]` depending on | ||
input being nullable. | ||
</Expandable> | ||
|
||
|
||
#### Errors | ||
<Expandable title="Use of invalid types"> | ||
The `str` namespace must be invoked on an expression that evaluates to string | ||
or optional of string. | ||
</Expandable> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.