> For the complete documentation index, see [llms.txt](https://docs.bdb.ai/data-science-lab-4/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-science-lab-4/repo-sync-project/tabs-for-a-data-science-lab-project/tabs-for-pyspark-environment/notebook/notebook-page/operations-for-an-.ipynb-file/writers.md).

# Writers

* The user can run a code cell with dataset details.
* Run the cell.
* The preview of the dataset appears below.

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

* The limit function is applied to write the selective rows to the database.

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

* Click the ***Secrets*** tab to get the registered DB secrets.
* Select a registered DB secret keys from the given filter option under the ***Secrets*** tab.
* Add new code cell.
* Get the Secrets keys of the DB in it by using the checkboxes provided for the listed Secret keys.
* Check the authorization of the secret keys by running the cell.

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

* Add a new code cell.
* Open the ***Writers*** section.
* Use the given checkbox to select a driver type for the writers.
* The code gets added to the newly added cell.

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

* Map the required information of the writer such as Username, Password, Host, Port using the above acquired secret values. Also, mention the database name where you wish to write the data.

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

* Also provide the authenticated database, table name and data frame to write the chosen data.

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

* Run the code cell with the modified database details.
* A message appears below stating that the DataFrame has been written to the database. The data gets written to the specified database.

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

* The user can validate the specified table from the Dataset Create page and get the data preview.

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

{% hint style="info" %}
*<mark style="color:green;">Please Note:</mark> Refer the* [***Data Science Lab Quick Start Flow***](https://docs.bdb.ai/data-science-lab-4/data-science-lab-quick-start-flow) *page to get an overview of the **Data Science Lab** module in nutshell.*&#x20;
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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/data-science-lab-4/repo-sync-project/tabs-for-a-data-science-lab-project/tabs-for-pyspark-environment/notebook/notebook-page/operations-for-an-.ipynb-file/writers.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.
