Forum Discussion

song_gao's avatar
song_gao
Frequent Visitor
2 years ago

Hide or remove Catalog input from a custom Power BI data connector

Is that possible to hide or remove Catalog input from a custom Power BI data connector while still keeping import mode native query function? Our data source allows cross catalog/database queries, thus it's not required to specify a catalog in the connection dialog.

 

I tried removing it from table meta definition, but got the following error:

 

[Expression.Error] The parameter "Catalog" doesn’t exist in the current context. Please check the connector native query implementation.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi song_gao ,

    I have not attempted to do so, but I can offer you some suggestions: 
    Look at any other code used in the M script or custom connector for any references to the "Catalog" parameter, and make sure that if you want to remove the parameter from the UI, it will not be used elsewhere in the code without a default or alternative value.
    If the "Catalog" parameter is not necessary to establish a connection, you can modify the connector's UI definition to remove or hide this parameter, update the function that defines the parameters for the connection dialog, make sure that "Catalog" is provided with a default value or omit it altogether.

    Best Regards,
    Dino Tao
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • song_gao's avatar
    song_gao
    Frequent Visitor

    Hi Dino Tao,

     

    Thank you for looking into this question. I am sorry that I did not state this question clearly. The question should be "to hide or remove Catalog input from a custom Power BI data connector while still keeping the native query function."

     

    I can remove catalog references from my connector code and I can add tables using Import and DirectQuery modes. However, if I specify the native query, then that error shows up.

     

    thanks

    Song Gao