Skip to content
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

support dbt v1.2 #6

Merged
merged 31 commits into from Aug 22, 2022
Merged

support dbt v1.2 #6

merged 31 commits into from Aug 22, 2022

Conversation

shiyuhang0
Copy link
Member

@shiyuhang0 shiyuhang0 commented Jul 26, 2022

What problem does this PR solve?

close #2

What is changed and how it works?

  • Lift + shift for cross-db macros
  • Support connection retry
  • Support grant
  • Doc Update

Check List

  • unit test
  • integration test
  • modify doc
  • change source code

@sre-bot
Copy link

sre-bot commented Jul 26, 2022

CLA assistant check
All committers have signed the CLA.

@shiyuhang0 shiyuhang0 changed the title support dbt v1.1 support dbt v1.2 Jul 29, 2022
@shiyuhang0 shiyuhang0 force-pushed the dbt_1.2 branch 6 times, most recently from 6d07b6b to bc039a1 Compare July 29, 2022 06:32
@shiyuhang0 shiyuhang0 changed the title support dbt v1.2 support dbt v1.2:Lift + shift for cross-db macros Jul 29, 2022
@shiyuhang0 shiyuhang0 force-pushed the dbt_1.2 branch 9 times, most recently from 5dcd7b2 to bbad2c1 Compare July 29, 2022 07:23
@shiyuhang0 shiyuhang0 force-pushed the dbt_1.2 branch 7 times, most recently from f79b23b to a8ea83c Compare July 29, 2022 09:57
tests/README.md Outdated Show resolved Hide resolved
tests/README.md Outdated Show resolved Hide resolved
tests/README.md Outdated Show resolved Hide resolved
@shiyuhang0
Copy link
Member Author

resolve the conflicts after #13 merged

# Conflicts:
#	.github/workflows/main.yml
#	README.md
#	dbt/adapters/tidb/connections.py
#	dbt/include/tidb/macros/materializations/snapshot/strategies.sql
#	requirements_dev.txt
#	setup.py
#	tests/README.md
#	tests/conftest.py
#	tests/functional/adapter/tidb/basic/test_tidb.py
#	tests/functional/adapter/tidb4_0/basic/test_tidb.py
#	tests/functional/adapter/tidb5_1/basic/test_tidb.py
@shiyuhang0 shiyuhang0 merged commit ad580d7 into pingcap:main Aug 22, 2022
@@ -6,26 +6,41 @@
{%- endfor -%}))
{%- endmacro %}

{% macro snapshot_check_all_get_existing_columns(node, target_exists) -%}
{%- set query_columns = get_columns_in_query(node['compiled_sql']) -%}
-- copy from dbt-core v1.2, just alter database=None in adapter.get_relation

Choose a reason for hiding this comment

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

@shiyuhang0 what if a relation object never printed the database? would save you from having to override core's version of this macro?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think maybe we can delete this override because I found that the database has been set to None in get_relation.
And I will test if it still works after delete the macro

Copy link
Member Author

Choose a reason for hiding this comment

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

#21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

upgrade to support dbt-core v1.2.0
5 participants