Using PBI Desktop and Cognites Rest API Connector beta
When configuring the GraphQL parameters of Space, Datamodel, version and query
There is a problem when pasting a query that was copied from the Query Explorer or even notepad into the query input box
It is truncating the query string at the first carriage return CR and or Line Feed LF
If all CR and LF are removed from the query string, it will paste properly and run properly.
Best answer by Everton Colling
Hi @Chris Selph!
Thanks for reporting this situation. Unfortunately, what you are mentioning is a known limitation we encountered when developing the new connector. I assume you are referring to the usage of the GraphQL function directly from the Power BI Navigator. In this scenario, the query argument is presented in Power BI as a single line text field (screenshot below).
As mentioned on our public docs (item 6 here), the recommended pattern to properly use the Functions exposed by the connector is to select them in the left panel and then click on Transform Data. Once you do so, you will be presented with the Power Query Editor with the selected functions available to you. From here the query argument is correctly rendered as a multi line text field (see screenshot below). Here you can copy and paste the full query directly in the multi line text field.
On our side we have correctly annotated the query field with the Formatting.IsMultiLine and Formatting.IsCodeoptions exposed by Microsoft, but for some reason Power BI is not respecting this option in the Navigator. We have a ticket with Microsoft about this, but there’s not much that we can do besides waiting for Microsoft to fix this in future releases of Power BI.
Thanks for reporting this situation. Unfortunately, what you are mentioning is a known limitation we encountered when developing the new connector. I assume you are referring to the usage of the GraphQL function directly from the Power BI Navigator. In this scenario, the query argument is presented in Power BI as a single line text field (screenshot below).
As mentioned on our public docs (item 6 here), the recommended pattern to properly use the Functions exposed by the connector is to select them in the left panel and then click on Transform Data. Once you do so, you will be presented with the Power Query Editor with the selected functions available to you. From here the query argument is correctly rendered as a multi line text field (see screenshot below). Here you can copy and paste the full query directly in the multi line text field.
On our side we have correctly annotated the query field with the Formatting.IsMultiLine and Formatting.IsCodeoptions exposed by Microsoft, but for some reason Power BI is not respecting this option in the Navigator. We have a ticket with Microsoft about this, but there’s not much that we can do besides waiting for Microsoft to fix this in future releases of Power BI.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.