-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Move data type macros into dbt-core #5428
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look at this PR plus this one. Both look awesome! Ready to rock in my opinion. 👍
So now it seems like we'd do the following:
- Merge this PR (you)
- Merge that PR (me)
Opened dbt-labs/docs.getdbt.com#1644 to handle the relevant documentation updates and assigned to myself.
-- This will return 'text' by default | ||
-- On Postgres + Snowflake, that's equivalent to varchar (no size) | ||
-- Redshift will treat that as varchar(256) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaving these comments in, unless anyone feels strongly that they should be removed before merging. (They can always be removed after merging.)
@dbeatty10 Thanks for the quick review! Next steps:
|
* Move data type macros into dbt-core * Changelog entry * Code quality checks. Fix type_float
* Move data type macros into dbt-core * Changelog entry * Code quality checks. Fix type_float
type_*
macros to use built-in adapter capabilities dbt-utils#598Description
type_{X}
macros fromdbt-utils
intodbt-core
. In almost all cases, these macros are just a sugarier interface forapi.Column.translate_type
, which leverages built-in type capabilitiesAfter some back-and-forth on what the right interface ought to be, we've landed on keeping the existing one. Users can confidently access a "string" type for data type casting, by calling macro named
type_string
, which returns the correct word for string (text
,varchar
, etc) on that databaseChecklist
changie new
to create a changelog entry