Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add include_data_types flag to generate_source macro #76

Merged
merged 18 commits into from
Dec 21, 2022

Conversation

GSokol
Copy link
Contributor

@GSokol GSokol commented Aug 17, 2022

This is a:

  • bug fix PR with no breaking changes — please ensure the base branch is main
  • new functionality — please ensure the base branch is the latest dev/ branch
  • a breaking change — please ensure the base branch is the latest dev/ branch

Description & motivation

Closes #75

Checklist

  • I have verified that these changes work locally
  • I have updated the README.md (if applicable)
  • I have added tests & descriptions to my models (and macros if applicable)
  • I have added an entry to CHANGELOG.md

@GSokol
Copy link
Contributor Author

GSokol commented Aug 24, 2022

@clrcrl or @matt-winkler, could you please take a look?

@GSokol
Copy link
Contributor Author

GSokol commented Aug 29, 2022

Maybe, @dbeatty10 could take a look?

Copy link
Contributor

@dbeatty10 dbeatty10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GSokol makes sense for codegen to have an option to include the optional data_type metadata field -- thanks for opening!

I added some comments on some implementation details for the integration tests for you to explore. Could you take a look and see if any of them work?

Your current implementation is reasonable with a small footprint, and we can move forward with it if my suggested ideas all end up being dead-ends.

GSokol added 7 commits August 31, 2022 18:09
I've tried several approaches to generate the exact text, but it's not
working. So returninig tests to
dbt-labs@3a1267b
state.
@GSokol GSokol requested a review from dbeatty10 December 8, 2022 20:02
Copy link
Contributor

@dbeatty10 dbeatty10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work on this @GSokol ! 🚀

@dbeatty10 dbeatty10 merged commit c77d28e into dbt-labs:main Dec 21, 2022
jeremyholtzman pushed a commit that referenced this pull request Apr 10, 2023
* Add include_data_types flag to generate_source macro

* Add test for include_data_types

* Fix test_generate_source_all_args for Redshift

* Fix test_generate_source_all_args for Snowflake

* Fix int types test_generate_source_all_args for Snowflake

* Fix test_generate_source_all_args for BigQuery

* Fix typo

* Fix typo

* trying to avoid db-specific type defenitions

* Dummy fix

* Dummy fix

* Dummy fix

* Dummy fix

* Revert to initial schema

I've tried several approaches to generate the exact text, but it's not
working. So returninig tests to
3a1267b
state.

* Example of generating data types for columns

* Update changelog

* Remove comment [skip ci]

Co-authored-by: Doug Beatty <doug.beatty@dbtlabs.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add data_type to columns
2 participants