-
Notifications
You must be signed in to change notification settings - Fork 71
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
bug: property-level aliases/renaming doesn't appear to work #2545
Comments
Hi @kcphila! Thanks for logging. This format, with nested column properties is not actually supported mappers:
- name: meltano-map-transformer
variant: meltano
pip_url: git+https://github.com/MeltanoLabs/meltano-map-transform.git
mappings:
- name: lower-case-schema
config:
stream_maps:
{STREAM_NAME}:
__alias__: {new-table-name}
{COLUMN-PROPERTY}:
__alias__: {new-property-name} so I'm curious if you found an example like it in the docs, or whether you were following similar patterns for other Meltano settings.
Is the workaround not good enough for your use case? If so, what are you missing that's not supported by the "copy and delete" approach? |
Hi @edgarrmondragon, Thanks for the quick response. There weren't code examples of the nested column format (aside from some "this would be nice" in feature requests), but the two main The copy/delete is doable (especially since it looks like config:
stream_maps:
{STREAM_NAME}:
__meta__[col['name'].lower()]: col |
I'm just encountering this myself, too. Property-level aliasing is listed as a feature, but I don't see how it can be configured. I am using the "copy and delete" approach to make things work. |
I think the request in #2545 (comment) is now supported with a combination of "copy-and-delete" and glob expressions (7eebef9). To document:
|
Meltano Version
3.0.0
Python Version
3.10
Bug scope
CLI (options, error messages, logging, etc.)
Operating System
Linux - 20.04
Description
Multiple core docs specify that properties can be renamed with mappers:
meltano mappers guide
documentation indicates, in the Property (Column) Level, section, thatAliasing: properties can be renamed in the resulting stream e.g. altering a column name from id -> customer_id
Property-level aliasing: properties can be renamed in the resulting stream.
However, in v3.0.0, either this no longer works or all documentation that provides examples have been lost, as I searched through the docs as well as the source code for both the SDK and the
meltano-map-transform
plugin.For example, for a config file that looks like :
The stream/table name is renamed but the property/column is not. There is a partial work around to make a copy of the column and then delete the old column.
Sorry if this isn't quite a "bug" or if issues with the mapper belong somewhere else - it was not clear where communication / contribution streams are or go (and Slack is unfortunately blocked at my workplace).
Code
The text was updated successfully, but these errors were encountered: