Skip to content

Commit

Permalink
Merge branch 'main' into drop_python37_default_support
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarrmondragon authored Oct 11, 2023
2 parents 822a85e + c8ac246 commit 1d96929
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/stream_maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,32 @@ Expressions are defined and parsed using the
accepts most native python expressions and is extended by custom functions which have been declared
within the SDK.

#### Compound Expressions

Starting in version 0.33.0, the SDK supports the use of simple comprehensions, e.g. `[x + 1 for x in [1,2,3]]`. This is a powerful feature which allows you to perform complex transformations on lists of values. For example, you can use comprehensions to filter out values in an array:

````{tab} meltano.yml
```yaml
stream_maps:
users:
id: id
fields: "[f for f in fields if f['key'] != 'age']"
```
````

````{tab} JSON
```json
{
"stream_maps": {
"users": {
"id": "id",
"fields": "[f for f in fields if f['key'] != 'age']"
}
}
}
```
````

### Accessing Stream Properties within Mapping Expressions

By default, all stream properties are made available via the property's given name. For
Expand Down

0 comments on commit 1d96929

Please sign in to comment.