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-2543] Execution <> Adapters: Cloning from production #7549

Closed
Tracked by #7301
stu-k opened this issue May 8, 2023 · 5 comments
Closed
Tracked by #7301

[CT-2543] Execution <> Adapters: Cloning from production #7549

stu-k opened this issue May 8, 2023 · 5 comments
Assignees
Labels
Team:Adapters Issues designated for the adapter area of the code

Comments

@stu-k
Copy link
Contributor

stu-k commented May 8, 2023

Description

One of the initiatives that the execution team is taking on in Q2 is cloning from a production environment. The work here is to core to enable core users to clone a schema using zero-copy clones if it is supported by the DWH, and views if is not.

Jeremy currently has a draft PR up that touches the adapter zone of core.

Talk to @stu-k for additional details.

@stu-k stu-k added Team:Execution Team:Adapters Issues designated for the adapter area of the code Refinement Maintainer input needed labels May 8, 2023
@github-actions github-actions bot changed the title Execution <> Adapters: Cloning from production [CT-2543] Execution <> Adapters: Cloning from production May 8, 2023
@ChenyuLInx
Copy link
Contributor

ChenyuLInx commented May 23, 2023

There are 3 functions each adapter need to implement, they are

  • can_clone_tables
  • get_pointer_sql
  • get_clone_table_sql
    Basically these are functions that we have a dispatch macro dbt-core. The default implementation(and some implementation for snowflake) can be found in Jerco's PR linked above.

The work for adapter team would be figure out which functions each adapter need to implement and get them implemented.

@VersusFacit
Copy link
Contributor

VersusFacit commented May 24, 2023

I've read through this, and I think the general strategy makes sense. I'm more concerned about the names we use in the design elements -- I found this quite tricky to get to know as an outsider because of the abstractions we've thus far adopted.

Re: naming matters

state_relation

I find this one to be vague/unintuitive, especially in the Python runtime. Here's my reasoning: With everything I understand currently, I think it's a sister term of target_relation, and the like. I feel like something far more descriptive would be stateful_relation or production_relation really anything that captures the essence that the relation referenced is the state being employed indirectly.

pointer

I take total responsibility that this just might be me, and my own arbitrary sensibilities: I find pointer to be very odd word choice. We're not really pointing at a memory address. Instead, I believe we're referencing an existing relation, and we should thusly name it. Maybe referrant_sql or something like that.

=====

I believe Matt is going to do a more thorough check on the code with how it relates to the adapters, but I like the general design. We're very fortunate that this isn't something DBMSs have felt the need to differentiate in (yet).

@aranke
Copy link
Member

aranke commented Jun 4, 2023

@VersusFacit Good call on naming conventions, I'm very supportive of whatever the adapters team decides is the right nomenclature here.

@jtcohen6 jtcohen6 removed the triage label Jun 6, 2023
@jtcohen6 jtcohen6 assigned aranke and McKnight-42 and unassigned nathaniel-may Jun 21, 2023
@jtcohen6 jtcohen6 removed the Refinement Maintainer input needed label Jun 21, 2023
@jtcohen6
Copy link
Contributor

jtcohen6 commented Jun 21, 2023

@aranke @McKnight-42 Shall we open separate issues to track the implementations / testing in each of:

@jtcohen6
Copy link
Contributor

Merged into all the adapters!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Adapters Issues designated for the adapter area of the code
Projects
None yet
Development

No branches or pull requests

7 participants