GitXplorerGitXplorer
S

directlake-migration

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Verified
34166aa194d5f5d1e6db6d2dd2cf1463caeb8c01

Create directlake-migration.py

SScientistIzaak committed 3 months ago
Verified
7e7624a1ad01ebe91926f1257d5763a29cb8386c

Update README.md

SScientistIzaak committed 3 months ago
Verified
4b4c4260bd3f0a85da567664d944f98fcb38ae68

Update README.md

SScientistIzaak committed 3 months ago
Verified
1483efe3aac604d2d808e29e187ab5cf8779d75d

Create LICENSE

SScientistIzaak committed 3 months ago
Verified
fa2c09cca0d0171ac37a713885941290cf8a5817

Update README.md

SScientistIzaak committed 3 months ago
Verified
192a791e33b6ea5aa18a5bfd4967c7ac3b7685e9

Initial commit

SScientistIzaak committed 3 months ago

README

The README file for this repository.

Microsoft Fabric Report Migration to DirectLake

This repository provides a Python-based solution for migrating Microsoft Fabric reports from Import/Direct Query to DirectLake. The script automates the transition of measures, field parameters, and report rebinding using the fabric_cat_tools library.

Features

  • Move Field Parameter Tables to DirectLake.
  • Move Measures from source to destination semantic models.
  • Rebind Reports to new DirectLake semantic models.
  • Refresh semantic models after migration.

Requirements

Installation

  1. Clone the repository:
    git clone https://github.com/yourusername/directlake-migration.git
  2. Navigate to the cloned directory:
    cd directlake-migration
  3. Install fabric_cat_tools:
    %pip install "https://raw.githubusercontent.com/m-kovalsky/fabric_cat_tools/main/fabric_cat_tools-0.4.1-py3-none-any.whl"

Usage

1. Move Field Parameter Tables

This section automates the migration of field parameter tables to DirectLake.

  • Edit the Script: Open the migrate_reports.py file and locate the section responsible for moving field parameters.
  • Update Parameters: Specify the table name, objects, dataset, and workspace for each field parameter table you wish to migrate. Note that each field parameter table must be updated individually in the script.

Example:

#Move Field Parameter Table
param_table_name = 'YOUR_FIELD_PARAMETER_TABLE'
param_objects = ["'YOUR_TABLE'[YOUR_FIELD1]", "'YOUR_TABLE'[YOUR_FIELD2]"]
dataset_name = 'YOUR_DATASET'
workspace_name = 'YOUR_WORKSPACE'

add_field_parameter_template(param_table_name, param_objects, dataset_name, workspace_name)

2. Move Measures

This section copies measures from a source table to a destination table.

  • Edit the Script: Locate the section for moving measures in migrate_reports.py.
  • Update the Source and Destination: Define the source semantic model, source table, destination dataset, and destination table. This will transfer all measures from the specified source to the target.

Example:

# Move Measures
source_semantic = 'YOUR_SOURCE_SEMANTIC'
source_table = 'YOUR_SOURCE_TABLE'
destination_semantic = 'YOUR_DESTINATION_SEMANTIC'
destination_table = 'YOUR_DESTINATION_TABLE'

move_measures(source_semantic, source_table, destination_semantic, destination_table)

3. Rebind Reports

This section rebinds reports to new DirectLake semantic models.

  • Edit the Script: Find the rebinding section in migrate_reports.py.
  • Specify Report and Workspaces: Update the report name and workspaces to rebind the report to the appropriate dataset.

Example:

# Rebind Report
report_name = 'YOUR_REPORT_NAME'
report_workspace = 'YOUR_REPORT_WORKSPACE'
dataset_name = 'YOUR_DATASET_NAME'
dataset_workspace = 'YOUR_DATASET_WORKSPACE'

rebind_report_and_refresh_model(report_name, report_workspace, dataset_name, dataset_workspace)

4. Refresh Semantic Model

This section refreshes the semantic model after all migrations.

  • Automatic Refresh: The script will automatically refresh the semantic model after rebinding reports. No additional configuration is needed.

Credits

Special thanks to m-kovalsky for the fabric_cat_tools library, which made this tool possible.

License

This project is licensed under the MIT License.