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

# Transformation

> DBT Cloud via Datapiary for data transformations, with AI-generated models submitted as GitHub PRs.

## Overview

Brighthive uses DBT Cloud (integrated via Datapiary) for data transformations. The platform's DBT Agent can generate transformation models from natural language descriptions and submit them as GitHub pull requests — giving your team full control over what gets deployed.

## How It Works

```mermaid theme={null}
graph TD
    A[Describe Transformation] --> B[DBT Agent Generates Model]
    B --> C[GitHub PR Created]
    C --> D[Team Reviews & Approves]
    D --> E[DBT Cloud Runs Model]
    E --> F[Results in Redshift]
    F --> G[Lineage Tracked in Neo4j]
```

1. **Describe what you need** — Tell BrightAgent what transformation you want in plain English.
2. **DBT Agent generates the model** — Creates SQL transformations with proper dbt structure, configurations, and tests.
3. **GitHub PR submitted** — All generated code goes through a pull request for human review.
4. **Team reviews and approves** — Nothing gets deployed without your approval.
5. **DBT Cloud executes** — Approved models run on DBT Cloud, executing transformations in your Redshift warehouse.
6. **Neo4j tracks lineage** — Transformation relationships are recorded in the knowledge graph.

## DBT Cloud Integration

<CardGroup cols={2}>
  <Card title="Managed via Datapiary" icon="cloud">
    DBT Cloud is integrated through the Datapiary library, providing a consistent interface for transformation management.
  </Card>

  <Card title="Runs in Redshift" icon="warehouse">
    dbt models execute in your workspace's dedicated Redshift Serverless cluster.
  </Card>

  <Card title="Version Controlled" icon="code-branch">
    All dbt models live in Git — full history, branching, and code review via GitHub PRs.
  </Card>

  <Card title="Lineage in Neo4j" icon="share-nodes">
    Neo4j tracks dependencies between source tables, staging layers, and data marts — visible in the data catalog.
  </Card>
</CardGroup>

## What Neo4j Tracks

Neo4j serves as the control plane for transformations, maintaining visibility across:

* **Source tables** — Raw data from organizations.
* **Staging layers** — Cleaned and standardized intermediate tables.
* **Data marts** — Final analytical tables ready for consumption.
* **Dependencies** — Which models depend on which sources and other models.
* **Run history** — When transformations last ran and their status.
