Skip to main content
Version: 3.0.0

Postgres Read Component

A component that reads data from a Postgresql table.

Examples

component:
read:
connection: my-postgres-connection
postgres:
table:
name: my_table
schema: my_schema

PostgresReadComponent

info

PostgresReadComponent is defined beneath the following ancestor nodes in the YAML structure:

Below are the properties for the PostgresReadComponent. Each property links to the specific details section further down in this page.

PropertyDefaultTypeRequiredDescription
materializationMergeMaterialization
NoStrategy to use for data materialization during the read process.
replication  One of:
    Any of:
      string ("cdc")
      CdcReplication
    Any of:
      string ("incremental")
      IncrementalReplication
NoReplication strategy to use for data synchronization.
connectionstring
NoThe name of the connection to use for reading data.
columnsarray[ComponentColumn]
NoA list specifying the columns to read from the source and transformations to make during read.
normalizeboolean
NoA boolean flag indicating if the output column names should be normalized to a standard naming convention after reading.
preserve_caseboolean
NoA boolean flag indicating if the case of the column names should be preserved after reading.
uppercaseboolean
NoA boolean flag indicating if the column names should be transformed to uppercase after reading.
chunk_sizeinteger
NoSize of chunks to read from the table at a time.
postgresPostgresAny of:
  SingleTableWithSchema
  MultipleTablesWithSchema
  SingleQuery
  MultipleQueries
NoPostgres read options.

Property Details

Component

A component is a fundamental building block of a data flow. Types of components that are supported include: read, transform, task, test, and more.

PropertyDefaultTypeRequiredDescription
componentOne of:
  ReadComponent
  TransformComponent
  TaskComponent
  SingularTestComponent
  CustomPythonReadComponent
  WriteComponent
  CompoundComponent
  AliasedTableComponent
  ExternalTableComponent
YesConfiguration options for the component.

ReadComponent

A component that reads data from a data system.

PropertyDefaultTypeRequiredDescription
data_plane  One of:
    SnowflakeDataPlane
    BigQueryDataPlane
    DuckdbDataPlane
    SynapseDataPlane
NoData Plane-specific configuration options for a component.
namestring
NoThe name of the model
descriptionstring
NoA brief description of what the model does.
metadataResourceMetadata
NoMeta information of a resource. In most cases it doesn't affect the system behavior but may be helpful to analyze project resources.
flow_namestring
NoThe name of the flow that the component belongs to.
skipboolean
NoA boolean flag indicating whether to skip processing for the component or not.
data_maintenanceDataMaintenance
NoThe data maintenance configuration options for the component.
testsComponentTestColumn
NoDefines tests to run on the data of this component.
readOne of:
  GenericFileReadComponent
  LocalFileReadComponent
  S3ReadComponent
  GcsReadComponent
  AbfsReadComponent
  HttpReadComponent
  MSSQLReadComponent
  MySQLReadComponent
  OracleReadComponent
  PostgresReadComponent
  SnowflakeReadComponent
  BigQueryReadComponent
YesThe read component that reads data from a data system.

CdcReplication

Specifies if Change Data Capture (CDC) is the replication strategy.

PropertyDefaultTypeRequiredDescription
cdcCdcOptions
NoResource for Change Data Capture (CDC), enabling incremental data capture based on changes.

CdcOptions

No properties defined.

ComponentColumn

Component column expression definition.

No properties defined.

IncrementalReplication

Specifies if incremental data reading is the replication strategy.

PropertyDefaultTypeRequiredDescription
incrementalIncrementalColumn
NoResource for incremental data reading based on a specific column.

IncrementalColumn

Specifies the column to be used for incremental reading.

PropertyDefaultTypeRequiredDescription
column_namestringYesName of the column to use for tracking incremental updates to the data.
start_valueAny of:
  string
  integer
  number
  string
NoInitial value to start reading data from the specified column.

MergeMaterialization

Specifies that the component should merge to materialize the data.

PropertyDefaultTypeRequiredDescription
mergeMergeOptions
NoResource for merging data, including handling deletions and identifying unique records.

MergeOptions

Resource options for data merging, including mode selection and criteria for detecting deletions and unique records.

PropertyDefaultTypeRequiredDescription
modeModeEnumYesSpecifies the mode to use for merging data: 'history' to keep all versions, 'latest' to keep only the latest.
deletion_colstring
NoColumn name to use for identifying deleted records.
unique_keystringYesColumn or set of columns used as a unique identifier for records, aiding in the merge process.
on_schema_changestring ("ignore", "fail", "append_new_columns", "sync_all_columns")NoPolicy to apply when schema changes are detected.

ModeEnum

No properties defined.

MultipleQueries

Options to define one or more arbitrary select statements. The output of the queries will be unioned together, and must return the same database schema.

PropertyDefaultTypeRequiredDescription
queriesarray[string]
NoList of SQL queries to execute for reading data.

MultipleTablesWithSchema

Options for reading from multiple tables in a specific schema.

PropertyDefaultTypeRequiredDescription
tablesarray[TableWithSchemaOptions]YesList of tables (in specified schemas) to read data from.

SingleQuery

Options to define an arbitrary select statement.

PropertyDefaultTypeRequiredDescription
querystringNoSQL query to execute for reading data.

SingleTableWithSchema

Options for reading from a single table in a specific schema.

PropertyDefaultTypeRequiredDescription
tableTableWithSchemaOptionsYesTable (in specified schema) to read data from.

TableWithSchemaOptions

Options for reading from a specific table in a schema.

PropertyDefaultTypeRequiredDescription
namestringYesName of the table to be read.
schemastring
NoSchema of the table, if applicable.