@@ -1863,7 +1863,7 @@ if __name__ == "__main__":
1863
1863
class PostgreSQLSink(BatchingSink)
1864
1864
```
1865
1865
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 )
1867
1867
1868
1868
< a id = " quixstreams.sinks.community.postgresql.PostgreSQLSink.__init__" >< / a>
1869
1869
@@ -1877,7 +1877,8 @@ def __init__(host: str,
1877
1877
dbname: str ,
1878
1878
user: str ,
1879
1879
password: str ,
1880
- table_name: str ,
1880
+ table_name: Union[Callable[[SinkItem], str ], str ],
1881
+ schema_name: str = " public" ,
1881
1882
schema_auto_update: bool = True ,
1882
1883
connection_timeout_seconds: int = 30 ,
1883
1884
statement_timeout_seconds: int = 30 ,
@@ -1888,7 +1889,7 @@ def __init__(host: str,
1888
1889
** kwargs)
1889
1890
```
1890
1891
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 )
1892
1893
1893
1894
A connector to sink topic data to PostgreSQL.
1894
1895
@@ -1899,9 +1900,13 @@ A connector to sink topic data to PostgreSQL.
1899
1900
- `host` : PostgreSQL server address.
1900
1901
- `port` : PostgreSQL server port.
1901
1902
- `dbname` : PostgreSQL database name.
1902
- - `user` : Database user name .
1903
+ - `user` : Database username .
1903
1904
- `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.
1905
1910
- `schema_auto_update` : Automatically update the schema when new columns are detected.
1906
1911
- `connection_timeout_seconds` : Timeout for connection.
1907
1912
- `statement_timeout_seconds` : Timeout for DDL operations such as table
0 commit comments