-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add explicit support for flattening features (#103)
- Loading branch information
1 parent
935f76c
commit 8a8ac88
Showing
9 changed files
with
102 additions
and
16 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
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 |
---|---|---|
|
@@ -12,7 +12,37 @@ This mapper plugin is fully compliant with the Singer Spec and can be placed in | |
|
||
For a collection of examples, take a look at [examples/README.md](examples/README.md). | ||
|
||
Here's one of them!: | ||
## Settings | ||
|
||
| Setting | Required | Default | Description | | ||
|:--------------------|:--------:|:-------:|:------------| | ||
| stream_maps | True | None | Stream maps | | ||
| flattening_enabled | False | None | 'True' to enable schema flattening and automatically expand nested properties. | | ||
| flattening_max_depth| False | None | The max depth to flatten schemas. | | ||
| stream_map_config | False | None | User-defined config values to be used within map expressions. | | ||
|
||
A full list of supported settings and capabilities is available by running: `meltano-map-transformer --about` | ||
|
||
## Installation | ||
|
||
We recommend using GitHub release tags when installing with `pip`. We also recommend using `pipx` or `meltano` instead of installing with `pip` directly. | ||
|
||
You can see a full list of published releases [here](https://github.com/MeltanoLabs/meltano-map-transform/releases). | ||
|
||
For example: | ||
|
||
``` | ||
# Update the below with the latest published release: | ||
# https://github.com/MeltanoLabs/meltano-map-transform/releases | ||
# Install with pip, ideally in a new virtual environment to avoid conflicts: | ||
pip install git+https://github.com/MeltanoLabs/[email protected] | ||
# Or better yet, use `pipx` so that virtual environments are managed automatically: | ||
pipx install git+https://github.com/MeltanoLabs/[email protected] | ||
``` | ||
|
||
### Meltano installation instructions | ||
|
||
1. Add this plugin to your Meltano project | ||
|
||
|
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,9 @@ | ||
{"type": "SCHEMA", "stream": "people", "schema": {"required": ["id"], "type": "object", "properties": {"id": {"type": "integer"}, "name": {"type": "string"}, "address": {"type": "object", "properties": {"street": {"type": "string"}, "city": {"type": "string"}, "state": {"type": "string"}, "zip": {"type": "string"}, "coordinates": {"type": "object", "properties": {"latitude": {"type": "number"}, "longitude": {"type": "number"}}}}}}}} | ||
{"type": "RECORD", "stream": "people", "record": {"id": 1, "name": "Jane Doe", "address": {"street": "456 Elm St", "city": "Smallville", "state": "NY", "zip": "67890", "coordinates": {"latitude": 40.758896, "longitude": -73.985130}}}} | ||
{"type": "RECORD", "stream": "people", "record": {"id": 2, "name": "John Smith", "address": {"street": "789 Oak Ave", "city": "Metropolis", "state": "IL", "zip": "54321", "coordinates": {"latitude": 41.878114, "longitude": -87.629799}}}} | ||
{"type": "RECORD", "stream": "people", "record": {"id": 3, "name": "Jane Smith", "address": {"street": "246 Maple St", "city": "Gotham", "state": "NY", "zip": "11111", "coordinates": {"latitude": 40.712776, "longitude": -74.005974}}}} | ||
{"type": "RECORD", "stream": "people", "record": {"id": 4, "name": "John Doe", "address": {"street": "369 Pine Rd", "city": "Central City", "state": "CA", "zip": "22222", "coordinates": {"latitude": 37.7749, "longitude": -122.4194}}}} | ||
{"type": "RECORD", "stream": "people", "record": {"id": 5, "name": "Jane Wilson", "address": {"street": "159 Cedar Blvd", "city": "Star City", "state": "IL", "zip": "33333", "coordinates": {"latitude": 41.872389, "longitude": -87.650047}}}} | ||
{"type": "RECORD", "stream": "people", "record": {"id": 6, "name": "John Wilson", "address": {"street": "753 Maple Ave", "city": "Coast City", "state": "CA", "zip": "44444", "coordinates": {"latitude": 34.052235, "longitude": -118.243683}}}} | ||
{"type": "RECORD", "stream": "people", "record": {"id": 7, "name": "Jane Johnson", "address": {"street": "369 Oak St", "city": "Gotham", "state": "NY", "zip": "55555", "coordinates": {"latitude": 40.712776, "longitude": -74.005974}}}} | ||
{"type": "RECORD", "stream": "people", "record": {"id": 8, "name": "John Johnson", "address": {"street": "159 Elm Rd", "city": "Central City", "state": "CA", "zip": "66666", "coordinates": {"latitude": 37.7749, "longitude": -122.4194}}}} |
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,22 @@ | ||
{ | ||
"plugin_type": "extractors", | ||
"name": "tap-smoke-test", | ||
"namespace": "tap_smoke_test", | ||
"label": "tap-smoke-test", | ||
"pip_url": "git+https://github.com/meltano/tap-smoke-test.git", | ||
"executable": "tap-smoke-test", | ||
"capabilities": [ | ||
"discover", | ||
"catalog" | ||
], | ||
"settings": [ | ||
{ | ||
"name": "schema_inference_record_count", | ||
"kind": "integer" | ||
}, | ||
{ | ||
"name": "streams", | ||
"kind": "array" | ||
} | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,3 @@ | ||
#!/bin/sh | ||
|
||
cat fixtures/people.singer |