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. |