Skip to content

Instantly share code, notes, and snippets.

@MichaelDrogalis
Created November 2, 2023 18:10
Show Gist options
  • Save MichaelDrogalis/457c4da0a72ea49dbb806fc1bf854e6d to your computer and use it in GitHub Desktop.
Save MichaelDrogalis/457c4da0a72ea49dbb806fc1bf854e6d to your computer and use it in GitHub Desktop.
{
"generators": [
{
"connection": "pg",
"table": "customers",
"row": {
"name": {
"_gen": "string",
"expr": "#{Name.firstName}"
}
}
},
{
"connection": "dev-kafka",
"topic": "orders",
"value": {
"orderId": { "_gen": "uuid" },
"customerId": {
"_gen": "lookup",
"connection": "pg",
"table": "customers",
"path": ["name"],
"histogram" : {
"_gen" : "histogram",
"bins" : [
{
"bin" : 0.2,
"frequency" : 8
},
{
"bin" : 0.8,
"frequency" : 2
}
]
}
}
}
}
],
"connections": {
"dev-kafka": {
"kind": "kafka",
"producerConfigs": {
"bootstrap.servers": "localhost:9092",
"key.serializer": "io.shadowtraffic.kafka.serdes.JsonSerializer",
"value.serializer": "io.shadowtraffic.kafka.serdes.JsonSerializer"
}
},
"pg": {
"kind": "postgres",
"connectionConfigs": {
"host": "localhost",
"port": 5432,
"username": "postgres",
"password": "postgres",
"db": "mydb"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment