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

Add query recording for adapters which use SQLConnectionManager #195

Merged
merged 6 commits into from
May 14, 2024

Conversation

peterallenwebb
Copy link
Contributor

Resolves, in part, core issue dbt-labs/dbt-core#9669

The overall feature is complex, so see the above issue for details. This PR adds support for the record/replay mechanism for queries executed using the execute() function on SQLConnectionManager. This is just a starting point for more complete record/replay of DWH interaction.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development, and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX

@cla-bot cla-bot bot added the cla:yes label May 3, 2024
Copy link

github-actions bot commented May 3, 2024

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

@peterallenwebb peterallenwebb requested a review from a team as a code owner May 9, 2024 20:49
Copy link
Member

@emmyoop emmyoop left a comment

Choose a reason for hiding this comment

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

Spell checked. Otherwise looks good but you'll need a codeowner to approve.

docs/guides/record_replay.md Outdated Show resolved Hide resolved
docs/guides/record_replay.md Outdated Show resolved Hide resolved
docs/guides/record_replay.md Outdated Show resolved Hide resolved
docs/guides/record_replay.md Outdated Show resolved Hide resolved
docs/guides/record_replay.md Outdated Show resolved Hide resolved
docs/guides/record_replay.md Outdated Show resolved Hide resolved
@peterallenwebb
Copy link
Contributor Author

@colin-rogers-dbt asked a question about performance in a separate channel, which I'll answer here:

This will not have any impact on runtime performance when neither record or replay mode is in use. In those cases, the function annotations simply return the function unmodified, so it as if there was no annotation at all, and runtime behavior should be unchanged.

peterallenwebb and others added 2 commits May 14, 2024 08:55
grammar/spelling

Co-authored-by: Emily Rockman <emily.rockman@dbtlabs.com>
@colin-rogers-dbt colin-rogers-dbt merged commit b0b7d29 into main May 14, 2024
15 checks passed
@colin-rogers-dbt colin-rogers-dbt deleted the paw/record-2 branch May 14, 2024 21:50
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.

None yet

3 participants