> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prophecy.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Macro

> Use dbt macros in your pipelines

export const execution_engine_0 = "the SQL warehouse"

<Info>This gem runs in {execution_engine_0}.</Info>

## Overview

The Macro gem lets you use a macro that you have defined or imported in your SQL project. Macros provide a simple interface where you can define the values of your macro parameters (arguments). Use the Macro gem when you:

* Import macros via DBT Hub dependency.
* Want to use a simple interface for custom gems.

## Parameters

| Parameter     | Description                                                                                                                                                                        |
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Macro         | The macro that you wish to use.<br />Note: You can only select a Gem macro. You cannot select a macro defined as a [function](/data-analysis/development/extensibility/functions). |
| Parameter `1` | A parameter that is defined in the macro. This is a value that is passed to the macro.                                                                                             |
| Parameter `N` | Additional parameters that are defined in the macro.                                                                                                                               |

## Example: dbt\_utils

For this example, assume you want to use the `dbt_utils` package as a [dependency](/data-analysis/development/extensibility/dependencies) in your project.

1. Open the **Options** (ellipses) menu in the project header.
2. Select **Dependencies**.
3. Click **+ Add Dependency**.
4. Choose the dependency type (Project, GitHub, or DBT Hub).
5. Add the package `dbt-labs/dbt_utils`.
6. Choose version `1.3.0`.
7. Click **Create**.
8. Click **Reload and Save** to download the package.
9. Review the functions and gems that are available in the dbt\_utils package. You can click any function or gem to see the underlying macro code.

To use one of the imported gems in your pipeline:

1. Add the Macro gem to the canvas.
2. Open the gem configuration.
3. In the **Macro** field, choose the gem that you want to use. The gem parameters should appear.
4. Fill in the parameters. These are the arguments of the dbt macro.
5. Save and run the gem.

The following image shows the unpivot macro imported from `dbt_utils` in a Macro gem.

<img src="https://mintcdn.com/prophecy-62973bd0/88t3kPk63E5ZR9Oi/data-analysis/gems/custom/img/unpivot-macro.png?fit=max&auto=format&n=88t3kPk63E5ZR9Oi&q=85&s=83f7f014e4f962257e7cd06341b0b572" alt="Unpivot macro" width="2620" height="1508" data-path="data-analysis/gems/custom/img/unpivot-macro.png" />
