pg_import_table_data
Transfer data from JSON or CSV files into a PostgreSQL table. Specify the table name, file path, and optional truncation, format, or delimiter settings for precise integration.
Instructions
Import data from JSON or CSV file into a table
Input Schema
Name | Required | Description | Default |
---|---|---|---|
connectionString | No | ||
delimiter | No | ||
format | No | json | |
inputPath | Yes | absolute path to the file to import | |
tableName | Yes | ||
truncateFirst | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"connectionString": {
"type": "string"
},
"delimiter": {
"type": "string"
},
"format": {
"default": "json",
"enum": [
"json",
"csv"
],
"type": "string"
},
"inputPath": {
"description": "absolute path to the file to import",
"type": "string"
},
"tableName": {
"type": "string"
},
"truncateFirst": {
"default": false,
"type": "boolean"
}
},
"required": [
"tableName",
"inputPath"
],
"type": "object"
}