Skip to main content
Solved

Cognite PowerBI DESKTOP Connector (beta) Query input truncating

  • March 31, 2025
  • 1 reply
  • 24 views

Chris Selph
Seasoned
Forum|alt.badge.img

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.IsCode options 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.

View original
Did this topic help you find an answer to your question?

1 reply

Everton Colling
Seasoned Practitioner
Forum|alt.badge.img
  • Seasoned Practitioner
  • 169 replies
  • Answer
  • March 31, 2025

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.IsCode options 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.


Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings