Forum Discussion
Power BI Service Refresh Error: Unable to combine data (Azure SQL and Google Translate API Privacy L
- 1 month ago
Hi,
Thanks for sharing the M code. Your implementation looks correct from a Power Query perspective, and using Table.Buffer() is a good optimization. However, the issue is not with the M syntax—it's with how Power BI Service handles privacy and data source combinations.
In your code:
BufferedTable = Table.Buffer(#"Source")
BufferedTable only buffers the Azure SQL data in memory. When Table.AddColumn() calls:
Web.Contents(
"https://translate.googleapis.com",
...
)
Power BI Service still sees this as combining Azure SQL with a Web data source for every row. During scheduled refresh, the Mashup Engine enforces privacy rules and blocks this combination, resulting in the "Unable to combine data" error.
A few recommendations:
- Verify that both the Azure SQL source and the Google Translate API are configured with the same privacy level (preferably Organizational) in the dataset settings.
- If you're using an On-premises Data Gateway, ensure both data sources are configured there with valid credentials.
- Table.Buffer() and RelativePath improve performance and are best practices, but they do not bypass Power BI Service privacy restrictions.
- If the dataset contains many rows, calling Web.Contents() once per row is also likely to hit refresh/performance limitations.
For production scenarios, the recommended approach is to move the translation outside Power BI, for example:
- Translate the data before loading it into Azure SQL.
- Use Azure Functions, Power Automate, Dataflows, or an ETL process to populate a translated column.
- Import the translated data directly into Power BI instead of invoking the API during refresh.
Based on the M code you've shared, this appears to be a Power BI Service privacy/mashup limitation rather than an issue with your code.
Hope this helps!
Thanks!
Hi,
This is a common limitation in Power BI Service when combining data from multiple sources (Azure SQL + Web API).
The key point is that "Ignore Privacy Levels and improve performance" only works in Power BI Desktop. After publishing, Power BI Service enforces privacy levels and data source isolation during refresh.
A few things to check:
- Verify Privacy Levels in Power BI Service
Go to:
Dataset Settings → Data Source Credentials
Ensure both:
- Azure SQL Database
- Google Translate API (Web source)
have compatible privacy levels (typically Organizational).
- API Calls Inside Row-by-Row Custom Columns
If your M code calls Google Translate for each row, Power BI Service may treat this as combining data from:
- Azure SQL
- Web API
which often triggers the "Unable to combine data" error.
- Buffer the SQL Data
Try buffering the SQL table before calling the API:
BufferedTable = Table.Buffer(Source)
This sometimes helps Power Query treat the SQL data as local before invoking the web request.
- Consider Moving Translation Outside Power Query
For production scenarios, a better approach is often:
- Translate data before loading into Power BI
- Use Azure Functions, Power Automate, Dataflow, or SQL ETL processes
- Store the translated text in a table and import it directly
- Gateway Considerations
If you're using an On-Premises Data Gateway:
- Ensure both sources are configured correctly in the gateway
- Verify credentials are valid
- Check gateway logs for additional mashup engine details
- RelativePath Does Not Solve Privacy Conflicts
Using RelativePath is recommended for dynamic web requests, but it does not bypass Power BI Service privacy-level restrictions.
Bottom Line
The issue is not that Google Translate API is incompatible with Azure SQL. The problem is that Power BI Service is enforcing privacy isolation between the SQL source and the Web API call. The most reliable solutions are:
- Set both sources to compatible privacy levels.
- Buffer the source data before API calls.
- Move the translation logic outside Power BI refresh (recommended for large datasets).
If you can share the relevant M code (especially the Web.Contents call), the community can provide a more targeted solution.
Thanks!
- DSirisha1 month agoRegular Visitor
below M Code is using in my report
BufferedTable = Table.Buffer(#"Source"),
TranslateText = (inputText as text) as any =>
let
jsonResponse =
try Json.Document(
Text.FromBinary(
Web.Contents(
"https://translate.googleapis.com",
[
RelativePath = "translate_a/single",
Query = [
client = "gtx",
sl = "auto",
tl = "en",
dt = "t",
q = inputText
],
ManualStatusHandling = {400, 404, 500}
]
)
)
)
otherwise null,
translatedText =
if jsonResponse <> null
and List.NonNullCount(jsonResponse) > 0
and List.NonNullCount(List.First(jsonResponse)) > 0
then
try List.First(List.First(jsonResponse)){0}
otherwise null
else
null
in
translatedText,
#"Added Custom1" = Table.AddColumn(
BufferedTable,
"Translated",
each if [ResponseShortText] <> null and [ResponseShortText] <> ""
then TranslateText([ResponseShortText])
else null
)- SamInogic1 month agoSuper User
Hi,
Thanks for sharing the M code. Your implementation looks correct from a Power Query perspective, and using Table.Buffer() is a good optimization. However, the issue is not with the M syntax—it's with how Power BI Service handles privacy and data source combinations.
In your code:
BufferedTable = Table.Buffer(#"Source")
BufferedTable only buffers the Azure SQL data in memory. When Table.AddColumn() calls:
Web.Contents(
"https://translate.googleapis.com",
...
)
Power BI Service still sees this as combining Azure SQL with a Web data source for every row. During scheduled refresh, the Mashup Engine enforces privacy rules and blocks this combination, resulting in the "Unable to combine data" error.
A few recommendations:
- Verify that both the Azure SQL source and the Google Translate API are configured with the same privacy level (preferably Organizational) in the dataset settings.
- If you're using an On-premises Data Gateway, ensure both data sources are configured there with valid credentials.
- Table.Buffer() and RelativePath improve performance and are best practices, but they do not bypass Power BI Service privacy restrictions.
- If the dataset contains many rows, calling Web.Contents() once per row is also likely to hit refresh/performance limitations.
For production scenarios, the recommended approach is to move the translation outside Power BI, for example:
- Translate the data before loading it into Azure SQL.
- Use Azure Functions, Power Automate, Dataflows, or an ETL process to populate a translated column.
- Import the translated data directly into Power BI instead of invoking the API during refresh.
Based on the M code you've shared, this appears to be a Power BI Service privacy/mashup limitation rather than an issue with your code.
Hope this helps!
Thanks!