The dbt command generates dbt models based on the DBML (Database Markup Language) extracted from a source database. This DBML should have been generated by the previous (extract) command, providing a foundation for creating structured data transformations within dbt.
rosetta [-c, --config CONFIG_FILE] dbt [-h, --help] [-s, --source CONNECTION_NAME]
| Parameter | Description |
|---|---|
| -h, --help | Show the help message and exit. |
| -c, --config CONFIG_FILE | YAML config file. If none is supplied it will use main.conf in the current directory if it exists. |
| -s, --source CONNECTION_NAME | The source connection name where models are generated. |
Here’s a basic example command that uses the dbt function:
rosetta dbt -s source_db_connection
This command will:
- Use source_db_connection to locate the DBML generated from the extract command.
- Generate corresponding dbt models that reflect the structure of the source database.
- Integration with dbt: The generated
dbtmodels allow for scalable and reusable SQL transformations, helping align your data structure with your analytics or ETL workflows. - Configuration: Ensure that the configuration file (main.conf or specified config) contains accurate connection details for the source database, as it serves as the base for generating
dbtmodels.