Parsing Parameter in Dataflow issue

Nandan Hegde 29,996 Reputation points MVP
2022-10-30T15:33:06.977+00:00

Hello All,
Good day!

I was referring the below steps for extracting data from Powerbi:
https://datasharkx.wordpress.com/2022/10/30/copy-data-from-power-bi-through-azure-data-factory-synapse-pipeline-part-2/

Now I need to update the query from EVALUATE VALUES(Date) to the below query :
Evaluate SUMMARIZECOLUMNS( 'Date'[DateDimId], 'Date'[MonthNm], "CountRows",CALCULATE(COUNTROWS('Date')))

The new query contains both single and double quotes.

This new query works fine when executed via web activity :
255394-image.png

output:
255357-image.png

Now the same query : "Evaluate SUMMARIZECOLUMNS( 'Date'[DateDimId], 'Date'[MonthNm], "CountRows",CALCULATE(COUNTROWS('Date')))" needs to be executed in dataflow REST API

Since it contains both single and double quotes :
255347-image.png

we need to pass the parameter as below leveraging the escape character to resolve the parameter issue

"Evaluate SUMMARIZECOLUMNS( 'Date'[DateDimId], 'Date'[MonthNm], \"CountRows\",CALCULATE(COUNTROWS('Date')))"

But when we try about importing the projection , it fails with the below issue:
255377-image.png

So how to handle the queries that contain both single and double quotes in dataflow activity?
What is it that I am missing out ?

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,553 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,893 questions
{count} votes

Accepted answer
  1. Balamurugan Balakreshnan 86 Reputation points Microsoft Employee
    2022-11-01T18:05:05.987+00:00

    Below will fix the issue
    escape("Evaluate SUMMARIZECOLUMNS( 'Date'[DateDimId], 'Date'[MonthNm], \"CountRows\",CALCULATE(COUNTROWS('Date')))", 'json')

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful