-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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/powerbi): support each expression in m-query function invocation #7541
fix(ingest/powerbi): support each expression in m-query function invocation #7541
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mostly looking good, just some code cleanliness things
@@ -100,6 +100,8 @@ combine_result | |||
|
|||
`Pattern-1` is supported as it first assign the table from schema to variable and then variable is used in M-Query Table function i.e. Table.Combine | |||
|
|||
Note: If you are using (PowerBI Parameters)[https://learn.microsoft.com/en-us/power-query/power-query-query-parameters]. then avoid using same name for variable in M-Query |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should also add the caveat that we don't support parameters with the admin API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it in Admin Ingestion vs. Basic Ingestion
metadata-ingestion/src/datahub/ingestion/source/powerbi/m_query/tree_function.py
Outdated
Show resolved
Hide resolved
metadata-ingestion/src/datahub/ingestion/source/powerbi/powerbi-lexical-grammar.rule
Outdated
Show resolved
Hide resolved
metadata-ingestion/src/datahub/ingestion/source/powerbi/powerbi-lexical-grammar.rule
Outdated
Show resolved
Hide resolved
…dsiddique/datahub into master+fix-powerbi-bigquery-datasets
metadata-ingestion/src/datahub/ingestion/source/powerbi/powerbi-lexical-grammar.rule
Outdated
Show resolved
Hide resolved
metadata-ingestion/src/datahub/ingestion/source/powerbi/powerbi-lexical-grammar.rule
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewd this LGTM! waiting for final pass from @hsheth2
@@ -304,6 +305,7 @@ unary_expression: type_expression | |||
| "+" unary_expression | |||
| "_" unary_expression | |||
| "not" unary_expression | |||
| expression |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice - so this broadens the definition so that unary expression can be any type of expression?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep - this isn't strictly correct because it can cause incorrect order of operations in the AST (e.g. addition before multiplication or something), but we don't really care about that here
@@ -432,17 +434,7 @@ optional_parameter: "optional" WS_INLINE parameter | |||
|
|||
each_expression: "each" WS_INLINE each_expression_body | |||
|
|||
// relational_expression rule is different then relational expression used in below grammar to resolve "each" construct | |||
each_expression_body: function_body |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in simple terms - why are we able to remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the addition to unary operator makes this one work correctly
# This is the case where they reference a variable using | ||
# the `#"Name of variable"` syntax. | ||
# the `#"Name of variable"` or `Variable` syntax. It can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the previous assert doing here? No purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this broadens it from quoted_identifier -> identifier (which includes regular_identifier)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
…cation (datahub-project#7541) Co-authored-by: MohdSiddiqueBagwan <mohdsiddique.bagwan@gslab.com> Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
…cation (datahub-project#7541) Co-authored-by: MohdSiddiqueBagwan <mohdsiddique.bagwan@gslab.com> Co-authored-by: Harshal Sheth <hsheth2@gmail.com>
Quick fixes after PR: #7502