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
Clarify "setting.aliases" behavior - in relation to previous "env_alias" #3135
Comments
@tayloramurphy - This doesn't appear to be critical for the launch. Can we push this back to |
@aaronsteers I've updated the issue with the scope we decided in the GitLab issue. If those changes don't require a breaking change then I think we could release it in a 2.1. What say you? |
@tayloramurphy To confirm, we will only read from alias env vars, not write them into the execution environment as was suggested in #3433? That would mean we still have this issue when migrating from one variant to another: https://gitlab.com/meltano/meltano/-/issues/3518#note_959538073, that I also ran into in meltano/files-dbt#16 (comment). But perhaps that's not common enough to support. |
@tayloramurphy I ran into what I think is a bug with Then when I run Similarly, |
That would be the implementation plan, yes. But the goal with aliases would be to provide that layer so that when you have - name: default_target_schema
label: Default Target Schema
aliases: [schema] you could set
@DouweM that's definitely a bug! |
@tayloramurphy and @aaronsteers -- After spending some time diving into this and testing out the behavior this afternoon, I think I may have lost track of this issue in the GitHub migration and it actually is resolved already. Everything seems to work basically as outlined in the scope that's in the issue description right now, I think this was for the most part resolved in this PR, which was migrated over from GitLab and which also had some changes for another issue. So should I consider the scope of this issue just to resolve the bug that @DouweM pointed out and ensure that aliases don't get passed through as environment variables to the execution environment for plugins? |
@cjohnhanson To be clear, I think the behaviors of Defer to @tayloramurphy for the actual spec, though. |
@cjohnhanson I tested this a bit locally on 2.0.3. plugins:
extractors:
- name: tap-github
variant: singer-io
pip_url: tap-github
settings:
- name: default_target_schema
label: Default Target Schema
aliases: [schema, other_env]
then running config again shows If I then set
Which is not ideal behavior. In reality we have 2 environment variables set and the behavior should be to compare if multiple of the environment variables are set regardless of their actual values. In testing Douwe's comment in #3135 (comment) I think that is actually sorted out and the behavior around where a setting actually gets placed will be clarified in: The scope of this issue then is the following:
@cjohnhanson am I missing anything there? @aaronsteers I'd like your eyes on this as well. |
@tayloramurphy thanks, that totally clears things up. |
Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/3209
Originally created by @aaronsteers on 2022-02-02 21:42:27
As raised today (
2022-02-02
) in office hours, there is a benefit toenv_aliases
in that they can be used to ease migration across forks of the same tap or target.I wanted to propose, along the same vein, aWe havesetting_alias
which would work as follows:settings.aliases
capability which in theory could work at a higher abstraction level:meltano.yml
config:
blocks instead of the original name.TARGET_SNOWFLAKE_ACCOUNT
could be used in place ofTARGET_SNOWFLAKE_SNOWFLAKE_ACCOUNT
.The setting 'SNOWFLAKE_ACCOUNT' was provided along with its alias name 'ACCOUNT', which is not permitted. Please specify 'SNOWFLAKE_ACCOUNT' or 'ACCOUNT' but not both.
Caveats
Potential added benefit for user onboarding and switching between variants
There could be added benefit to aliases, in that certain cross-implementation representations could be implemented by Meltano (and other orchestrators) generically. Many taps have common config settings but are each subject to variations in naming.
Example config options which would make good candidates for generic and cross-implementation aliases:
account
username
password
port
auth_token
refresh_token
client_secret
host
s3_bucket
hard_delete
target_schema_name
target_db_name
If we allowed the Hub entry to declare any of these aliases/forms of settings in the hub metadata, then orchestrators could leverage this info, and also (back to one of the original benefits of
env_aliases
), users could swap between variants without having to fully rewrite their config - at least not for those core elements that variants would have in common.Benefits for dbt abstraction
Downstream tools like
dbt
generally need a small number of variables related to where the data will land. Having common aliases for these functionally-significant parameters would allow Meltano to inject values and/or read values from those important settings. So, for instance, Meltano could know which setting names have the aliasestarget_schema_name
andtarget_db_name
, then we can use that to pass the values along to dbt for identifying the source of a transformation.Update 2022-06-03
The scope of this is to clarify the behavior with setting aliases. Discussed in the GitLab issue we decided on:
name
and any of the values in the settingaliases
arrayThe text was updated successfully, but these errors were encountered: