Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dforsber/buenavista

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buena Vista with BoilingData

This fork intercepts SQL Queries between client and local in-process DuckDB instance. Matched SQL statements are relayed to Boiling HTTP Proxy.

  • For example any query containing parquet_scan will actually be run on BoilingData. Similarly, CREATE TABLE myTable AS SELECT ... parquet_scan... will create a local in-process DuckDB instance table from BoilingData query results computed on the cloud side.

  • You need to run the BoilingData HTTP gateway that takes care of establishing and maintaining authenticated and secure connection to BoilingData.

cd docker && make build

-------------------------------------- Original README -----------------------------------------

Buena Vista: A Programmable Postgres Proxy Server

Buena Vista is a Python library that provides a socketserver-based implementation of the Postgres wire protocol (PDF).

I started working on this project in order to address a common issue that people had when they were using another one of my Python projects, dbt-duckdb: when a long-running Python process is operating on a DuckDB database, you cannot connect to the DuckDB file using the CLI or with a database query tool like DBeaver to examine the state of the database, because each DuckDB file may only be open by a single process at a time. The Buena Vista library makes it possible to work with a DuckDB database from multiple different processes over the Postgres wire protocol, and the library makes it simple enough to run an example that illustrates the idea locally:

pip3 install buenavista
python3 -m buenavista.examples.duckdb_postgres <optional_duckdb_file>

in order to start a Postgres server on localhost:5433 backed by the DuckDB database file that you passed in at the command line (or by an in-memory DuckDB database if you do not specify an argument.) You should be able to query the database via psql in another window by running psql -h localhost -p 5433 (no database/username/password arguments required) or by using the DBeaver Postgres client connection.

About

A Postgres Proxy Server in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.8%
  • Other 1.2%