cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to refresh powerbi dashboar form databricks jobs

sumitkumar_284
New Contributor II

I am trying to refresh Power BI Dashboard using Databricks jobs and constantly getting this error, but I am providing optional parameters which includes catalog and database. Also, things to note that I am able to do refresh on Power BI UI using both Virtual Network Data Gateway and Data Source Credential.

Error after running Databricks jobs:
Run failed with error message System error occurred during execution of task Power BI Task: Semantic model update succeeded but refresh failed with error: [Microsoft][ThriftExtension] (38) An attempt was made to set an empty string as the current catalog. This type of operation is not allowed. The exception was raised by the IDbCommand interface. Table: joiners. Partition: joiners.

Best Regards,
Sumit Kumar

4 REPLIES 4

szymon_dybczak
Esteemed Contributor III

Hi @sumitkumar_284 ,

Can you provide us more details? Are you using Unity Catalog? Which authentication mechanism you have? In which version of Power BI Desktop you've developed your semantic model/dashboard? Do you meet all below requirements?

Publish to the Power BI service from Azure Databricks - Azure Databricks | Microsoft Learn

Power BI task for jobs - Azure Databricks | Microsoft Learn

HI @szymon_dybczak 

1. Yes, we are using UC.
2. Authentication method: OAuth(u2m)
3. Power BI Desktop Version: 2.143.1204.0
4. Yes, we confirm that all the requirements mention in the docs are met.

The error specified doesn't mention whether this needs to be resolved in Power Bi or Databricks, but I can confirm that I am able to refresh the reports form Power BI Service and Power BI Desktop but not from Databricks JOB.

I am attaching the exact image for your reference:

sumitkumar_284_0-1760516588734.png

 

The error message indicates that although your semantic model update succeeded, the refresh failed because “[Microsoft][ThriftExtension] (38) An attempt was made to set an empty string as the current catalog. This type of operation is not allowed...”. This typically points to an issue where the catalog parameter expected by the Databricks connector (or the underlying ODBC/JDBC driver) is being received by the engine as blank, though you say you are providing the catalog and database parameters.

Root Causes and Troubleshooting

  • Incorrect Parameter Mapping: Sometimes, job automation solutions mis-map parameter names or values, especially between configuration files, API calls, or tools. Double-check that the catalog and database parameters sent by your Databricks job are populated and mapped exactly as expected by Power BI and the Databricks driver.

  • Parameter Defaults or Environment Differences: While the Power BI UI might honor defaults or detect catalog/database from session context, the Databricks job or automated refresh process may require explicit parameters at runtime. If the catalog parameter isn’t set or is set to an empty value, the refresh will fail in the automated job but might succeed in the UI due to different handling.

  • Gateway/Data Source Differences: Since you're able to refresh using the UI with both Virtual Network Data Gateway and Data Source Credential, but not via the Databricks job, it points to subtle environmental or configuration differences. Compare the VNet Gateway and credential setups for both scenarios to confirm the exact parameter values being transmitted.

Steps to Mitigate

  • Explicitly Set Catalog/Database: Ensure your Databricks job is explicitly passing non-empty values for both catalog and database in all job configurations, API calls, or scripts. Even if optional, they must not be empty strings.

  • Update Connection Strings: In some setups, the connection string may override or omit parameters. Check if your job connection uses connection string parameters like Catalog=yourCatalog;Database=yourDatabase, and ensure these are not omitted or blank.

  • Verify Data Source Credentials: The refresh via UI might succeed because credentials/session context provides implicit values. Confirm the same credentials/context are valid and available in automated jobs.

  • Test with Direct API Call: Try triggering the refresh using Power BI REST API or Databricks REST API (with identical parameters) outside the job framework to see if the error persists. This can isolate the problem to configuration vs. platform/job orchestration.

Additional Recommendations

  • Review any logs produced by both Power BI and Databricks to trace the catalog/database parameter propagation during job execution.

  • Check for hidden or masked parameters in job configuration files, pipelines, or orchestrators that might be empty or omitted.

  • Consult documentation for the specific versions of Databricks driver, Power BI, and Gateway in use for any known issues regarding catalog/database handling.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!

Sign Up Now