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

get_response -> AdapterResponse #265

Merged
merged 2 commits into from
Dec 3, 2021
Merged

get_response -> AdapterResponse #265

merged 2 commits into from
Dec 3, 2021

Conversation

jtcohen6
Copy link
Contributor

@jtcohen6 jtcohen6 commented Dec 3, 2021

In core.dbt.adapters.sql.connection, we:

  • Say that get_response is an abstract method which can return Union[AdapterResponse, str]
  • Expect an AdapterResponse (an object with a _message attribute) when we fire SQLQueryStatus, ever since dbt-labs/dbt-core@b3039fd

Before this change, dbt-spark implemented get_response in a super naive way (it just returns a string). This PR changes it to return an AdapterResponse instead, with no functional change.

In dbt-core, we should either:

  • Check the type of the value returned by get_response, then either use it _message attribute (if AdapterResponse) or itself (if str)
  • Enforce that the get_response abstract method must return an AdapterResponse — not a bad change, and it's effectively true, but we should think about waiting for a minor version release with clearer communication ahead of time

@cla-bot cla-bot bot added the cla:yes label Dec 3, 2021
@leahwicz leahwicz merged commit 04d1cd4 into main Dec 3, 2021
@leahwicz leahwicz deleted the fix/get-response branch December 3, 2021 19:47
leahwicz pushed a commit that referenced this pull request Dec 3, 2021
* Return AdapterResponse from get_response

* fix flake
leahwicz added a commit that referenced this pull request Dec 3, 2021
* Refactor seed macros, clearer sql param logging (#250)

* Try refactoring seed macros

* Add changelog entry

* 187: Adding apache hudi support to dbt (#210)

* initial working version

* Rebased and resolve all the merge conflicts.

* Rebased and resolved merge conflicts.

* Removed hudi dep jar and used the released version via packages option

* Added insert overwrite unit tests for hudi

* Used unique_key as default value for hudi primaryKey option

* Updated changelog.md with this new update.

* Final round of testing and few minor fixes

* Fixed lint issues

* Fixed the integration tests

* Fixed the circle ci env to add hudi packages

* Updated hudi spark bundle to use scala 2.11

* Fixed Hudi incremental strategy integration tests and other integration tests

* Fixed the hudi hive sync hms integration test issues

* Added sql HMS config to fix the integration tests.

* Added hudi hive sync mode conf to CI

* Set the hms schema verification to false

* Removed the merge update columns hence its not supported.

* Passed the correct hiveconf to the circle ci build script

* Disabled few incremental tests for spark2 and reverted to spark2 config

* Added hudi configs to the circle ci build script

* Commented out the Hudi integration test until we have the hudi 0.10.0 version

* Fixed the macro which checks the table type.

* Disabled this model since hudi is not supported in databricks runtime, will be added later

* Update profile_template.yml for v1 (#247)

* Update profile_template.yml for v1

* PR feedback, fix indentation issues

* It was my intention to remove the square brackets

* Fixup changelog entry

* Merge main, update changelog

* Bump version to 1.0.0rc2 (#259)

* bumpversion 1.0.0rc2

* Update changelog

* Use pytest-dbt-adapter==0.6.0

* Corrected definition for set full_refresh_mode (#262)

* Replaced definition for set full_refresh_mode

* Updated changelog

* Edit changelog

Co-authored-by: Jeremy Cohen <[email protected]>

* `get_response` -> `AdapterResponse` (#265)

* Return AdapterResponse from get_response

* fix flake

Co-authored-by: Jeremy Cohen <[email protected]>
Co-authored-by: Vinoth Govindarajan <[email protected]>
Co-authored-by: Sindre Grindheim <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants