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 https://github.com/delta-io/delta/issues/1978 #2070

Closed
wants to merge 4 commits into from

Conversation

dominikpeter
Copy link

Which Delta project/connector is this regarding?

  • Spark
  • Standalone
  • Flink
  • Kernel
  • Other (Power BI)

Description

Fix #1978

How was this patch tested?

With local Power BI and sample Dataset

Does this PR introduce any user-facing changes?

No

Following the delta protocol (https://github.com/delta-io/delta/blob/master/PROTOCOL.md) the delta log file is zero-padded to 20 digits ending with .json. 
Regex would be better but M Query does not support regex. This approach should be quite robust though.
@dominikpeter
Copy link
Author

dominikpeter commented Sep 25, 2023

I tried to change the PowerBI_Delta.pbit file too. However, I don't think I am able to do it as I don't have the credentials for the Azure Storage Account used in the template.

@gbrueckl could you take a look at this?

@gbrueckl
Copy link
Contributor

Hi @dominikpeter,
while the file fn_ReadDeltaTable.pq is the final output for Power BI, I usually also maintain the .pbit file for debugging and development of new features. It should be OK to just save the PQ queries in the template and save it without applying the changes.

regarding your change, the fix seems reasonable as the Extension column seems to contain everything after the first . found in the filename which was not an issue until the compacted files were introduced
However, instead of Text.Mid() I would rather use Text.EndsWith() (docs) which should be safer to use

If its OK for you, I would take over the ticket, do the changes in the PBIT and fn_ReadDeltaTable

regards and thanks for your contribution so far!
-gerhard

@dominikpeter
Copy link
Author

@gbrueckl sure, you can take it over. Thanks a lot.

@dominikpeter
Copy link
Author

@gbrueckl I am not sure how you want to use Text.EndsWith() as the compacted file also end with .json.

@gbrueckl
Copy link
Contributor

I created a new PR that fixes this issue
#2101

I also added some documentation for further contributions under /connectors/PowerBI/README.md
Further I changed the sample data to use the Golden Tables provided as part of this repo wherever possible

@dominikpeter
Copy link
Author

Will be solved here: #2101

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.

Power BI Connector using fn_ReadDeltaTable present duplicated data record[BUG]
2 participants