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

[CT-297] get_response should always return AdapterResponse #4499

Closed
jtcohen6 opened this issue Dec 16, 2021 · 2 comments · Fixed by #4869
Closed

[CT-297] get_response should always return AdapterResponse #4499

jtcohen6 opened this issue Dec 16, 2021 · 2 comments · Fixed by #4869
Assignees
Labels
adapter_plugins Issues relating to third-party adapter plugins jira Team:Adapters Issues designated for the adapter area of the code tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Milestone

Comments

@jtcohen6
Copy link
Contributor

Split off from #4433:

In v1.1.0, let's enforce that the get_response abstract method must return an AdapterResponse

This will allow us to clear up some tech debt. At its very simplest, an AdapterReponse can just look like the one in dbt-spark:

    @classmethod
    def get_response(cls, cursor) -> AdapterResponse:
        return AdapterResponse(
            _message='OK'
        )

Ideally, of course, an adapter has more interesting information to pass along (number of rows affected, bytes processed, relevant query/job ID, etc).

Let's do this for v1.1.0, with clear communication ahead of time for adapter maintainers, since this does constitute a breaking change.

@jtcohen6 jtcohen6 added adapter_plugins Issues relating to third-party adapter plugins tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality Team:Adapters Issues designated for the adapter area of the code labels Dec 16, 2021
@jtcohen6 jtcohen6 added this to the v1.1.0 milestone Jan 4, 2022
@MartinNowak
Copy link

Sounds great, we've actually forked dbt to hack in logging of BigQuery job links.

@jtcohen6
Copy link
Contributor Author

jtcohen6 commented Feb 4, 2022

@MartinNowak Sounds like you might be interested in dbt-labs/dbt-bigquery#92!

@leahwicz leahwicz added the jira label Feb 28, 2022
@github-actions github-actions bot changed the title get_response should always return AdapterResponse [CT-297] get_response should always return AdapterResponse Feb 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adapter_plugins Issues relating to third-party adapter plugins jira Team:Adapters Issues designated for the adapter area of the code tech_debt Behind-the-scenes changes, with little direct impact on end-user functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants