#odata #datafusion #rest #sql #arrow #api-integration

datafusion-odata

OData protocol adapter for Apache Datafusion

17 releases (8 major breaking)

new 43.0.0 Nov 8, 2024
42.1.0 Sep 23, 2024
41.1.0 Sep 11, 2024
40.0.0 Jul 16, 2024
0.4.0 Mar 15, 2024

#167 in HTTP server

Download history 17/week @ 2024-07-23 2/week @ 2024-07-30 63/week @ 2024-08-06 72/week @ 2024-08-13 109/week @ 2024-09-10 408/week @ 2024-09-17 456/week @ 2024-09-24 167/week @ 2024-10-01 215/week @ 2024-10-08 178/week @ 2024-10-15 249/week @ 2024-10-22 197/week @ 2024-10-29 219/week @ 2024-11-05

893 downloads per month

Apache-2.0

255KB
1.5K SLoC

OData Adapter For Apache Datafusion

About

This is an OData API adapter for Apache Datafusion SQL engine.

OData protocol is positioned as "The SQL of REST", but is a somewhat legacy protocol used by some older systems. We wouldn't recommend using it as an integration protocol for some new project, but this adapter is useful if you have to integrate your Datafusion app with some existing OData-focused system.

Quick Start

Start example:

RUST_LOG=debug cargo run --example simple_service

Query using xh:

Service root:

xh GET 'http://localhost:50051/'

Metadata:

xh GET 'http://localhost:50051/$metadata'

Query collection:

xh GET 'http://localhost:50051/tickers.spy?$select=offset,from_symbol,to_symbol,close&$top=5'

Status

This code is super raw and experimental. Very far from prod-ready. Use at your own risk.

  • Only support small subset of OData 3.0
  • Only supports atom format in responses
  • Service root resource
  • $metadata resource
  • Collection resource
    • $select
    • $orderby
    • $skip
    • $top
    • $filter
    • pagination
    • real object IDs
  • Collection entry by ID (service/collection(id))
    • Numeric IDs
    • Other ID types
  • Parameters
  • Nested collections
  • Functions
  • ...

Dependencies

~43–58MB
~1M SLoC