1. A developer wants to test a new macro in isolation before using it in a production model. They run `dbt run-operation my_macro --args '{column_name: order_id}'`. Which of the following statements accurately describes what `dbt run-operation` does?
- A. It compiles and executes the macro against the warehouse, returning a result set that dbt displays in the terminal.
- B. It executes the macro as a standalone operation against the warehouse but does NOT create or modify any model relations unless the macro explicitly runs DDL/DML statements.✓ Correct
- C. It compiles the macro to SQL and saves the output to the `target/compiled/` directory without executing anything.
- D. It runs the macro and automatically creates a temporary table in the warehouse with the macro's output for inspection.
Explanation
`dbt run-operation` invokes a macro directly against the warehouse connection. It executes whatever SQL the macro contains (e.g., `run_query`, logging, DDL), but it does not create dbt model relations on its own. If the macro doesn't execute any SQL statements, nothing happens in the warehouse. It does not return a result set to the terminal like a SELECT would (unless the macro explicitly logs output). It does not save output to `target/compiled/`. It does not auto-create temporary tables.