次の方法で共有


report Package

Functions

clone_report

Clone a report in the specified workspace.

Note

This functions wraps the PowerBI REST API Reports - Clone Report In Group.

clone_report(source_report: str | UUID, target_report: str, source_workspace: str | UUID | None = None, target_workspace: str | UUID | None = None, target_dataset: str | UUID | None = None, target_dataset_workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> str

Parameters

Name Description
source_report
Required
str or UUID

Source report name or ID.

target_report
Required
str

Target report name.

source_workspace
str or UUID

The Fabric workspace name or UUID object containing the workspace ID that hosts the source report. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
target_workspace
str or UUID

The Fabric workspace name or UUID object containing the workspace ID that will host the cloned report. If None, the cloned report will be created in the same workspace as the source report.

Default value: None
target_dataset
str or UUID

Target semantic model name or ID. If None, the cloned report will be bound to the same dataset as the source report.

Default value: None
target_dataset_workspace
str or UUID

The Fabric workspace name or UUID object containing the workspace ID that hosts the target dataset. If None, the target dataset workspace will be assumed to be the same workspace as the source report.

Default value: None
credential
<xref:sempy.fabric.report.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
str

The ID of the cloned report.

list_reports

Return a list of reports in the specified workspace.

list_reports(workspace: str | UUID | None = None, endpoint: Literal['powerbi', 'fabric'] = 'powerbi', credential: TokenCredential | None = None) -> pd.DataFrame

Parameters

Name Description
workspace
str or UUID

The Fabric workspace name or UUID object containing the workspace ID. Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
endpoint
<xref:Literal>[<xref:”powerbi”, "fabric"]

The endpoint to use for listing reports. Supported values are "powerbi" and "fabric". See PowerBI List Reports for using "powerbi" and Fabric List Reports for using "fabric".

Default value: powerbi
credential
<xref:sempy.fabric.report.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None

Returns

Type Description
"<xref:pd.DataFrame>"

DataFrame with one row per report.

rebind_report

Rebind one or more reports to a semantic model.

Note

This functions wraps the PowerBI REST API Reports - Rebind Report In Group.

rebind_report(report: str | UUID | List[str | UUID], dataset: str | UUID, report_workspace: str | UUID | None = None, dataset_workspace: str | UUID | None = None, credential: TokenCredential | None = None) -> None

Parameters

Name Description
report
Required
str, UUID or <xref:sempy.fabric.report.a list> of str or UUID

Report name(s) or ID(s).

dataset
Required
str or UUID

Target semantic model name or ID.

report_workspace
str or UUID

The Fabric workspace name or UUID object containing the workspace ID that hosts the report(s). Defaults to None which resolves to the workspace of the attached lakehouse or if no lakehouse attached, resolves to the workspace of the notebook.

Default value: None
dataset_workspace
str or UUID

The Fabric workspace name or UUID object containing the workspace ID that hosts the semantic model. Defaults to report_workspace.

Default value: None
credential
<xref:sempy.fabric.report.TokenCredential>

The credential for token acquisition. Must be an instance of azure.core.credentials.TokenCredential. If None, the default credential will be used.

Default value: None