Luan Campina

RPA at Keyrus

Back to writing

Building with Go: Lessons from a Financial Data Pipeline

What I learned building a Go application to process Brazilian FIDC fund data and integrate with Pipefy's GraphQL API.

goengineeringfinance

I recently built a data pipeline in Go for processing Brazilian FIDC (Fundo de Investimento em Direitos Creditórios) data. Here's what I learned.

Why Go?

Coming from a JavaScript background, Go felt alien at first. No classes, no this, no npm chaos. But for a data processing pipeline that needs to be fast and reliable, it turned out to be the perfect choice.

type FIDCFund struct {
    CNPJ       string    `json:"cnpj"`
    Name       string    `json:"name"`
    NetWorth   float64   `json:"net_worth"`
    UpdatedAt  time.Time `json:"updated_at"`
}

The type system catches bugs before they happen. The error handling, while verbose, forces you to think about every failure mode.

The GraphQL integration

Connecting to Pipefy's API was the most interesting part. GraphQL in Go isn't as ergonomic as in TypeScript, but the trade-off in performance and reliability was worth it.

When working with GraphQL in Go, define your query strings as constants and your response types as structs. It's more verbose but much safer than dynamic approaches.

Key takeaways

Three things I'd tell anyone starting a similar project:

  1. Start with the data model. Everything flows from how you structure your types.
  2. Handle errors explicitly. Go makes this annoying on purpose — embrace it.
  3. Write tests early. go test is simple and fast. Use it from day one.

Go won't replace JavaScript in my toolkit, but it earned a permanent spot for anything that touches data processing or backend infrastructure.