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

adjust pattern for load_seed macro for snowflake #457

Open
tuvaforrest opened this issue May 7, 2024 · 0 comments
Open

adjust pattern for load_seed macro for snowflake #457

tuvaforrest opened this issue May 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@tuvaforrest
Copy link
Contributor

Describe the bug
I think effectively, the pattern for loading to everything except snowflake from s3/gcs is

s3://{uri}/{patten}}.*

where snowflake is

s3://{uri}./{patten}}.

this makes it so if we add another folder with the same prefix that contains the same file, it will get loaded. e.g.

s3://tuva_public_resources/terminology_test/icd_10_cm.csv

will also get loaded in snowflake.

To Reproduce
add a subfolder wtih the same prefix as terminology or value_sets with the same named file in it (but dont really)

Expected behavior
no dupes

Screenshots

Environment

  • Package version (e.g. 0.6.0): 0.8.0
  • Data warehouse (e.g. Snowflake): snowflake

Additional context
I think line 99 of load_seed.sql should be this

pattern = '/{{pattern}}.*';

instead of this

pattern = './{{pattern}}.';

or a better solution may be to add the forward slash to the uri

but we should test a variety of scenarios before adjusting

@tuvaforrest tuvaforrest added the bug Something isn't working label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant