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: configurable target schema change settings by default #1781

Open
pnadolny13 opened this issue Jun 21, 2023 · 7 comments · May be fixed by #2504
Open

feat: configurable target schema change settings by default #1781

pnadolny13 opened this issue Jun 21, 2023 · 7 comments · May be fixed by #2504
Milestone

Comments

@pnadolny13
Copy link
Contributor

The target sdk sql connector class has allow_column_alter which is set by the target developer in the connector implementation. We should make this a configuration option thats available to the user by default. It will let us have a consistent enum of options available to the user with a consistent config name instead of letting each developer implement it themselves in slightly different ways.

Copy link

stale bot commented Jun 20, 2024

This has been marked as stale because it is unassigned, and has not had recent activity. It will be closed after 21 days if no further activity occurs. If this should never go stale, please add the evergreen label, or request that it be added.

@stale stale bot added the stale label Jun 20, 2024
@pnadolny13
Copy link
Contributor Author

Still relevant. @edgarrmondragon this might be something we want to have available as an option in Arch so having a way to control it externally would be nice eventually.

@stale stale bot removed the stale label Jun 21, 2024
@edgarrmondragon
Copy link
Collaborator

Still relevant. @edgarrmondragon this might be something we want to have available as an option in Arch so having a way to control it externally would be nice eventually.

Makes sense. Should be pretty quick to implement too fwiw.

@edgarrmondragon
Copy link
Collaborator

@edgarrmondragon edgarrmondragon modified the milestones: v0.43, v0.44 Dec 3, 2024
@atrauzzi
Copy link

Would love to be able to modify my schemas outside of meltano and just have meltano "bootstrap" schemas, and then adjust accordingly as I manage things on my end.

Load it all in as text initially for example, but if I come and change it to int later, just roll with it and follow the new rule(s).

@edgarrmondragon
Copy link
Collaborator

Would love to be able to modify my schemas outside of meltano and just have meltano "bootstrap" schemas, and then adjust accordingly as I manage things on my end.

Load it all in as text initially for example, but if I come and change it to int later, just roll with it and follow the new rule(s).

Thanks for your input @atrauzzi! That makes me think we would need 3 schema update modes:

  • adapt: the incoming type takes priority and the existing column type is updated
  • preserve (your suggestion): the existing type takes priority and the incoming type is ignored
  • fail: if there's a mismatch between the incoming and existing types, we fail

Wdyt @pnadolny13?

@atrauzzi
Copy link

atrauzzi commented Dec 18, 2024

Yeah that sounds good. The overall goal in my scenarios are to not have to configure my schema explicitly in meltano. Instead, I want to delegate that entirely to meltano. That way if my source data schema changes, I'm not having to make config changes.

I might rename your two options to be a bit more explicit, as the effect can be ambiguous depending on perspective:

  • sync-target-schema
  • prefer-target-schema

Also, two friendly reminders:

  • With prefer-target-schema, I would still rely on meltano to create the newly discovered columns.
  • I might make columns nullable when I'm manually adjusting types. Might be nice if meltano could support that, versus empty strings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants