Connect to an existing PostgreSQL instance and extract data. Rows of data in PostgreSQL are extracted as JSON objects.
Supports common implementations of PostgreSQL including Supabase

Properties

Required properties:
  • connection_string: Connection string to the Postgres instance
  • query: SQL query to extract data (i.e. Select * From TableName)
Optional properties:
  • batch_size: The size of batches of rows. Affects performance and latency.
Compatible loaders:
  • NeumJSONLoader

Usage

from neumai.DataConnectors import PostgresConnector
from neumai.Shared import Selector

postgres_connector =  PostgresConnector(
    connection_string = "postgresql://postgres:<password>@<host>:<port>/postgres",
    query = """ Select * From "TableName"; """
)