DBT-ANALYTICS-ENGINEERING practice question 1 of 35
What is the purpose of the --resource-type argument in the dbt ls command?
Full set: 409 questionsDomain dbt fundamentals
The dbt ls command is used to list resources within a dbt project. The --resource-type argument specifically filters this list to display only resources of a certain type. Valid resource types include model, test, source, seed, snapshot, exposure, metric, semanticmodel, savedquery, and analysis. For example, using dbt ls --resource-type model will list all models in the project, while dbt ls --resource-type test will list all tests. This argument provides a direct way to categorize and view specific kinds of project assets.
A. Incorrect. Selecting resources by specific configurations (e.g., materialized, schema) is done using the --select argument with the config: selector, not --resource-type.
B. Incorrect. While materialization is a configuration, it is selected using dbt ls --select config.materialized:, not the --resource-type argument.
C. Incorrect. Selecting resources by their assigned tags is accomplished using the --select argument with the tag: selector (e.g., dbt ls --select tag:nightly).
1. dbt Labs. (n.d.). dbt ls command. dbt Core documentation. Retrieved from https://docs.getdbt.com/reference/commands/ls.
Reference Details: The "Arguments" section explicitly lists --resource-type and describes its function: "Only list resources of the specified type." It also provides the list of valid resource types.
2. dbt Labs. (n.d.). Node selection syntax. dbt Core documentation. Retrieved from https://docs.getdbt.com/reference/node-selection/syntax.
Reference Details: This page details the various selection methods. It shows that selecting by tag and config (which includes materialization) are done using the --select flag
distinguishing them from the --resource-type flag's purpose.
Keep practicing
Take the free DBT-ANALYTICS-ENGINEERING practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other DBT-ANALYTICS-ENGINEERING practice questions
- Question 2Select the valid methods for configuring incremental models in dbt. (Select all that appl…
- Question 3When fixing a dbt model issue, it is acceptable to skip the testing process in a separate…
- Question 4You want to run tests on only the models that have been modified since your last dbt run.…
- Question 5You discover that a dbt model is directly referencing a raw object in the database withou…
- Question 6What is the purpose of the dbt deps command in the dbt workflow?
- Question 7Which of the following commands will generate compiled SQL code and save it to the "targe…
