Skip to main content

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
CategoryDescription
ModelModelEach model is a DAG that defines a single table or view. A model can also serve as an input for other Models.
SourceDatasourceGems related to loading data: Seeds, Sources, or Models can be used as datasources.
TransformTransformGems related to the transformation of data.
Join and SplitJoinGems related to splitting or joining tables together.
CustomCustomThe set of Gems built to extend Prophecy's capabilities.