Comments (1)
Reprex
Create project files as described in dbt-labs/dbt-core#8063.
Then run:
dbt seed && dbt run -s my_model
And get an error like this:
23:28:27 Unhandled error while executing
'data_type'
23:28:27 1 of 1 ERROR creating sql table model dbt_dbeatty_tools.my_model ............... [ERROR in 0.07s]
23:28:28
23:28:28 Finished running 1 table model in 0 hours 0 minutes and 3.88 seconds (3.88s).
23:28:28
23:28:28 Completed with 1 error and 0 warnings:
23:28:28
23:28:28 'data_type'
23:28:28
23:28:28 Done. PASS=0 WARN=0 ERROR=1 SKIP=0 TOTAL=1
There's a full stack trace within logs/dbt.log
, but it wasn't clear to me exactly where the true issue was.
Proposed solution
To match the order in dbt-postgres, dbt-bigquery, and dbt-snowflake, just flip the order of these two lines:
dbt-redshift/dbt/include/redshift/macros/adapters.sql
Lines 51 to 52 in f95c534
It's supposed to be this before this:
{{ get_assert_columns_equivalent(sql) }}
{{ get_table_columns_and_constraints() }}
Nice-to-have
Add some defensive code immediately above here to raise a helpful error message when the data_type
key is not defined:
if not v.get("data_type"):
raise ColumnTypeMissingError([col_name])
from dbt-redshift.
Related Issues (20)
- [ADAP-979] [Bug] Database Error: Only user perm tables supported in producer views HOT 11
- [ADAP-1014] [Bug] Contract enforcement method is not reliable HOT 8
- [ADAP-1022] [Feature] improve handling of disconnect/broken pipe exceptions thrown by redshift-connector
- [ADAP-1030] [Regression] Back-to-back hooks with a transaction using CTAS + DML fails in 1.5+ HOT 8
- [ADAP-1039] [Tests] Add tests for --empty flag
- [ADAP-1040] Refreshing incremental materialized views takes longer than expected HOT 6
- [ADAP-1050] [Bug] Alter materialized view test fails sporadically
- [ADAP-1052] [Feature] Turn off exponential backoff for Redshift connection testing
- [ADAP-1053] [Bug] Tracking common hanging schemas post ci/cd test runs
- [ADAP-1064] [Bug] AWS IAM Assumed Role Authentication Issue in dbt-redshift with Serverless Redshift HOT 3
- [ADAP-1068] 1.2 redshift has an emergent mypy error HOT 1
- [ADAP-1070] [Bug] `latest` and `1.x.latest` tags for ghcr Docker releases are stale HOT 4
- [ADAP-1077] [Drops Table In Separate Transaction] - Tables are dropped then the _tmp table renamed, causing other queries referencing the table to fail HOT 10
- [ADAP-1083] [Feature] Migrate base adapter references as part of core/adapter decoupling
- [ADAP-1086] [Bug] Grants are failing during incremental runs when data shares are present on serverless HOT 1
- [ADAP-1087] [Regression] Loosen redshift-connector pin HOT 5
- [ADAP-1089] [Bug] Server socket closed when running DBT on GitHub Actions HOT 6
- [ADAP-1099] [Bug] Interrupt (CTRL+C) is not cancelling the right query (wrong pid) HOT 2
- [Bug] Runtime Error 'Lexer' object has no attribute '_SQL_REGEX' HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbt-redshift.