1

I'm new to Ruby, want to do a proof of concept and compare with Apache Camel for an ETL project.

Not clear with differences from the Pro version for database support. So, what can be done with database processing with (not Pro) Kiba?

Seems like all documentation code snippets are file examples...

Mozart
  • 13
  • 2

1 Answers1

1

I'm the author of Kiba.

Kiba Pro provides a well-maintained, carefully crafted set of database related components (and other components on other topics in the future), but you can work with databases without Kiba Pro too.

For example, if you use ActiveRecord (the most common ORM that you'd use with Rails), you can write a source to fetch records like this:

class ActiveRecordSource
  def initialize(model:)
    @model = model
  end

  def each
    @model.find_each do |instance|
      yield instance
    end
  end
end

then to be used like this:

source ActiveRecordSource, model: User.where('age > 21)

You can also leverage other Ruby database tools, like Sequel (which Kiba Pro leverages), or tools like ActiveRecordImport.

You could also take inspiration from kiba plus, a library which I do not maintain despite the naming, but which I believe provides database-related components.

Once you have basic components working, you can do a lot of things with Kiba itself, ranging from data munging, data migrations etc.

Hope this provides a good starting point, let me know if this properly answers your question!

Thibaut Barrère
  • 8,845
  • 2
  • 22
  • 27