datafusion-remote-table

Goals
- Execute SQL queries on remote databases and make results as datafusion table provider
- Execution plan can be serialized for distributed execution
- Record batches can be transformed before outputting to next operator
Usage
#[tokio::main]
pub async fn main() {
let options = ConnectionOptions::Postgres(PostgresConnectionOptions::new(
"localhost",
5432,
"user",
"password",
));
let remote_table = RemoteTable::try_new(options, "SELECT * from supported_data_types", None, None)
.await
.unwrap();
let ctx = SessionContext::new();
ctx.register_table("remote_table", Arc::new(remote_table))
.unwrap();
ctx.sql("SELECT * from remote_table")
.await
.unwrap()
.show()
.await
.unwrap();
}
Supported databases
Thanks