Exam PL-300 All QuestionsBrowse all questions from this exam
Question 21

HOTSPOT

-

You have the Azure SQL databases shown in the following table.

You plan to build a single PBIX file to meet the following requirements:

• Data must be consumed from the database that corresponds to each stage of the development lifecycle.

• Power BI deployment pipelines must NOT be used.

• The solution must minimize administrative effort.

What should you do? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

    Correct Answer:

Discussion
SanaCanada

Given answer is correct To meet the requirements specified, we can use a single parameter in the PBIX file that controls which database is used for data consumption based on the stage of the development lifecycle. We can use a Text parameter type in Power BI to achieve this. The parameter can be used to switch between the different database connections when a user interacts with the report. The text parameter could include values such as "Development", "Staging", and "Production", which correspond to the different databases shown in the table. The parameter can then be used in the queries to dynamically filter the data based on the selected stage of the development lifecycle. By using a single parameter, we can minimize administrative effort and ensure that the report works with each stage of the development lifecycle. No confusion, and no need to discuss further

Nemesizz

Why not two parameters, one for the name and other for the server?

inejo

Gracias por tu explicación :)

prikha16

How will give this parameter in the source step of the queries for tables? we need to give server and DB name?

CookieMingkee

It is a trick question. You have to pay attention to the names of the databases and the servers. Databases: db-powerbi-dev db-powerbi-uat db-powerbi-prod Servers: dev.database.windows.net uat.database.windows.net prod.database.windows.net The only differences among the 3 names are "dev", "uat", and "prod". Create a single parameter as Text and Suggested value as List of Values. Your list of values will be: dev uat prod In the Power Query editor use the parameter value and concatenate it with the rest of the database and server name. Source = Sql.Database(#"ParameterName"&".database.windows.net", "db-powerbi-"&#"ParameterName") If the Parameter Value selected from the list is "uat", the connection is interpreted as: Source = Sql.Database("uat.database.windows.net", "db-powerbi-uat") I hope that clarifies the answer.

BellaL9

Create: 2 parameters Parameter type: text One parameter is needed for server name, another for database name https://community.powerbi.com/t5/Community-Blog/Using-the-Power-BI-Service-Parameters-to-change-connection/ba-p/392016

semauni

I would agree if this table was not available. In this case, both the server and the database name are tied to the test stage, so that column encompasses both. SanaCanada explains very well how to accomplish the connection with just one parameter.

Shalaleh

would you please explain more?

Alam4545

why do you think about server name? just deal with three different database name with one parameter. That's it!

MooonLight

I have finished a udemy course on PL-300, yet I do not have any idea on this question....

lcss27

Correct Answers: One Parameter / Text In Power Query, in Advance Editor you can use 1 parameter to update the stage of the server and the database by modifying the M Code as follows: '=Sql.Database(parameter&"ServerUrl", "DatabaseName"&parameter)'

abhijeetbgmcanada

But in such solution, when the database name changes from dev to uat to prod, paramter vales will place the URL of dev uat and prod, but how database name will change automatically? ( i.e. suppose you statically give database name as dev db name, then param value comes as uat env URL. then how this will work ? hencce I feel 2 params are needed.

Scobie

SanaCanada is correct here only one parameter is needed. With one parameter with the parameter type of "Text" and Suggested Values to be "List of values" you can set three values as dev, uat, and prod. In the Azure they contain the same structure for the Name and Server URL. "db-powerbi-" & ".database.windows.net" The only thing that changes between the stages is dev, uat, and prod and for each of the stages the Name and Server URL is the same value for that stage. E.g, "db-powerbi-dev" & "dev.database.windows.net"

Cyprien_B

To be a bit more precise, when modifying the source in Power Query, we can click on "Advanced" and modify the source URL for a URL that contains both text and parameters.

prikha16

Those of you who are saying one, have you tried it yourself? I am not able to edit the code in advanced editor using one parameter. I would go with 2 parameters.

abhijeetbgmcanada

one param approach will work only if , each full connection string can be prepared like <database>. <other part of URL>. in that case, 3 env.s can be switched as per need. if both cannot be combined ina single entity, then 2 params are needed. ( I dont have exact idea abot how the connection gets created in textuual form internally ). kindly confirm if i am wrong and upvote if correct.

meer9673

here is another good explanation https://youtu.be/q96anVwaw8E?si=Pdb9Jqem2qSn2fS7

poldog

According to this, 2 parameters and text: https://www.youtube.com/watch?v=JRTr_FOVsac

JJMC5544

1 Parameter with "List of Values"

KARELA

Please share resources from where this is referenced.

Kiran37

Correct , create Parameter for 2 Environment

Jane97

To meet the requirements specified, we can use a single parameter in the PBIX file that controls which database is used for data consumption based on the stage of the development lifecycle. We can use a Text parameter type in Power BI to achieve this. The parameter can be used to switch between the different database connections when a user interacts with the report. The text parameter could include values such as "Development", "Staging", and "Production", which correspond to the different databases shown in the table. The parameter can then be used in the queries to dynamically filter the data based on the selected stage of the development lifecycle. By using a single parameter, we can minimize administrative effort and ensure that the report works with each stage of the development lifecycle

SumaiyaKS

I think coz db name is an optional param, one would do for the server name alone

Saluk_DE

Connection is done with two different fields "Server" and "Database", so you will need also two parameters for that. Answer should be 2 parameters, both text.

Igetmyrole

The correct answers are Two Parameters and Text. ** Two Parameters: it is because we have three stages; Development, Test, and Production, which means we need parameters to dynamically switch between these stages. We have two columns in the table that are relevant for the scenario, "Stage" (to determine the stage) and "Server URL" (to specify the database server URL). ** Text: Text parameter is suitable for the scenario because we want to use them to switch between different server URLs based on the selected stage.

cs3122

You can accomplish this with 1 parameter instead. It would contain "Dev" "uat" and "Prod", and you can apply it to both columns

TrainingCA06

No NO NO, the answer is right.: 1 Parameter type text, and then when you configure it show an option to LIST, in the list you add each environment.

ApacheKafka

I think we just need 1 parameter because all the databases have different names and url to represent each of the stages. Using 2 parameters is waste of resources as just 1 parameter can serve the purpose. In this case we can chose to use either the database name or url. The stage column is only an additional information to clarify each database name or url. I hope this is clear.

Sandy2010

Given answer is correct

Shalaleh

why? can you explain why not 2?