Skip to content

Commit c8f6a99

Browse files
Update documentation (#873)
Co-authored-by: tim-quix <136370015+tim-quix@users.noreply.github.com>
1 parent 62980fa commit c8f6a99

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

docs/api-reference/quixstreams.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -4440,7 +4440,7 @@ Default - `json.dumps`.
44404440
class PostgreSQLSink(BatchingSink)
44414441
```
44424442

4443-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/postgresql.py#L53)
4443+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/postgresql.py#L54)
44444444

44454445
<a id="quixstreams.sinks.community.postgresql.PostgreSQLSink.__init__"></a>
44464446

@@ -4452,7 +4452,8 @@ def __init__(host: str,
44524452
dbname: str,
44534453
user: str,
44544454
password: str,
4455-
table_name: str,
4455+
table_name: Union[Callable[[SinkItem], str], str],
4456+
schema_name: str = "public",
44564457
schema_auto_update: bool = True,
44574458
connection_timeout_seconds: int = 30,
44584459
statement_timeout_seconds: int = 30,
@@ -4463,7 +4464,7 @@ def __init__(host: str,
44634464
**kwargs)
44644465
```
44654466

4466-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/postgresql.py#L54)
4467+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/postgresql.py#L55)
44674468

44684469
A connector to sink topic data to PostgreSQL.
44694470

@@ -4472,9 +4473,13 @@ A connector to sink topic data to PostgreSQL.
44724473
- `host`: PostgreSQL server address.
44734474
- `port`: PostgreSQL server port.
44744475
- `dbname`: PostgreSQL database name.
4475-
- `user`: Database user name.
4476+
- `user`: Database username.
44764477
- `password`: Database user password.
4477-
- `table_name`: PostgreSQL table name.
4478+
- `table_name`: PostgreSQL table name as either a string or a callable which
4479+
receives a SinkItem and returns a string.
4480+
- `schema_name`: The schema name. Schemas are a way of organizing tables and
4481+
not related to the table data, referenced as `<schema_name>.<table_name>`.
4482+
PostrgeSQL uses "public" by default under the hood.
44784483
- `schema_auto_update`: Automatically update the schema when new columns are detected.
44794484
- `connection_timeout_seconds`: Timeout for connection.
44804485
- `statement_timeout_seconds`: Timeout for DDL operations such as table

docs/api-reference/sinks.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -1863,7 +1863,7 @@ if __name__ == "__main__":
18631863
class PostgreSQLSink(BatchingSink)
18641864
```
18651865

1866-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/postgresql.py#L53)
1866+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/postgresql.py#L54)
18671867

18681868
<a id="quixstreams.sinks.community.postgresql.PostgreSQLSink.__init__"></a>
18691869

@@ -1877,7 +1877,8 @@ def __init__(host: str,
18771877
dbname: str,
18781878
user: str,
18791879
password: str,
1880-
table_name: str,
1880+
table_name: Union[Callable[[SinkItem], str], str],
1881+
schema_name: str = "public",
18811882
schema_auto_update: bool = True,
18821883
connection_timeout_seconds: int = 30,
18831884
statement_timeout_seconds: int = 30,
@@ -1888,7 +1889,7 @@ def __init__(host: str,
18881889
**kwargs)
18891890
```
18901891

1891-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/postgresql.py#L54)
1892+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/postgresql.py#L55)
18921893

18931894
A connector to sink topic data to PostgreSQL.
18941895

@@ -1899,9 +1900,13 @@ A connector to sink topic data to PostgreSQL.
18991900
- `host`: PostgreSQL server address.
19001901
- `port`: PostgreSQL server port.
19011902
- `dbname`: PostgreSQL database name.
1902-
- `user`: Database user name.
1903+
- `user`: Database username.
19031904
- `password`: Database user password.
1904-
- `table_name`: PostgreSQL table name.
1905+
- `table_name`: PostgreSQL table name as either a string or a callable which
1906+
receives a SinkItem and returns a string.
1907+
- `schema_name`: The schema name. Schemas are a way of organizing tables and
1908+
not related to the table data, referenced as `<schema_name>.<table_name>`.
1909+
PostrgeSQL uses "public" by default under the hood.
19051910
- `schema_auto_update`: Automatically update the schema when new columns are detected.
19061911
- `connection_timeout_seconds`: Timeout for connection.
19071912
- `statement_timeout_seconds`: Timeout for DDL operations such as table

0 commit comments

Comments
 (0)