Skip to main content

ETL for BigQuery

Project description

BQSeine

Python dict to BigQuery data loader

Seine is a data loader that pushes data in a dictionary to BigQuery in relational normalized form.

Usage

from bqseine import sync
sourceData = [
	{
		'item': 'Juice',
		'price': 20.0,
		'stock': [
			{
				'batch': '2025-01-20',
				'qty': 300
			},
			{
				'batch': '2025-02-02',
				'qty': 50
			}
		]
	},
	{
		'item': 'Burger',
		'price': 30.0,
		'stock': [
			{
				'batch': '2025-02-10',
				'qty': 200
			}
		]
	}
]
sync('someGoogleProject', sourceData, 'catalog', 'US')
### The arguments above are:
### sync(<Google project name>, <dict>, <main table name>, <BigQuery region>)*

The above example will generate the following tables in BigQuery:

catalog

seine_id seine_parent_id item price injected
1 0 'Juice' 20.0 now()
2 0 'Burger' 30.0 now()

catalog_stock

seine_id seine_parent_id batch qty injected
1 1 '2025-01-20' 300 now()
2 1 '2025-02-02' 50 now()
3 2 '2025-02-10' 200 now()

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

bqseine-0.0.1.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

bqseine-0.0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file bqseine-0.0.1.tar.gz.

File metadata

  • Download URL: bqseine-0.0.1.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for bqseine-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1b02e1d6567252e273fd12ec5f03cf60a12f652b8de42563bd5e69ff03a980ad
MD5 39f570a9ec947708b04efabd036cd174
BLAKE2b-256 3e9502d2a506c259fb03cd15525da00c36aadb27dd777f5d013a46ddc7cf8587

See more details on using hashes here.

File details

Details for the file bqseine-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: bqseine-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for bqseine-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d6625365683f83f1d0e40485c26e69902aeec56387b1ecad5fefac3f775a881
MD5 50b2f09a33fc8c1df01101b901417f6e
BLAKE2b-256 47f24f3f00db3bc983116d4bd19b0b92b40563508bf63f0818c63ac8fae73e06

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