Skip to content

Commit 49d2c29

Browse files
Update documentation (#587)
Co-authored-by: daniil-quix <133032822+daniil-quix@users.noreply.github.com>
1 parent 1148799 commit 49d2c29

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

docs/api-reference/quixstreams.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3264,12 +3264,15 @@ If None, a default is used.
32643264
Example setup using an AWS-hosted Iceberg with AWS Glue:
32653265

32663266
```
3267-
from quixstreams.sinks.community.iceberg import IcebergSink, IcebergAWSConfig
3267+
from quixstreams import Application
3268+
from quixstreams.sinks.community.iceberg import IcebergSink, AWSIcebergConfig
32683269

3269-
iceberg_config = IcebergAWSConfig(
3270+
# Configure S3 bucket credentials
3271+
iceberg_config = AWSIcebergConfig(
32703272
aws_s3_uri="", aws_region="", aws_access_key_id="", aws_secret_access_key=""
32713273
)
32723274

3275+
# Configure the sink to write data to S3 with the AWS Glue catalog spec
32733276
iceberg_sink = IcebergSink(
32743277
table_name="glue.sink-test",
32753278
config=iceberg_config,
@@ -3278,10 +3281,16 @@ iceberg_sink = IcebergSink(
32783281

32793282
app = Application(broker_address='localhost:9092', auto_offset_reset="earliest")
32803283
topic = app.topic('sink_topic')
3284+
3285+
# Do some processing here
32813286
sdf = app.dataframe(topic=topic).print(metadata=True)
3287+
3288+
# Sink results to the IcebergSink
32823289
sdf.sink(iceberg_sink)
32833290

3291+
32843292
if __name__ == "__main__":
3293+
# Start the application
32853294
app.run()
32863295
```
32873296

@@ -3293,7 +3302,7 @@ if __name__ == "__main__":
32933302
def write(batch: SinkBatch)
32943303
```
32953304

3296-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/iceberg.py#L165)
3305+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/iceberg.py#L174)
32973306

32983307
Writes a batch of data to the Iceberg table.
32993308

docs/api-reference/sinks.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,15 @@ If None, a default is used.
8686
Example setup using an AWS-hosted Iceberg with AWS Glue:
8787

8888
```
89-
from quixstreams.sinks.community.iceberg import IcebergSink, IcebergAWSConfig
89+
from quixstreams import Application
90+
from quixstreams.sinks.community.iceberg import IcebergSink, AWSIcebergConfig
9091

91-
iceberg_config = IcebergAWSConfig(
92+
# Configure S3 bucket credentials
93+
iceberg_config = AWSIcebergConfig(
9294
aws_s3_uri="", aws_region="", aws_access_key_id="", aws_secret_access_key=""
9395
)
9496

97+
# Configure the sink to write data to S3 with the AWS Glue catalog spec
9598
iceberg_sink = IcebergSink(
9699
table_name="glue.sink-test",
97100
config=iceberg_config,
@@ -100,10 +103,16 @@ iceberg_sink = IcebergSink(
100103

101104
app = Application(broker_address='localhost:9092', auto_offset_reset="earliest")
102105
topic = app.topic('sink_topic')
106+
107+
# Do some processing here
103108
sdf = app.dataframe(topic=topic).print(metadata=True)
109+
110+
# Sink results to the IcebergSink
104111
sdf.sink(iceberg_sink)
105112

113+
106114
if __name__ == "__main__":
115+
# Start the application
107116
app.run()
108117
```
109118

@@ -117,7 +126,7 @@ if __name__ == "__main__":
117126
def write(batch: SinkBatch)
118127
```
119128

120-
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/iceberg.py#L165)
129+
[[VIEW SOURCE]](https://github.com/quixio/quix-streams/blob/main/quixstreams/sinks/community/iceberg.py#L174)
121130

122131
Writes a batch of data to the Iceberg table.
123132

0 commit comments

Comments
 (0)