-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate multiple collections #73
Conversation
README.md
Outdated
@@ -30,6 +30,8 @@ specified time, and then repeating the same cycle. The connector always start wi | |||
|
|||
### Configuration | |||
|
|||
// TODO update this section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll update the readme shortly (probably tomorrow).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be super, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md
Outdated
@@ -30,6 +30,8 @@ specified time, and then repeating the same cycle. The connector always start wi | |||
|
|||
### Configuration | |||
|
|||
// TODO update this section |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That'd be super, thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lovromazgon finished reviewing. Code looks great. I think the only things that are missing are updating documentation in README, and changing to Operations
instead of Operation
in the type ConfigCollection
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (the comments nitpicks only:))!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
It's possible to simulate a 'read' time for records. It's also possible to simulate bursts through "sleep and generate" | ||
cycles, where the connector is sleeping for some time (not generating any records), then generating records for the | ||
specified time, and then repeating the same cycle. The connector always start with the sleeping phase. | ||
<!-- readmegen:source.parameters.table --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😍
Description
Important
Note that 235,975 added lines come from the file
internal/words.txt
, which is just the contents of/usr/share/dict/words
on my machine. The idea behind this is to generate random words rather than UUIDs. Also, it's an order of magnitude faster than generating a UUID, the price is a 2MB bigger binary.Adds support for generating records coming from multiple collections with different schemas. The configuration of the connector changed to allow configuring the new functionality, please refer to the readme and specification for the new parameters.
Some backwards-incompatible changes were made to parameters:
format.options
is now amap[string]string
, meaning that configuring fields is now done using separate parameters (e.g.format.options.my-field-name: "string"
)operation
doesn't accept the valuerandom
anymore, instead it allows you to specify a comma-separated list of operations (e.g.create,update
)readTime
was deprecated in favor ofrate
which lets you define the rate limit in records per second (the old parameter still works)I've taken the opportunity to overhaul the connector. Rate limiting is now smarter and takes into account the time since the last read (i.e. if the rate limit is 1 rec/s and Conduit executes reads only once per second, then the connector won't add any delay). Bursts now start in the generating phase (instead of in the sleep phase, as before). The operation of the generated record is taken into account when populating fields
.Payload.After
and.Payload.Before
to come closer to reality. The typetime
now generates a unix nanoseconds timestamp.Example
You can use this pipeline configuration pipeline to test the connector. It is configured to generate 10 records per second in bursts of 1 second, while taking a break for 3 seconds between bursts. Records will be logged on the destination.
Closes ConduitIO/conduit#1475
Quick checks: