Skip to content

Instantly share code, notes, and snippets.

@rockwotj
Last active January 28, 2025 21:19
Show Gist options
  • Save rockwotj/12f23569fb1c6638783de5e817caa015 to your computer and use it in GitHub Desktop.
Save rockwotj/12f23569fb1c6638783de5e817caa015 to your computer and use it in GitHub Desktop.
input:
generate:
mapping: |
root = {
"bar": random_int(),
"baz": uuid_v4(),
"foo": uuid_v4(),
"host": nanoid(64),
"host2": nanoid(54),
"id": counter(),
"more": {
"bar": nanoid(54),
"baz": ksuid(),
"host": "fastpanda",
"nested": {
"id": snowflake_id(),
"qux": counter(),
"thud": uuid_v4(),
"timestamp": now()
},
"snowflake_id": snowflake_id(),
"timestamp": now()
},
"nested": {
"id": uuid_v4(),
"more": {
},
"qux": random_int(),
"thud": uuid_v4(),
"timestamp": now()
},
"aa": timestamp_unix_milli(),
"ab": timestamp_unix_nano(),
"abar": random_int(),
"abaz": ksuid(),
"ahost": ulid(),
"areally_long_key_what": random_int(),
"asnowflake_id": snowflake_id(),
"atimestamp": now(),
"snowflake_id": snowflake_id(),
"time?": now(),
"timestamp": now()
}
interval: 0
count: 0
batch_size: 128
auto_replay_nacks: true
pipeline:
processors: []
output:
kafka_franz:
seed_brokers: ["${REDPANDA_BROKER}"]
topic: "random_json_data"
tls: {enabled: true}
compression: zstd
sasl:
- mechanism: SCRAM-SHA-256
username: ${USER}
password: ${PASSWORD}
max_in_flight: 1024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment