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 snowflake to application parameter to configuration #1266

Merged
merged 13 commits into from
Apr 24, 2024

Conversation

sultaniman
Copy link
Contributor

@sultaniman sultaniman commented Apr 23, 2024

To allow snowflake to track users using dlt we need to pass application parameter as query parameter.

If the value is set to skip we do not include it (some users might want to disable). @rudolfix wdyt?
Will use "" as a way to skip the addition of application parameter.

Config example

[destination.snowflake.credentials]
application="some identifier"

Resolves: #1257

@sultaniman sultaniman self-assigned this Apr 23, 2024
Copy link

netlify bot commented Apr 23, 2024

Deploy Preview for dlt-hub-docs ready!

Name Link
🔨 Latest commit 874c08b
🔍 Latest deploy log https://app.netlify.com/sites/dlt-hub-docs/deploys/6629024d43e6cd0008e7624b
😎 Deploy Preview https://deploy-preview-1266--dlt-hub-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@rudolfix rudolfix left a comment

Choose a reason for hiding this comment

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

  1. did we pick a name for our application?
  2. I think we should mention that we send it in our docs for snowflake...

@@ -49,6 +49,9 @@ def _read_private_key(private_key: str, password: Optional[str] = None) -> bytes
)


snowflake_application_id = "dltHub_dlt"
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this the application id we picked for dlt? @VioletM ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I would make the var uppercase and import it into the test so we don't have any magic strings there

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

dlt/destinations/impl/snowflake/configuration.py Outdated Show resolved Hide resolved
dlt/destinations/impl/snowflake/configuration.py Outdated Show resolved Hide resolved
@sultaniman sultaniman requested a review from VioletM April 23, 2024 14:30
@@ -39,11 +39,18 @@ username = "loader"
host = "kgiotue-wn98412"
warehouse = "COMPUTE_WH"
role = "DLT_LOADER_ROLE"
application = "dltHub_dlt"
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we should put it here, because for most users it's not relevant and it just will be a default value.

Copy link
Contributor Author

@sultaniman sultaniman Apr 24, 2024

Choose a reason for hiding this comment

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

Got it I will remove this :)

Copy link
Contributor

@VioletM VioletM left a comment

Choose a reason for hiding this comment

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

Otherwise a small comment LGTM!

Copy link
Collaborator

@rudolfix rudolfix left a comment

Choose a reason for hiding this comment

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

LGTM! but now tests must pass

@rudolfix rudolfix merged commit 5d296bc into devel Apr 24, 2024
48 checks passed
@rudolfix rudolfix deleted the feat/snowflake-partner-identifier branch April 24, 2024 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configurable partner identifiers for snowflake and motherduck
4 participants