# PostgreSQL Bulk Loader

## <img src="/files/Bb55DPiMUdQPeH5QoSEC" alt="" data-size="line"> PostgreSQL Bulk Loader

### Description <a href="#description" id="description"></a>

The PostgreSQL Bulk Loader transform streams data from Hop to Postgresql using ["COPY DATA FROM STDIN"](https://www.postgresql.org/docs/current/sql-copy.html) into the database.

{% hint style="info" %}
Tip: Replace boolean fields in your pipeline stream by string fields with "Y" or "N" values to avoid errors.
{% endhint %}

| Hop Engine | <sup>✓</sup> |
| ---------- | ------------ |
| Spark      | ?            |
| Flink      | ?            |
| Dataflow   | ?            |

{% hint style="warning" %}
Important: The PostgreSQL Bulk Loader is linked to the database type. It will fetch the JDBC driver from the hop/lib/jdbc folder.\
Valid locations for the JDBC driver for this transform are the database plugin lib and the main hop/lib folder. It will not work in combination with the SHARED\_JDBC\_FOLDER variable.
{% endhint %}

### Options

| Option           | Description                                                                                                                                                                                                                                                                                                                                                    |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Transform name   | Name of the transform.                                                                                                                                                                                                                                                                                                                                         |
| Connection       | Name of the database connection on which the target table resides.                                                                                                                                                                                                                                                                                             |
| Target schema    | The name of the Schema for the table to write data to. This is important for data sources that allow for table names with dots '.' in it.                                                                                                                                                                                                                      |
| Target table     | Name of the target table.                                                                                                                                                                                                                                                                                                                                      |
| Load action      | Insert, Truncate. Insert inserts, truncate first truncates the table.                                                                                                                                                                                                                                                                                          |
| DB Name Override | (optional) database name to override the database name used in this transform’s connection.                                                                                                                                                                                                                                                                    |
| Enclosure        | the enclosure character to use in the `QUOTE AS` part of the copy command                                                                                                                                                                                                                                                                                      |
| Delimiter        | the delimiter character to use in the `DELIMITER AS` part of the copy command                                                                                                                                                                                                                                                                                  |
| Stop on error    | Stop the execution of this transform when an error occurs                                                                                                                                                                                                                                                                                                      |
| Fields to load   | <p>This table contains a list of fields to load data from, properties include:</p><ul><li>Table field: Table field to be loaded in the PostgreSQL table;</li><li>Stream field: Field to be taken from the incoming rows;</li><li>Date mask: Either "Pass through, "Date" or "DateTime", determines how date/timestamps will be loaded in PostgreSQL.</li></ul> |


---

# 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.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/postgresbulkloader.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.
