Closed MarthaScheffler closed 1 week ago
Hi Martha,
Thanks for your good analysis. I'm currently on holiday (without laptop :)) but I think I know what should be changed.
The issue is coming from line 40 in stream_source.sql. The replace function is replacing the DB name and schema name. But to do it properly it should replace
I will try the fix when I will have access to a laptop 😀
your commit is fixing this issue for me - I have tested it on my project. you can close the issue. thanks!
(will comment on the other issue as well - that's a different one)
Thanks I close the issue
Thanks for sharing this package! I get an error, when
It seems that the database identifier doesn't get compiled correctly.
models/raw/sources.yml
models/raw/inspections_defects.sql
target/compiled/my_project/models/raw/inspections.sql
MARTHA_DEV is my target schema for development, "raw" is the custom schema I defined for all models in the raw folder. So the compiled schema makes sense, but the database is off and should instead be QARMA_DEMO - but apparently the QARMA in there got replaced by the schema name.
I think it comes from the schema replace in here, and similar should happen when the table/schema/database somehow are substrings from each other: https://github.com/arnoN7/dbt-incremental-stream/blob/master/macros/stream_source.sql#L40 but I have no good idea how to solve this.