Skip to main content

Simple data warehouse using S3

Project description

acme-dw

Simple data warehouse using S3

Problem

Some LLM based definitions: A data warehouse is a centralized repository designed for storing, managing, and analyzing structured data from various sources, optimized for query performance and reporting. It typically uses a schema-based approach to organize data in tables and supports complex queries and analytics. In contrast, a data lake is a storage system that holds vast amounts of raw, unstructured, and structured data in its native format until needed. It is designed for scalability and flexibility, allowing for the storage of diverse data types and enabling advanced analytics, machine learning, and big data processing.

We can see how S3 can be easily utilized as a data lake with little extra functionality. However to use it as a data warehouse we need to add some extra functionality that largly depends on the needs of a given domain.

Features

  • Provides read/wrie on schema-less pd.DataFrame
  • Saves pd.DataFrame using parquet format for fast read performance.
  • Standardizes metadata associated with each dataset

Dev environment

The project comes with a python development environment. To generate it, after checking out the repo run:

chmod +x create_env.sh

Then to generate the environment (or update it to latest version based on state of uv.lock), run:

./create_env.sh

This will generate a new python virtual env under .venv directory. You can activate it via:

source .venv/bin/activate

If you are using VSCode, set to use this env via Python: Select Interpreter command.

Example usage

from acme_dw import DW, DatasetMetadata

dw = DW('my-bucket')
        
# Write with DatasetMetadata object
metadata = DatasetMetadata(
    source='yahoo_finance',
    name='price_history', 
    version='v1',
    process_id='fetch_yahoo_data',
    partitions=['minute', 'AAPL', '2025'],
    file_name='20250124',
    file_type='parquet'
)
dw.write_df(df, metadata)
df = dw.read_df(metadata)

Project template

This project has been setup with acme-project-create, a python code template library.

Required setup post use

  • Enable GitHub Pages to be published via GitHub Actions by going to Settings-->Pages-->Source

  • Create release-pypi environment for GitHub Actions to enable uploads of the library to PyPi

  • Setup auth to PyPI for the GitHub Action implemented in .github/workflows/release.yml via Trusted Publisher uv publish doc

  • Once you create the python environment for the first time add the uv.lock file that will be created in project directory to the source control and update it each time environment is rebuilt

  • In order not to replicate documentation in docs/docs/index.md file and README.md in root of the project setup a symlink from README.md file to the index.md file. To do this, from docs/docs dir run:

    ln -sf ../../README.md index.md

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

acme_dw-0.0.2.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

acme_dw-0.0.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: acme_dw-0.0.2.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.2

File hashes

Hashes for acme_dw-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b88e22c16a47f130a12bfb1ca7484502f27d31c368b0f3eec5676e716efef8c1
MD5 853f9adfac5f6dd0456c1a8f5d129773
BLAKE2b-256 9b000260b61c87df879b2752e9ebf6c4e29324f59a1fc4150136c526e28a47b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: acme_dw-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.2

File hashes

Hashes for acme_dw-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 89c37ebfa1f26ca3948b8a4521d521e1eff140e7f2b8046e36966a9d20d7616c
MD5 31104f32098c5106c75e368c7fd9b50a
BLAKE2b-256 24734125658da659b345c7be265a8ff990074583583fcb05b689069d8342fa70

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