You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* `table_name` (`str`): the PostgreSQL table to read from.
312
+
* `database` (`cocoindex.TransientAuthEntryReference[DatabaseConnectionSpec]`, optional): database connection reference. If not provided, the default CocoIndex database is used.
313
+
* `included_columns` (`list[str]`, optional): non-primary-key columns to include. If not specified, all non-PK columns are included.
314
+
* `ordinal_column` (`str`, optional): to specify a non-primary-key column used for change tracking and ordering, e.g. can be a modified timestamp or a monotonic version number. Supported types are integer-like (`bigint`/`integer`) and timestamps (`timestamp`, `timestamptz`).
315
+
`ordinal_column` must not be a primary key column.
316
+
317
+
### Schema
318
+
319
+
The output is a [*KTable*](/docs/core/data_types#ktable) with fields derived from the table schema:
320
+
321
+
* Key fields:
322
+
* If the table has a single primary key column, that column appears as the key field with its name and type.
323
+
* If the table has a composite primary key, a struct field named `_key` contains each PK component as a sub-field.
324
+
* Value fields: All non-primary-key columns included by `included_columns` (or all when not specified) appear as value fields.
0 commit comments