# Migrating a Pipeline Using Git

This section outlines the process for migrating pipelines between distinct tenant environments. Tenant migration is typically undertaken for various reasons, including organizational restructuring, compliance requirements, or the consolidation of resources. This guide outlines the steps required to ensure a seamless and successful transfer of your pipeline assets.

Pipeline Migration is the process of moving a data pipeline from one environment to another. This is typically done to move a pipeline from a development or staging environment to a production environment. Migration ensures that the pipeline's structure and configurations remain consistent across different systems.

{% hint style="success" %}
*Check out the illustrations below on how to **migrate (export) a Pipeline**.*
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYaQlnE9b5yeAn1yiuRyq%2Fuploads%2FRbkWSQ3sunX7k83PWkiP%2FPushing%20Pipeline%20to%20Git_Git%20Migration.mp4?alt=media&token=dca305f8-e5e1-4ebe-b2e8-e10d91c5b764>" %}
***Git Export/Pipeline Migration***
{% endembed %}

The Import/ Git Import functionality facilitates the import of a pipeline that was previously exported (pushed for migration) from another environment.

{% hint style="success" %}
*Check out the illustration on importing a migrated pipeline to a different tenant space.*
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FYaQlnE9b5yeAn1yiuRyq%2Fuploads%2FCQcTyeAP5wSRJ57LV9pj%2FImporting%20a%20Migrated%20Pipeline.mp4?alt=media&token=7c970fe1-a092-4122-a8c5-282966475ce4>" %}
***Importing a Migrated Pipeline***&#x20;
{% endembed %}

{% hint style="info" %}
*<mark style="color:green;">Please note:</mark>* ***Push and Pull Permissions:** The Push and Pull functionality is exclusively available to users with the 'Admin' role or non-admin users who have been granted access to the platform's Admin module.*
{% endhint %}

## Part 1: Exporting a Pipeline to Git

This process, also known as a **Migration Export**, pushes a pipeline from its current tenant space to a Git repository, making it available for import into a different environment.

### **Steps to Export**

1. **Log In to the Source Tenant:** Sign in to your source platform account using the tenant space that contains the pipeline you want to export.
2. **Access the Pipelines Module:** Navigate to the **Data Engineering** module and open the **Pipelines** option.
3. **Initiate the Push:**
   * Find the pipeline you wish to export from the pipeline list.
   * Select the pipeline to open its right-side panel.
   * Click the **Push & Pull Pipeline** icon.
4. **Configure the Export:**
   * In the Push/Pull window, ensure the Push tab is selected (it is the default).
   * Provide a descriptive comment for this pipeline version.
   * Check the box next to Git Export (Migration).
5. **Execute the Push:** Click the **Push** button. A success message will confirm that the pipeline was successfully pushed to Git.

## Part 2: Importing a Pipeline from Git

This process allows you to import a pipeline that was previously exported from a different tenant. This is the Migration Import step.

{% hint style="info" %}
**Please note:** This function is only available to users with the '**Admin**' role or non-admin users with specific access to the **Admin** module.
{% endhint %}

### **Steps to Import**

1. **Log In to the Destination Tenant**: Sign in to the tenant space where you want the pipeline to reside.
2. **Access the Admin Module:**
   * Click on your user profile menu.
   * Select the **Settings** option.
   * Click the **Admin** icon.
3. **Open Git Migration:** From the Admin menu panel, select Git Migration.
4. **Start the Import Process:**
   * Click the **Import** file option.
   * On the **Import Document** page, click the **Import** button.
5. **Select and Migrate the Pipeline:**
   * On the Migration: Document Import page, select the New VCS option.
   * From the dropdown field, choose Pipeline.
   * Click the Pipelines option to view a list of available pipelines that have been exported.
   * Use the search bar to find the specific pipeline you need.
   * Select the pipeline from the list. The available versions will appear on the right side of the page.
   * Select the desired pipeline version by checking its corresponding box.
6. **Complete the Migration:** Click the Migrate option. A notification will confirm that the pipeline has been successfully migrated to your account.

* [x] The newly migrated pipeline will now appear in your Pipelines list under the Data Engineering module.&#x20;

  <figure><img src="/files/D796vXz3uoJBB3F1aig0" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bdb.ai/bdb-user-documentation/platform-modules/10.0/migration/migrating-a-pipeline-using-git.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
