Exam DP-800 Topic 1 Question 20 Discussion
Actual exam question for Microsoft's DP-800 exam
Question #: 20
Topic #: 1
Question #: 20
Topic #: 1
You have an Azure SQL database.
You deploy Data API builder (DAB) to Azure Container Apps by using the mcr.nicrosoft.com/azure-databases
/data-api-builder:latest image.
You have the following Container Apps secrets:
* MSSQL_COMNECTiON_STRrNG that maps to the SQL connection string
* DAB_C0HFT6_BASE64 that maps to the DAB configuration
You need to initialize the DAB configuration to read the SQL connection string.
Which command should you run?
You deploy Data API builder (DAB) to Azure Container Apps by using the mcr.nicrosoft.com/azure-databases
/data-api-builder:latest image.
You have the following Container Apps secrets:
* MSSQL_COMNECTiON_STRrNG that maps to the SQL connection string
* DAB_C0HFT6_BASE64 that maps to the DAB configuration
You need to initialize the DAB configuration to read the SQL connection string.
Which command should you run?
Suggested Answer: B Vote an answer
Data API builder supports reading the database connection string from an environment variable by using the syntax:
@env( ' MSSQL_CONNECTION_STRING ' )
Microsoft's DAB documentation explicitly shows that @env( ' MSSQL_CONNECTION_STRING ' ) tells Data API builder to read the connection string from an environment variable at runtime.
That fits this scenario because Azure Container Apps secrets are typically exposed to the container as environment variables . Microsoft's Azure Container Apps documentation states that environment variables can reference secrets, and DAB's Azure Container Apps deployment guidance shows a secret being mapped into an environment variable that DAB then reads.
Why the other options are wrong:
* A and D incorrectly point the connection string to DAB_CONFIG_BASE64, which is the config payload secret, not the SQL connection string.
* C uses secretref: syntax inside dab init, but DAB expects the connection string parameter in the config to use the environment-variable reference syntax @env(...). The secretref: pattern is for Azure Container Apps environment variable configuration, not for the DAB CLI connection-string argument itself.
So the correct command is:
dab init --database-type mssql --connection-string " @env( ' MSSQL_CONNECTION_STRING ' ) " --host- mode Production --config dab-config.json
@env( ' MSSQL_CONNECTION_STRING ' )
Microsoft's DAB documentation explicitly shows that @env( ' MSSQL_CONNECTION_STRING ' ) tells Data API builder to read the connection string from an environment variable at runtime.
That fits this scenario because Azure Container Apps secrets are typically exposed to the container as environment variables . Microsoft's Azure Container Apps documentation states that environment variables can reference secrets, and DAB's Azure Container Apps deployment guidance shows a secret being mapped into an environment variable that DAB then reads.
Why the other options are wrong:
* A and D incorrectly point the connection string to DAB_CONFIG_BASE64, which is the config payload secret, not the SQL connection string.
* C uses secretref: syntax inside dab init, but DAB expects the connection string parameter in the config to use the environment-variable reference syntax @env(...). The secretref: pattern is for Azure Container Apps environment variable configuration, not for the DAB CLI connection-string argument itself.
So the correct command is:
dab init --database-type mssql --connection-string " @env( ' MSSQL_CONNECTION_STRING ' ) " --host- mode Production --config dab-config.json
by Merle at Jun 10, 2026, 07:17 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).