Skip to content

tweak snowflake destination to hide INSERT load method #9982

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

Merged
merged 3 commits into from
Feb 9, 2022

Conversation

subodh1810
Copy link
Contributor

Issue : #9602

In the PR https://github.com/airbytehq/airbyte/pull/8528/files we made INTERNAL LOAD method as default. This PR just hides INSERT load method from spec so that people dont select it any more

@subodh1810 subodh1810 self-assigned this Feb 1, 2022
@subodh1810 subodh1810 changed the title tweak snowflake to hide INSERT load method tweak snowflake destination to hide INSERT load method Feb 1, 2022
@github-actions github-actions bot added the area/connectors Connector related issues label Feb 1, 2022
@sherifnada
Copy link
Contributor

@subodh1810 is it true what's written in the SonarQube that we have zero test coverage on those classes? If so we should create a ticket and send to GL

"additionalProperties": false,
"description": "Uses <pre>INSERT</pre> statements to send batches of records to Snowflake. Easiest (no setup) but not recommended for large production workloads due to slow speed.",
"description": "Please select another option",
Copy link
Contributor

Choose a reason for hiding this comment

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

removing "another" to make it a bit more natural

Suggested change
"description": "Please select another option",
"description": "Select an option",

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"description": "Please select another option",
"description": "This mode has been deprecated. It is now equivalent to the internal staging mode, which is more performant.",

@@ -94,9 +94,9 @@
}
},
{
"title": "Standard Inserts",
Copy link
Contributor

Choose a reason for hiding this comment

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

could you change the order of the options so this is the first in the list? this way it would look like this:
Screen Shot 2022-02-01 at 2 32 40 PM

screenshot obtained using instructions here

@@ -38,11 +37,6 @@ public static DestinationType getTypeFromConfig(final JsonNode config) {
}
}

public static boolean isInternalStaging(final JsonNode config) {
Copy link
Contributor

Choose a reason for hiding this comment

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

this was unused right?

Copy link
Contributor

@tuliren tuliren left a comment

Choose a reason for hiding this comment

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

Showing "Please select another option" is kind of confusing.

Can we delete the insert option completely, and in the backend, just default the mode to internal staging if the loading method is standard (insert)?

@subodh1810
Copy link
Contributor Author

@tuliren if we delete the option then we will have to write a migration to fix the existing configs cause validation would start failing. I am not against that but this seems simpler. If you think we should write a migration am happy to do it

@tuliren
Copy link
Contributor

tuliren commented Feb 3, 2022

Alright, deleting it will cause some UI issue.

Alternatively, we can keep it, but make it equivalent to the staging method. Since the staging method requires no extra config, I think we actually don't need to migrate any existing configs. It works as follows:

  • On the UI, change the description of the standard loading method to "This loading method has been deprecated. When you select this method, the connector will use internal staging."
  • In the backend, whenever type is Standard, we just use staging.

In this way, all existing connections with standard loading method will just use internal staging.

Copy link
Contributor

@tuliren tuliren left a comment

Choose a reason for hiding this comment

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

Sorry, actually this PR already changes the backend to default standard insert to internal staging. Then my proposal is basically the same as what you changed in the PR. My only suggest is to point out in the description that the standard insert method is deprecated and default to internal staging, which is probably less confusing than "select another option".

@@ -94,9 +94,9 @@
}
},
{
"title": "Standard Inserts",
"title": "Please select another option",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"title": "Please select another option",
"title": "Select another option",

@subodh1810 subodh1810 temporarily deployed to more-secrets February 8, 2022 19:58 Inactive
@subodh1810
Copy link
Contributor Author

Tested the spec

Screenshot 2022-02-09 at 1 25 38 AM

@tuliren
Copy link
Contributor

tuliren commented Feb 15, 2022

This change was not versioned and published. I have published a new version with this change in #10297.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/connectors Connector related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants