vigimite / aqueducts

Framework to build data pipelines declaratively
Apache License 2.0
42 stars 2 forks source link

feat: add odbc support for source #2

Closed vigimite closed 4 months ago

vigimite commented 4 months ago

Description

add odbc support for sources using arrow_odbc. Users need to have unixodbc installed, the corresponding driver for the DB they are trying to access like mssql or postgres via psqlodbc and then register the driver in the unixodbc manager config (odbcinst.ini).

The source can then be configured as following:

sources:
  - type: Odbc
    name: jan_data
    connection_string: Driver={PostgreSQL Unicode};Server=localhost;UID=${user};PWD=${pass};
    query: SELECT * FROM temp_readings WHERE timestamp BETWEEN '2024-01-01' AND '2024-01-31'

The Driver property needs to be the name registered in the unixodbc manager config. The query is used to fetch arrow data from the database before being processed by the Aqueduct pipeline.

The sink implementation will be in a separate PR