Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
aignn
Helper II
Helper II

How use parameter in Mysql connector query?

hello!

Tell me please how use parameter in Mysql connector query?

 

I use Mysql connector in Powerbi for get data from Mysql base

 

 

 

= MySQL.Database("mysqlserver1.local", "base", [Query="  select.............................. where queue=1", ReturnSingleDatabase=true])

 

 

I want to create a parameter and substitute different values instead of 1 in the queue

 

Thank you advace

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @aignn ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @aignn ,

 

We can create a parameter called "id_parameter" and use text type, then use it as following formula:

 

= MySQL.Database("localhost", "testdb", [ReturnSingleDatabase=true, Query="select * from testdb.tablename where category_id = " & id_parameter])

 

4.PNG5.PNG

 

Please also refer to this thread about the warning "Permission is required to run this native database query".

https://community.powerbi.com/t5/Desktop/Permission-is-required-to-run-this-native-database-query/td...

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.