SQL Gems
In Prophecy and dbt, data models are groups of SQL statements used to create a single table or view. Prophecy simplifies data modeling by visualizing the data model as a series of steps, each represented by a Gem. Gems are functional units that perform tasks such as reading, transforming, writing, or handling other data operations.
Each gem corresponds to a SQL statement, which users can construct through an intuitive visual interface. Prophecy handles the underlying complexity by deciding whether each gem should generate a CTE or a subquery. Users simply configure the gem's interface, and Prophecy integrates the resulting SQL into the larger data model.
The table below outlines the different SQL gem categories.
Gem | Category | Description |
---|---|---|
![]() | Model | Each model is a DAG that defines a single table or view. A model can also serve as an input for other models. |
![]() | Datasource | Gems related to loading data: seeds, sources, or models can be used as datasources. |
![]() | Transform | Gems related to the transformation of data. |
![]() | Join | Gems related to splitting or joining tables together. |
![]() | Custom | The set of Gems built to extend Prophecy's capabilities. |