Skip to main content
Gems are functional units in a pipeline that perform tasks such as reading, transforming, writing, or handling other data operations.

Categories

The table below outlines the different Spark gem categories.

Gem instance

When you click on a gem from the gem drawer, an instance of that gem gets added to your pipeline canvas. Use the image and the table below to understand the UI of a gem. Gem Instance
If you select one or more gems, you can copy and paste them within the same pipeline or across pipelines. However, you cannot paste across projects that use different languages (for example, from SQL to Scala).

Gem configuration

When you open a gem, you can configure how the gem will work. Gem instance configuration

Input ports

The Input tab defines the incoming connections accepted by the gem. Most gem types only accept one connection, but some (such as Join) allow for multiple inputs. Input UI

Output ports

The Output tab defines the outgoing schemas that will be available to downstream gems. In some cases, the Prophecy compiler can’t infer the output schema automatically, so you have the option to infer the schema using your connected fabric or specify it manually.

Action menu

The action menu gives you more granular control over individual gems. When you expand the action menu, you see the following options: Gem action menu

Gem phase

In a data pipeline, the phase of a gem determines the sequence in which it runs. This sequencing is managed by adjusting the order of the generated pipeline code.
Here’s how it works:
  • Gems are assigned a numerical phase (e.g., 0, 1, -1), where lower values run first. For example, a gem with phase 0 will execute before a gem with phase 1.
  • When a gem runs, all its upstream gems must also run. This means that if a downstream gem has phase 0 and an upstream gem has phase 1, the upstream gem will be grouped into phase 0 to ensure proper execution.
  • Because of this dependency, the phase assigned to the last gem in a branch determines the phase of the entire branch. This means that when configuring gem phases, you only need to focus on the leaf nodes—the final gems in each branch of the pipeline.