Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mappers): Stream name can now be accessed in __alias__ context of stream maps #2701

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions docs/stream_maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,14 @@ The `Faker` class.
The `Faker` class was deprecated in favor of instance methods on the `fake` object.
:::

#### Built-in Alias Variable Names

- `__stream_name__` - the existing stream name

:::{versionadded} TODO
The `__stream_name__` variable.
:::

#### Automatic Schema Detection

For performance reasons, type detection is performed at runtime using text analysis
Expand Down Expand Up @@ -640,6 +648,36 @@ stream_maps:
Support for stream glob expressions.
:::

### Aliasing two or more streams

The `__alias__` operation has built-in variable `__stream_name__`, representing the original stream.

You can combine this with glob expressions to rename more than one stream:

````{tab} meltano.yml
```yaml
stream_maps:
"*":
__alias__: "__stream_name__ + '_v2'"
```
````

````{tab} JSON
```json
{
"stream_maps": {
"*": {
"__alias__": "__stream_name__ + '_v2'"
}
}
}
```
````

:::{versionadded} TODO
Support for __alias__ expression evaluation.
:::

### Understanding Filters' Affects on Parent-Child Streams

Nested child streams iterations will be skipped if their parent stream has a record-level
Expand Down
Loading