Forum Discussion
Anonymous
4 years agoNot applicable
How to parameterize Server & database name while using Snowflake database
Hi, I have created Power BI Report with the data connected to Snowflake database. Incase if i want to parametrize the Server name and database name using query parameters how do i do that? While us...
Vijay_A_Verma
Most Valuable Professional
4 years agoYou will have to use Parameters to create paramters for server and db name and use that. Below I have created 2 parameters Server and DB and passing to Snowflake.
If you have never created parameters in PQ - https://support.microsoft.com/en-us/office/create-a-parameter-query-power-query-5eb365bc-3982-4ab2-8830-b205a69e0f33
let
Source = Snowflake.Databases(Server,DB"),
SNOWFLAKE_SAMPLE_DATA_Database = Source{[Name="SNOWFLAKE_SAMPLE_DATA",Kind="Database"]}[Data],
TPCDS_SF10TCL_Schema = SNOWFLAKE_SAMPLE_DATA_Database{[Name="TPCDS_SF10TCL",Kind="Schema"]}[Data],
WEB_PAGE_Table = TPCDS_SF10TCL_Schema{[Name="WEB_PAGE",Kind="Table"]}[Data]
in
WEB_PAGE_Table