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

feat(ingestion/powerbi): DatabricksMultiCloud native query support #11756

Conversation

sid-acryl
Copy link
Collaborator

@sid-acryl sid-acryl commented Oct 30, 2024

  1. Support for parsing M-Query expression
"let\n    Source = Value.NativeQuery(DatabricksMultiCloud.Catalogs(\"abc.com\", \"/sql/1.0/warehouses/sdassa\", [Catalog=\"fake_catalog\", Database=null, EnableAutomaticProxyDiscovery=null]){[Name=\"sales_db\",Kind=\"Database\"]}[Data], \"select * from public.sale_history#(lf)where creation_timestamp  >= getDate(-3)\", null, [EnableFolding=true]),\n    #\"NewTable\" = Table.TransformColumn(Source,{{\"creation_timestamp\", type date}})\nin\n    #\"NewTable\""
  1. Remove ANSI escape character from SQL text before parsing it.
  2. Fix M-Query pattern issues

@github-actions github-actions bot added the ingestion PR or Issue related to the ingestion of metadata label Oct 30, 2024
return None

if (
len(data_access_tokens) >= 13
Copy link
Collaborator

Choose a reason for hiding this comment

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

where are these numbers coming from?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated the code



def test_databricks_multicloud():
q = M_QUERIES[31]
Copy link
Collaborator

Choose a reason for hiding this comment

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

we added two statements above, but only one is tested?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

deleted the duplicate one

): # use Catalog name is database
return tree_function.strip_char(data_access_tokens[5])

return None
Copy link
Collaborator

Choose a reason for hiding this comment

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

overall this method seems extremely brittle

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated the code

@anshbansal anshbansal added the merge-pending-ci A PR that has passed review and should be merged once CI is green. label Nov 12, 2024
@anshbansal anshbansal merged commit 6454ff3 into datahub-project:master Nov 12, 2024
97 of 102 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 merge-pending-ci A PR that has passed review and should be merged once CI is green.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants