mikova
1 year agoMicrosoft Employee
Semantic Model Management
Download this notebook from: semantic-link-labs/notebooks/Semantic Model Management.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 and necessary packages
import sempy_labs as labs source_dataset = '' # Name of the semantic model to backup target_dataset = '' # Name of the semantic model to restore source_workspace = '' # Name of the workspace in which the semantic model resides target_workspace = '' # Destination workspace of the semantic model source_file_path = '' # Name/path of the backup file to create target_file_path = '' # Name/path of the backup file to be copied to the target workspace storage_account = '' # Name of the ADLS Gen2 storage account associated with both source & target workspaces
Prerequisites
- Create an ADLS Gen2 storage account (in the Azure Portal)
- Assign the ADLS Gen2 storage account to both source and target workspaces
- Navigate to your workspace.
- Select 'Workspace settings'.
- Select 'Azure connections'.
- Within 'Azure Data Lake Gen2 Storage' click 'Configure'.
- Enter your Subscription, Resource Group and Storage Account.
- Click 'Save'.
Backup, copy and restore a semantic model to a new workspace
labs.backup_semantic_model(
dataset=source_dataset,
file_path=source_file_path,
workspace=source_workspace,
)
labs.copy_semantic_model_backup_file(
source_workspace=source_workspace,
target_workspace=target_workspace,
source_file_name=source_file_path,
target_file_name=target_file_path,
storage_account=storage_account,
)
labs.restore_semantic_model(
dataset=target_dataset,
file_path=target_file_path,
workspace=target_workspace,
)
https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fsemantic-link-labs%2Fblob%2Fmain%2Fnotebooks%2FSemantic%2520Model%2520Management.ipynb
No RepliesBe the first to reply