Running the Power BI collector
Note
The latest version of the Collector is 2.158. To view the release notes for this version and all previous versions, please go here.
Generating the command or YAML file
This section walks you through the process of generating the command or YAML file for running the collector from Windows or Linux or MAC OS.
To generate the command or YAML file:
On the Organization profile page, go to the Settings tab > Metadata collectors section.
Click the Help me set up a collector button.
On the On-prem collector setup prerequisites screen, read the pre-requisites and click Next.
On the On which platform will this collector execute? screen, select if you will be running the collector on Windows or Mac OS or Linux. This will determine the format of the YAML and CLI that is generated in the end. Click Next.
On the Choose metadata collector type you would like to setup screen, select Power BI. Click Next.
On the Configure an on-premises Power BI screen, set the following properties and click Next.
On the next screen, set the following properties and click Next.
Table 2.Field name
Corresponding parameter name
Description
Required?
Select from one of the following authentication options.
Yes
Option 1: Authenticate using Azure Username & Password
Azure Username
--azure-username= <username>
Azure Active Directory username for Power BI Cloud authentication.
Yes
Azure Password
--azure-password= <password>
Azure Active Directory password for Power BI Cloud authentication. By default this is set as an environment variable. ${DW_AZURE_PASSWORD}
Yes
Azure Tenant ID
--azure-tenantid= <tenantId>
Set this if you want to specify the Azure tenant ID while using the user name and password authentication.
No
Option 2: Authenticate using Azure tenant ID (Service principal)
Azure Tenant ID
--azure-tenantid= <tenantId>
Azure Active Directory application tenant ID for the Power BI app.
Yes
Client ID and Client secret
Azure Client ID
--azure-clientid= <clientId>
Azure Active Directory application client ID for Power BI app.
Yes
Azure Client Secret
--azure-secret= <clientSecret>
Azure Active Directory application client secret for Power BI app. By default this is set as an environment variable ${DW_AZURE_SECRET}.
Yes
On the next screen, set the following optional properties and click Next.
Table 3.Field name
Corresponding parameter name
Description
Required?
Skip harvesting lineage metadata
--disable-expression-lineage
Skip harvesting lineage metadata from Power BI source expressions.
No
Catalog contents of user's My Workspace
--include-user-workspace
--user-workspace-include
Catalog contents of user's My Workspace in Power BI (Default is to skip the user's workspace).
Note: This parameter is only supported when you are using username and password authentication type. It is not supported for service principal authentication.
No
PowerBI catalog all workspaces and apps
--all-workspaces-and-apps
Catalog all workspaces and apps in a tenant, rather than only the workspaces and apps the credentials used have explicit access to. This option only works if the credentials used have admin privileges.
No
Include Power BI Workspace(s)
--include-workspace= <includedWorkspaceNames>
--workspace-include= <includedWorkspaceNames>
Specify the workspaces to be collected, using either a workspace name or a regular expression to match.
Use the parameter multiple times for multiple workspaces. For example, --workspace-include="workspaceA" --workspace-include="workspaceB"
No
Exclude Power BI Workspaces
--exclude-workspace=<excludedWorkspaceNames>
--workspace-exclude= <excludedWorkspaceNames>
Specify the Power BI workspaces and contents to exclude from being cataloged, using either a workspace name or a regular expression to match.
Use the parameter multiple times for multiple workspaces. For example, --workspace-exclude="workspaceA" --workspace-exclude="workspaceB". If both --include-workspace and --exclude-workspace are used, --include-workspace takes precedence.
No
Maximum Power BI Expression Length
--max-parseable-expression-length= <maxParseableExpressionLength>
Set the maximum number of characters in a Power BI expression that will be parsed for lineage metadata. Expressions longer than this will be skipped. Default is 32000.
No
On the next screen, provide the Collector configuration name. This is the name used to save the configuration details. The configuration is saved and made available on the Metadata collectors summary page from where you can edit or delete the configuration at a later point. Click Save and Continue.
On the Finalize your Power BI Collector configuration screen, you are notified about the environment variables and directories you need to setup for running the collector. Select if you want to generate a Configuration file( YAML) or Command line arguments (CLI). Click Next
Important
You must ensure that you have set up these environment variables and directories before you run the collector.
The next screen gives you an option to download the YAML configuration file or copy the CLI command. Click Done. If you are generating a YAML file, click Next.
The PowerBI collector command screen gives you the command to use for running the collector using the YAML file.
You will notice that the YAML/CLI has following additional parameters that are automatically set for you.
Important
Except for the collector version, you should not change the values of any of the parameter listed here.
Table 4.Parameter name
Details
Required?
-a= <agent>
--agent= <agent>
--account= <agent>
The ID for the data.world account into which you will load this catalog - this is used to generate the namespace for any URIs generated.
Yes
--site= <site>
This parameter should be set only for Private instances. Do not set it for public instances and single-tenant installations. Required for private instance installations.
Yes (required for private instance installations)
-U
--upload
Whether to upload the generated catalog to the organization account's catalogs dataset.
Yes
-L
--no-log-upload
Do not upload the log of the Collector run to the organization account's catalogs dataset.
Yes
dwcc: <CollectorVersion>
The version of the collector you want to use (For example,
datadotworld/dwcc:2.113)
Yes
Add the following additional parameter to test run the collector.
--dry-run If specified, the collector does not actually harvest any metadata, but just checks the database connection parameters provided by the user and reports success or failure at connecting.
You can add the following parameter to the Command/YAML file to use these additional features.
Table 5.Parameter
Description
Required?
--api-max-retries= <maxRetries>
Specify the number of times to retry an API call which has failed. The default value is 5.
No
--api-retry-delay= <retryDelay>
Specify the amount of time in seconds to wait between retries of an API call which has failed. The default is to try with a delay of 2 seconds between each call.
No
Verifying environment variables and directories
Verify that you have set up all the required environment variables that were identified by the Collector Wizard before running the collector. Alternatively, you can set these credentials in a credential vault and use a script to retrieve those credentials.
Verify that you have set up all the required directories that were identified by the Collector Wizard.
Running the collector
Important
Before you begin running the collector make sure you have the correct version of collectors downloaded and available.
Running collector using YAML file
Go to the server where you have setup docker to run the collector.
Make sure you have download the correct version of collectors. This version should match the version of the collector specified in the command you are using to run the collector.
Place the YAML file generated from the Collector wizard to the correct directory.
From the command line, run the command generated from the application for executing the YAML file.
Caution
Note that is just a sample command for showing the syntax. You must generate the command specific to your setup from the application UI.
docker run -it --rm --mount type=bind,source=${HOME}/dwcc,target=/dwcc-output \ --mount type=bind,source=${HOME}/dwcc,target=${HOME}/dwcc -e DW_AUTH_TOKEN=${DW_AUTH_TOKEN} \ -e DW_AZURE_PASSWORD=${DW_AZURE_PASSWORD} -e DW_AZURE_SECRET=${DW_AZURE_SECRET} \ datadotworld/dwcc:2.124 --config-file=/dwcc-output/config-power_bi.yml
The collector automatically uploads the file to the specified dataset and you can also find the output at the location you specified while running the collector.
At a later point, if you download a newer version of collector from docker, you can edit the collector version in the generated command to run the collector with the newer version.
Running collector without the YAML file
Go to the server where you have setup docker to run the collector.
Make sure you have download the version of collectors from here. This version should match the version of the collector specified in the command you are using to run the collector.
From the command line, run the command generated from the application. Here is a sample command.
Caution
Note that is just a sample command for showing the syntax. You must generate the command specific to your setup from the application UI.
docker run -it --rm --mount type=bind,source=${HOME}/dwcc,target=/dwcc-output \ --mount type=bind,source=${HOME}/dwcc,target=${HOME}/dwcc datadotworld/dwcc:2.124 \ catalog-powerbi --agent=initech --output=/dwcc-output --api-token=${DW_AUTH_TOKEN} \ --no-log-upload=false --upload=true --name=initech-collection --upload-location=ddw-catalogs \ --azure-username=my_user_name --azure-password=${DW_AZURE_PASSWORD} \ --azure-clientid=my_client_id --azure-secret=${DW_AZURE_SECRET} \ --disable-expression-lineage=true --include-user-workspace=true \ --include-workspace=workspace=workspaceA
The collector automatically uploads the file to the specified dataset and you can also find the output at the location you specified while running the collector.
At a later point, if you download a newer version of collector from docker, you can edit the collector version in the generated command to run the collector with the newer version.
Automating updates to your metadata catalog
Keep your metadata catalog up to date using cron, your Docker container, or your automation tool of choice to run the catalog collector on a regular basis. Considerations for how often to schedule include:
Frequency of changes to the schema
Business criticality of up-to-date data
For organizations with schemas that change often and where surfacing the latest data is business critical, daily may be appropriate. For those with schemas that do not change often and which are less critical, weekly or even monthly may make sense. Consult your data.world representative for more tailored recommendations on how best to optimize your catalog collector processes.
Managing collector runs and configuration details
From the Metadata collectors summary page, view the collectors runs to ensure they are running successfully,
From the same Metadata collectors summary page you can view, edit, or delete the configuration details for the collectors.