Skip to main content

Package to create a database out of files

Project description

dbcreator

The dbcreator library provides an interface for creating lightweight databases from files. It currently supports duckdb and s3 parquet files, though there are plans to add sqlite and other source file locations and types in the future.

Usage

Creating DuckDB Database from Parquet Files

from flexpath import create_duckdb_database_from_local_parquet

# Example for creating database from S3 Parquet files
create_duckdb_database_from_s3_parquet('target_db.duckdb', FlexPath("s3://bucket-name/prefix"), create_tables=True)

The library assumes a specific file naming convention for schema and table name extraction. For example, a file named s3://bucket-name/prefix/folder/schemaname_table_name.parquet will be parsed as a table named table_name in a schema named schemaname.

DuckDBConnection

from flexpath import DuckDBConnection

with DuckDBConnection('my_database.duckdb') as con:
    # Perform database operations using 'con'

FlexPath

from flexpath import FlexPath

# Example for local path
local_path = FlexPath("/local/path/to/file.parquet")

# Example for S3 path
s3_path = FlexPath("s3://bucket-name/prefix/to/file.parquet")

Installation

pip install dbcreator

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dbcreator-0.0.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dbcreator-0.0.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file dbcreator-0.0.2.tar.gz.

File metadata

  • Download URL: dbcreator-0.0.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for dbcreator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 49e9b0b1e5a7c8b1f913c63c8b21748262a5feaa1f883f909f14ad01dc34e2f9
MD5 58664c040a026b087debd97f3c929165
BLAKE2b-256 2e7d92c6cd828fa4af48462b5e73431eb4a45f00e06aecdb6b76b1891d7fa405

See more details on using hashes here.

File details

Details for the file dbcreator-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: dbcreator-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.6

File hashes

Hashes for dbcreator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 80b471994c363bc3c5e02f4714534c16763b1c9eab277cb207fdff539cc69b08
MD5 4808f21acd6d8468d0c6b8aa0a0f306f
BLAKE2b-256 1bce163bce7162042143237cbe71b51df838d95c8d5aec8de0348b417fda872d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page