28 lines
1009 B
YAML
28 lines
1009 B
YAML
# This tells Benthos: Use the 'sql_poller' template as the input
|
|
input:
|
|
sql_poller:
|
|
dsn: "postgres://invixel_admin:${ECOM_PASS}@postgres-ha-rw.db.svc.cluster.local:5432/ecommerce?sslmode=allow"
|
|
|
|
#dsn: "postgres://yugabyte@yugabytedb-2:5433/ecommerce?sslmode=disable"
|
|
table_name: "transaction"
|
|
id_column: "id" # Or 'id' if you use the hashed string
|
|
|
|
# pipeline:
|
|
# processors:
|
|
# - mapping: |
|
|
# root = this
|
|
# # Set metadata globally so all outputs and templates can see it
|
|
# root.transaction_id = this.transaction_id.or("unknown")
|
|
|
|
|
|
# - log:
|
|
# level: INFO
|
|
# message: "2b.New transaction: status - order ID: ${! meta(\"order_id\") } timestamp: ${! json(\"timestamp\")} timestamp3 ${! timestamp }"
|
|
|
|
# The output sends the polled data back to NATS
|
|
# output:
|
|
# nats_jetstream:
|
|
# urls: [ "nats:4222" ]
|
|
# subject: "output_transaction"
|
|
# stream: "fact_stream"
|
|
# manage_stream: true # This is the key setting |