Repository navigation
feat(python): add sink data producer example - #4710
Conversation
|
Thanks for the PR. It is labeled If AI was used to create this PR, you must run the Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
|
Thanks for this. The record fields and value ranges match the Rust sink data producer, the SDK calls match the Python stubs, and the examples job ran it. A few things to change before it goes in:
The PR description says AI helped and the pre-commit hooks were not run. CONTRIBUTING.md asks for both: please run the |
|
@justinmclean Plz re-review |
hubcio
left a comment
There was a problem hiding this comment.
please address the issues below.
hubcio
left a comment
There was a problem hiding this comment.
please address the issues below.
Which issue does this PR address?
Closes #4700
Rationale
The Python examples were missing a sink data producer. Adding one makes it easier to generate sample JSON records for sink connectors and brings the Python examples in line with the existing Rust implementation.
What changed?
Added
examples/python/sink-data-producer/producer.py, which:IGGY_STREAM(default:qw) andIGGY_TOPIC(default:records) from environment variables.IggyClient.from_connection_string().user_id(string)user_type(integer)email(string)source(string)state(string)created_at(ISO-formatted string)message(string)Partitioning.balanced()andDirectProducerConfig.Also updated
examples/python/README.mdwith instructions for running the new example, configuring environment variables, and understanding its behaviour.Local Execution
ast.parse.AI Usage
AI was used to assist with repository exploration, implementation, and documentation.
I reviewed the changes and can explain the implementation and its design decisions.