Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Latest commit

 

History

History
33 lines (25 loc) · 994 Bytes

File metadata and controls

33 lines (25 loc) · 994 Bytes

Spice.ai Data Connectors

Currently supported connectors:

Contribution guide

Writing a data connector means implementing the DataConnector interface defined at dataconnector.go and adding it to the NewDataConnector factory function.

type DataConnector interface {
    Init(Epoch time.Time, Period time.Duration, Interval time.Duration, params map[string]string) error
    Read(handler func(data []byte, metadata map[string]string) ([]byte, error)) error
}

Data Connectors are consumed in the Spice.ai pod manifest in the data section. E.g.

data:
  connector:
  name: file
  params:
    path: my-data.csv

The data connector name is self-declared by the component, but must be unique across all components.