> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/data-pipeline-5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bdb.ai/data-pipeline-5/getting-started/homepage/create/exporting-a-script-from-data-science-lab.md).

# Exporting a Script From Data Science Lab

This feature enables users to export their written scripts from DS Lab notebook in order to use them in Pipeline and Jobs

{% hint style="warning" %}
*<mark style="color:orange;">**Prerequisite:**</mark> The user needs to create a project under the DS Lab module before using this feature.*
{% endhint %}

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvmyGSlDvDj86v7eh3RHM%2Fuploads%2FYlUWLSV3LRcHiFFqRblU%2F2024-02-27-19-17-36%20(online-video-cutter.com).mp4?alt=media&token=a8e43817-dc62-45e3-bfb4-c90e6b9db512>" %}
***Exporting a Script from DS Lab notebook***
{% endembed %}

**Follow the below-given steps to export a script from the DS Lab notebook:**

* Activate and open a project under the DS Lab module.
* The user can create or open the previously created notebook where the scripts have been written.
* Go to the Notebook options and click the ***Export*** option.

<figure><img src="https://content.gitbook.com/content/6ZP8JhQPMmuTgMyLMcCU/blobs/Wh0RGIYmZeSF2AM0Vm4B/image.png" alt=""><figcaption></figcaption></figure>

* The ***Export to Pipeline/Git*** panel opens from the right side of the window; select Export to Pipeline option.
* Select the scripts using the check boxes to export them.
* Click the ***Next*** option.&#x20;

<figure><img src="https://content.gitbook.com/content/6ZP8JhQPMmuTgMyLMcCU/blobs/FPQtfwgSzb2o6oi2SErx/image.png" alt=""><figcaption><p><em>Exporting a Script</em></p></figcaption></figure>

* Click the ***Validate*** icon to validate the selected scripts.
* The user can also export ***External Libraries*** used in the project along with scripts.&#x20;

  * Click the ***External Libraries*** ![](https://content.gitbook.com/content/6ZP8JhQPMmuTgMyLMcCU/blobs/6ogRoCdlO1hmDHXHiSd0/image.png)icon.&#x20;
  * The ***Libraries*** panel opens. Select the necessary libraries to be exported along with the scripts.

  &#x20;      ![](https://content.gitbook.com/content/6ZP8JhQPMmuTgMyLMcCU/blobs/Ytq1eYyijtgzQqP5Yqnz/image.png)
* A notification message appears to ensure the user for the validation of the script.

<figure><img src="https://content.gitbook.com/content/6ZP8JhQPMmuTgMyLMcCU/blobs/S00Y6uk1ndtjZ97eBje0/image.png" alt=""><figcaption><p><em><strong>Validating the script while exporting</strong></em></p></figcaption></figure>

* After that, click on the ***Export to Pipeline*** option, and the selected scripts will be exported along with the chosen external libraries.
* The user can use the exported scripts in the Pipeline, Jobs ([***Python Job***](/data-pipeline-5/getting-started/homepage/create/creating-a-new-job/python-job.md), [***PySpark Job***](/data-pipeline-5/getting-started/homepage/create/creating-a-new-job/pyspark-job.md)).

{% hint style="info" %}
*<mark style="color:green;">**Please Note:**</mark> Files with the  **.ipynb** extension can be exported to the pipelines and jobs for the further user, while those with the  **.py** extension can only be utilized as the utility files. Additional information on utility files can be found here:* [***Utility***](https://app.gitbook.com/o/BHXEmSpD7W3xDgxnOIpk/s/vmyGSlDvDj86v7eh3RHM/~/changes/26/getting-started/homepage/create/utility)
{% endhint %}
