# DB Writer

The **DB Writer** task is used to write data into relational and analytical databases. Supported targets are: **MySQL, MSSQL, Oracle, ClickHouse, Snowflake, PostgreSQL, and Redshift**.

### Configuring the Meta Information Tab Fields

To configure the DB Writer:

1. **Drag** the **DB Writer** task to the Workspace.
2. **Click** on the task to open the related configuration tabs.
3. The **Meta Information** tab opens by default. Configure the following fields:

| Field                | Description                                                                                                                    |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| **Host IP Address**  | Enter the Host IP Address for the selected driver.                                                                             |
| **Port**             | Enter the port for the given IP Address.                                                                                       |
| **Database name**    | Enter the name of the target database.                                                                                         |
| **Table name**       | Provide a single table name or multiple table names. If multiple tables are required, enter the names separated by commas (,). |
| **User name**        | Enter the user name for the target database.                                                                                   |
| **Password**         | Enter the password for the target database.                                                                                    |
| **Driver**           | Select the driver from the drop-down. Supported drivers: MySQL, MSSQL, Oracle, ClickHouse, Snowflake, PostgreSQL, Redshift.    |
| **Schema File Name** | Upload a Spark schema file in JSON format.                                                                                     |
| **Save Mode**        | Select the save mode from the drop-down. Options: **Append** or **Overwrite**.                                                 |
| **Query**            | Provide the **CREATE TABLE (DDL)** query.                                                                                      |


---

# 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/data-engineering/jobs/job-types/spark-job/writers/db-writer.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.
