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

fix(ingest/snowflake) - Fixing snowflake url with default region #9443

Merged
merged 11 commits into from
Dec 18, 2023

Conversation

treff7es
Copy link
Contributor

Checklist

  • The PR conforms to DataHub's Contributing Guideline (particularly Commit Message Format)
  • Links to related issues (if applicable)
  • Tests for the changes have been added/updated (if applicable)
  • Docs related to the changes have been added/updated (if applicable). If a new feature has been added a Usage Guide has been added for the same.
  • For any breaking change/potential downtime/deprecation/big changes an entry has been made in Updating DataHub

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Dec 12, 2023
@@ -82,7 +82,7 @@ def create_snowsight_base_url(
if privatelink:
url = f"https://app.{account_locator}.{cloud_region_id}.privatelink.snowflakecomputing.com/"
elif cloud == SNOWFLAKE_DEFAULT_CLOUD:
url = f"https://app.snowflake.com/{cloud_region_id}/{account_locator}/"
url = f"https://app.snowflake.com/{cloud_region_id}.{SNOWFLAKE_DEFAULT_CLOUD}/{account_locator}/"
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like - there is some peculiar behavior in snowflake when it comes to "aws". Please see - https://docs.snowflake.com/en/user-guide/admin-account-identifier#non-vps-account-locator-formats-by-cloud-platform-and-region

.aws is not added in account identifier for some cloud regions in aws - namely - us-west-2, us-east-1, eu-west-1, eu-central-1, ap-southeast-1, ap-southeast-2 . We would need to not append .aws for these regions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, I updated based on this

url_cloud_provider_suffix = f".{cloud}"

if cloud == SnowflakeCloudProvider.AWS:
if cloud_region_id in [
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we please extract these regions list as a constant and mark this constant with the snowflake link -> from where we figured out these ?

Copy link
Collaborator

@mayurinehate mayurinehate left a comment

Choose a reason for hiding this comment

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

lgtm

@hsheth2
Copy link
Collaborator

hsheth2 commented Dec 12, 2023

One lint issue, and also the tests/integration/snowflake/test_snowflake.py::test_snowflake_basic needs to be updated

Skipped 1 files
src/datahub/ingestion/source/snowflake/snowflake_utils.py:10:1: F401 'datahub.ingestion.source.snowflake.constants.SNOWFLAKE_DEFAULT_CLOUD' imported but unused
1     F401 'datahub.ingestion.source.snowflake.constants.SNOWFLAKE_DEFAULT_CLOUD' imported but unused

Fix mssql sqlalchemy python 3.7 deprecation with the latest driver
@hsheth2
Copy link
Collaborator

hsheth2 commented Dec 18, 2023

The airflow test failures are unrelated and will be fixed by #9434

@hsheth2 hsheth2 merged commit 03590a1 into datahub-project:master Dec 18, 2023
50 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ingestion PR or Issue related to the ingestion of metadata
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants