Skip to content

Files

Latest commit

1b84619 · Nov 27, 2024

History

History
26 lines (18 loc) · 1.42 KB

dbt.md

File metadata and controls

26 lines (18 loc) · 1.42 KB

Generate dbt models for analytics workflows

Command: dbt

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.
Example Command:

Here’s a basic example command that uses the dbt function:

rosetta dbt -s source_db_connection

This command will:

  1. Use source_db_connection to locate the DBML generated from the extract command.
  2. Generate corresponding dbt models that reflect the structure of the source database.
Additional Notes
  • Integration with dbt: The generated dbt models 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 dbt models.