
The pre-built binaries for FromTo are available in the releases page, they are the recommended installation option, but you can also compile the code yourself
- To compile FromTo first clone this repository in your machine
- Then open the cloned folder on a shell and run
make build
to build the binaries for all supported platforms, or runmake build/<platform>
to build for an specific platform. The currently supported platforms are:- linux
- windows
- macos
./from_to_linux_amd64 -config=./postgres_kafka_example_config.yaml
input:
connector: "postgres"
postgresConfig:
dsn: "postgres://from-to-user:from-to-passw@localhost:5432/from-to-db?sslmode=disable"
tables:
- "sales"
outputs:
salesKafkaOutput:
connector: "kafka"
kafkaConfig:
bootstrapServers:
- "localhost:9094"
topics:
- name: "publicSales"
mappers:
salesMapper:
type: "lua"
luaConfig:
filePath: "./example/mappers.lua"
function: "map_sales_event_with_http"
channels:
salesChannel:
from: "sales"
to: "publicSales"
output: "salesKafkaOutput"
mapper: "salesMapper"
Additional options and specific documentation on inputs, outputs and mappers can be found at the examples folder
FromTo supports Lua scripting to create row mappers, an example mapper can be found at example/mappers.lua. It uses the yuin/gopher-lua VM and preloads some of its libraries for improved DX.
FormTo development follows the Uber Go Style Guide
- Go 1.24+
- GNU Make (Optional)
- Docker or an compatible alternative
- Docker Compose or an compatible alternative