Incremental snapshot sql fails on postgres 9.6 on dbt >= 0.17.0
See original GitHub issueDescribe the bug
Incremental snapshots do not work on Postgres 9.6
Steps To Reproduce
Create a snapshot using DBT when using a Postgres 9.6 database, and then attempt an incremental snapshot (i.e. run dbt snapshot twice) Error received of
failed to find conversion function from unknown to text
This is a regression of https://github.com/fishtown-analytics/dbt/issues/1665 Another user has identified on the slack that this was caused by https://github.com/fishtown-analytics/dbt/pull/2390 due to the union using non-casted fields introducing the issue in dbt 0.17.0
Expected behavior
DBT incremental snapshots should not throw an error on Postgres 9.6
System information
Which database are you using dbt with?
- postgres
- redshift
- bigquery
- snowflake
- other (specify: ____________)
The output of dbt --version
:
Affects dbt >= 0.17.0
Additional context
Whilst I appreciate that this is for a unsupported “legacy” version of Postgres, I hope to be able to personally contribute to introduce to the Postgres plugin the equivalent fix as was introduced in https://github.com/fishtown-analytics/dbt/issues/1665 which should extend the life/support of dbt on 9.6 until it’s designated EoL of Nov 2021
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
@jtcohen6 Thanks! Yes, as far as I can tell, it simply just requires the updating of these three lines which are causing the issue. Creating the dispatched adapter macro for string literal sounds like a very sensible approach - I was trying to think of ways which didn’t involve changing large amounts of code, and I think this is the most elegant way
I need to confirm if I can find time to set up the environment/sign contributors form etc, and then I should hopefully be able to a) test that this approach fixes the issue and b) contribute it in a PR
Thanks for your help!
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please remove the stale label or comment on the issue, or it will be closed in 7 days.