Skip to content

Commit 1aaa907

Browse files
authored
Merge pull request segmentio#6573 from segmentio/dbt-git-sync
dbt and Git Extensions Public Beta [DOC-862]
2 parents 48f5dbb + 5222ad5 commit 1aaa907

File tree

4 files changed

+115
-0
lines changed

4 files changed

+115
-0
lines changed

src/_data/sidenav/main.yml

+9
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,15 @@ sections:
596596
title: System for Cross-domain Identity Management (SCIM) Configuration Guide
597597
- path: /segment-app/iam/mfa
598598
title: Multi-Factor Authentication (MFA)
599+
- section_title: Extensions
600+
slug: segment-app/extensions
601+
section:
602+
- path: /segment-app/extensions
603+
title: Extensions Overview
604+
- path: /segment-app/extensions/dbt
605+
title: dbt
606+
- path: /segment-app/extensions/git
607+
title: Git
599608
- path: /segment-app/iam/secure-password
600609
title: Picking a Secure Password
601610
- path: /segment-app/set-up-envs

src/segment-app/extensions/dbt.md

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: dbt Extension
3+
---
4+
5+
Segment's dbt extension lets you use [Reverse ETL](/docs/connections/reverse-etl/) with your existing dbt labs models and syncs to help centralize model management and versioning, reduce redundancies, and run CI checks to prevent breaking changes.
6+
7+
With Segment's dbt extension, you can:
8+
9+
- Securely connect Segment to the GitHub repository that stores your dbt models.
10+
- Use centralized dbt models to set up Reverse ETL.
11+
- Trigger Reverse ETL syncs from dbt jobs.
12+
13+
This page explains how to set up a dbt Model and then use the model with Reverse ETL.
14+
15+
> info ""
16+
> Extensions, including dbt sync, is currently in public beta and is governed by Segment's [First Access and Beta Preview Terms](https://www.twilio.com/en-us/legal/tos){:target="_blank"}.
17+
18+
## Before you begin
19+
20+
Keep the following in mind as you set up the dbt extension:
21+
22+
- The extension supports [dbt Core v1.7](https://docs.getdbt.com/docs/dbt-versions/core-upgrade/upgrading-to-v1.7){:target="_blank"}.
23+
- You can use [Snowflake](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/snowflake-setup/), [Databricks](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/databricks-setup/), [Redshift](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/redshift-setup/), [Postgres](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/postgres-setup/), and [BigQuery](/docs/connections/reverse-etl/reverse-etl-source-setup-guides/bigquery-setup/) as Reverse ETL sources.
24+
- dbt models aren't synchronized from the dbt cloud. The model sync connects to a Git repository that loads models into Segment for use with Reverse ETL.
25+
26+
## Set up Git dbt Models and dbt Cloud
27+
28+
To set up the dbt extension, you'll need:
29+
30+
- an existing dbt account with a Git repository
31+
- (for job syncs:) dbt cloud with jobs already created
32+
33+
### Git repository and dbt Models setup
34+
35+
Follow these steps to connect the Git repository that stores your dbt Models:
36+
37+
1. In your Segment workspace, navigate to **Settings > Extensions**.
38+
2. Click **Set up Git sync**.
39+
3. On the **Configure service credentials** page, select a service and protocol, add your SSH private key or GitHub token, then click **Next**.
40+
4. In the **Connect source** window, select a Reverse ETL warehouse source from the dropdown, then click **Save**.
41+
42+
After you've saved your setup, you can configure your Git repository's settings to your needs by changing the repository, branch, dbt version, default schema, and project path.
43+
44+
### dbt Cloud setup
45+
46+
You can also use dbt Cloud to schedule Reverse ETL syncs after a dbt Cloud job successfully runs.
47+
48+
To set up dbt Cloud:
49+
50+
1. In your Segment workspace, navigate to **Settings > Extensions**.
51+
2. Click **Manage dbt Cloud**.
52+
3. Add your dbt Cloud API key, and, optionally, a custom subdomain. Click **Save**.
53+
54+
### Model syncs
55+
56+
After you set up dbt, Segment runs an initial sync to load models from your connected Git repository. This initial sync lets you use the most recent models when you set up Reverse ETL. In addition to Segment's initial dbt sync, you can also trigger manual dbt model syncs.
57+
58+
### Use a model with Reverse ETL
59+
60+
After you've successfully set up dbt with a warehouse and connected to your Git repository, you can select dbt models for use with Reverse ETL by following these steps:
61+
62+
1. In your Segment workspace, navigate to **Connections > Sources** and select the Reverse ETL tab.
63+
2. Click **+Add Reverse ETL source** , select your source, then click **Add Model**.
64+
3. Click **dbt Models** as your modeling method, then select and preview a model from the dbt model dropdown.
65+
4. Add a primary key, then click **Preview your model**.
66+
5. Click **Next**.
67+
6. Enter your **Model Name**, then click **Create Model**.
68+
69+
To change a connected model, ensure that you've removed it from all active Reverse ETL syncs.

src/segment-app/extensions/git.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
title: Git Sync Extension
3+
---
4+
5+
Segment's Git extension lets you manage versioning by syncing changes you make in Sources and Destinations from your Segment workspace to a Git repository.
6+
7+
> info ""
8+
> Extensions, including Git sync, is currently in public beta and is governed by Segment's [First Access and Beta Preview Terms](https://www.twilio.com/en-us/legal/tos){:target="_blank"}.
9+
10+
## Set up Git sync
11+
12+
Follow these steps to set up Git sync:
13+
14+
1. In your Segment workspace, navigate to **Settings > Extensions**.
15+
2. Click **Set up Git sync**.
16+
3. On the **Configure service credentials** page, select a service and protocol, add your SSH private key or GitHub token, then click **Next**.
17+
18+
## Working with Git syncs
19+
20+
The Git sync extension syncs [Connections](/docs/connections/) ([Sources](/docs/connections/sources/) and [Destinations](/docs/connections/destinations/)) from Segment to your Git repository.
21+
22+
After you set up the Git sync extension for the first time, Segment performs an initial sync that sends source and destination information in your Segment workspace to the Git repository you connected.
23+
24+
You can run syncs at any time by clicking **Full resync** on the Git sync page. To disable Git sync from the Git sync page, switch the **Enabled** toggle to off.

src/segment-app/extensions/index.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Extensions
3+
---
4+
5+
Extensions integrate third-party tools into your existing Segment workspace to help you automate tasks.
6+
7+
> info ""
8+
> Extensions is currently in public beta and is governed by Segment's [First Access and Beta Preview Terms](https://www.twilio.com/en-us/legal/tos){:target="_blank"}. During Public Beta, Extensions is available for Team and Developer plans only. [Reach out to Segment](mailto:friends@segment.com) if you're on a Business Tier plan and would like to participate in the Public Beta.
9+
10+
During public beta, Segment offers the following extensions:
11+
12+
- [dbt models and dbt Cloud](/docs/segment-app/extensions/dbt), which lets you sync models with dbt Labs.
13+
- [Git sync](/docs/segment-app/extensions/git), which you can use to manage versioning and track changes in your Segment workspace.

0 commit comments

Comments
 (0)