interloper-google-cloud
Google Cloud integration for the Interloper framework. Provides BigQuery, Cloud Storage and Google Sheets destinations and the Google Cloud connection resource.
Google Sheets
GoogleSheetsDestination writes assets into one spreadsheet, one tab per asset. It authenticates with the
GoogleCloudConnection's service-account key, or with ambient credentials when the key is empty.
Setup
- Create the spreadsheet and copy its id from the URL
(
https://docs.google.com/spreadsheets/d/<id>/edit). - Share it with the service account's email address (
client_emailin the key) as an editor. The service account sees no spreadsheet it was not shared on.
Usage
from interloper_google_cloud import GoogleCloudConnection, GoogleSheetsDestination
destination = GoogleSheetsDestination(
connection=GoogleCloudConnection(service_account_key="..."),
spreadsheet_id="1AbC...",
)
Layout
- Each asset is a tab titled after its table, or
{dataset}.{table}when the asset has a dataset (at most 100 characters, Sheets' limit). - The first row is the header, written when the tab is created from the asset's schema. Later writes are aligned to it: columns missing from the data are left empty, columns missing from the header are dropped with a warning. The header is never altered.
- Rows carry the partition column. Replacing a partition deletes its rows, then appends the new ones; Sheets has no transactions, so the pair is not atomic.
Types
Values are written raw: numbers and booleans as is, None as an empty cell, decimals as strings, dates and
datetimes as ISO 8601 strings, dicts and lists as JSON. Time partitions are matched by comparing those ISO
strings, which orders chronologically, so a time-partitioned asset's partition column must be a date or a
datetime (or an ISO string). On read, empty cells come back as None and rows are reconciled against the
asset's schema, restoring the declared types.
Limits
Sheets caps a spreadsheet at 10 million cells, and replacing a partition reads the whole tab and rewrites it. The destination suits small reporting tables that people open in Sheets, not a warehouse.
Metadata
Release files for interloper-google-cloud 0.94.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| interloper_google_cloud-0.94.0.tar.gz | 17.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| interloper_google_cloud-0.94.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.2 kB
Release files / interloper_google_cloud-0.94.0.tar.gz
| Download URL | interloper_google_cloud-0.94.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c225f4cad98036b2509100855275c026df56e18270283c30cb5ab43ed9583ed3
|
|
BLAKE2b-256 checksum How to use checksums |
70a3d65d8fa0a40597d9dd2ca1820a88f359c809f21ef1470efc16ae924c8e16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / interloper_google_cloud-0.94.0-py3-none-any.whl
| Download URL | interloper_google_cloud-0.94.0-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00a6c62e5c7d6d709f6851c003fd682421fa3eb2c01496aac3c4509b4470ad37
|
|
BLAKE2b-256 checksum How to use checksums |
097bfac3a87872b20fa522cf8223b16ee408e293168a68666634db92a00b4ca9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|