Skip to main content

A Fabric Package for Semantic/Dataset validation

Project description

Fabric Maverick

Python Version License

Table of Contents

Overview

fabric_maverick is a Python package designed for semantic level validation and comparison of Power BI reports across different workspaces. It provides a robust framework to programmatically compare the metadata and structure of your Fabric Analytics Reports (formerly Power BI datasets/reports) to ensure consistency and identify discrepancies.

This package is particularly useful for:

  • CI/CD pipelines: Automating report validation as part of your deployment process.
  • Regression testing: Ensuring that changes to reports or underlying data models do not introduce unintended breaking changes.
  • Maintaining consistency: Verifying that reports deployed to different environments (Dev, QA, Prod) are structurally identical or conform to expected variations.

Features

  • Report Comparison: Easily compare the structure (tables, columns, measures) of two Fabric Analytics Reports from different workspaces.
  • Flexible Input: Supports comparing reports by providing individual report/workspace names or a consolidated dictionary structure.
  • Authentication Management: Integrates with a flexible token provider for seamless authentication with Fabric/Power BI services.
  • Detailed Insights: [TODO: Briefly describe what kind of comparison results/details the ReportComparison object provides. E.g., "Identifies added, removed, or modified tables, columns, and measures."]
  • Extensible: Built with a modular design to allow for future expansion of comparison metrics and validation rules.

Installation

fabric_maverick can be installed directly from PyPI using pip:

pip install fabric_maverick

Usage

Comparing Reports

The primary function for comparing reports is ReportCompare. It offers two ways to specify the reports:

import knnpy

Compare = knnpy.ReportCompare(
    OldReport="MySalesDashboard_V1",
    OldReportWorkspace="Development",
    NewReport="MySalesDashboard_V2",
    NewReportWorkspace="Production",
    Stream="SalesDashboard_Deployment",
    ExplicitToken="YOUR_ACCESS_TOKEN_IF_NEEDED" # Optional
)

# Use the Compare object to run validations and view results
Compare.run_all_validations()

Authentication

By default, fabric_maverick will use token from fabric enviornment. However, you can explicitly provide an authentication token using the ExplicitToken parameter in ReportCompare:

import knnpy

# Obtain your Power BI/Fabric access token
my_token = "eyJ..." # Replace with your actual token

comparison_result = knnpy.ReportCompare(
    # ... report details ...
    Stream="MyStream",
    ExplicitToken=my_token
)

Alternatively, you can initialize a token globally for the session using initializeToken:

import knnpy

# Initialize token globally (this affects all subsequent calls without ExplicitToken)
knnpy.initializeToken("YOUR_GLOBAL_ACCESS_TOKEN")

# Now, ReportCompare calls can omit ExplicitToken
comparison_result = knnpy.ReportCompare(
    OldReport="ReportA",
    OldReportWorkspace="WS_A",
    NewReport="ReportB",
    NewReportWorkspace="WS_B",
    Stream="AnotherStream"
)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For questions or feedback, please reach out to the maintainers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fabric_maverick-0.1.0.dev4.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fabric_maverick-0.1.0.dev4-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file fabric_maverick-0.1.0.dev4.tar.gz.

File metadata

  • Download URL: fabric_maverick-0.1.0.dev4.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for fabric_maverick-0.1.0.dev4.tar.gz
Algorithm Hash digest
SHA256 03b904d5fb71b4072a0c2f960b322d25ab3009538f3af8e403f75d44e8e8827a
MD5 c6ab8aa07d48c1acedcda779a833d2b3
BLAKE2b-256 03e009a06637408569a6a6c50506ba120f62f919bbbb0225c56c1804e7e7a428

See more details on using hashes here.

File details

Details for the file fabric_maverick-0.1.0.dev4-py3-none-any.whl.

File metadata

File hashes

Hashes for fabric_maverick-0.1.0.dev4-py3-none-any.whl
Algorithm Hash digest
SHA256 5921f82c09377dd078f58eec7b3aad834fb0a39c10f1696bdbd4d505a99029fa
MD5 6c86a4410325874f9ac87bac77cc225e
BLAKE2b-256 87885433bd5c3c8088bc7660d6e3e89f8b4d0ccb776e36e473038d035343dde8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page