mikova
1 year agoMicrosoft Employee
Delta Analyzer
Download this notebook from: semantic-link-labs/notebooks/Delta Analyzer.ipynb at main · microsoft/semantic-link-labs · GitHub
Install the latest .whl package
Check here to see the latest version.
%pip install semantic-link-labs
Import the library
import sempy_labs as labs table_name = 'MyTable' # Enter the name of the delta table lakehouse = 'MyLakehouse' # Enter the name or ID of the lakehouse in which the delta table resides workspace = 'MyWorkspace' # Enter the name or ID of the workspace in which the lakehouse resides
Run Delta Analyzer for a given table in the lakehouse attached to your notebook
x = labs.delta_analyzer(
table_name=table_name,
lakehouse=lakehouse,
workspace=workspace
)for name, df in x.items():
print(name)
display(df)Get actual (not approximate) distinct counts
x = labs.delta_analyzer(
table_name=table_name,
approx_distinct_count=False,
lakehouse=lakehouse,
workspace=workspace
)Export the results of Delta Analyzer to a set of delta tables in your lakehouse
The export always appends results to the delta tables
x = labs.delta_analyzer(
table_name=table_name,
lakehouse=lakehouse,
workspace=workspace,
export=True
)
https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fsemantic-link-labs%2Fblob%2Fmain%2Fnotebooks%2FDelta%2520Analyzer.ipynb
No RepliesBe the first to reply