Datazone SDK
Database and Delta storage client library for working with Delta Lake tables.
Overview
This package provides functionality for interacting with Delta Lake tables, including:
- Database Client: High-level client for querying Delta Lake tables with support for time intervals, time travel, and filtering.
- Delta Storage: Low-level components for working with Delta tables, schemas, and data types.
Installation
pip install datazone-sdk
Usage
import datazone as dz
# Create a client from a storage account name
client = dz.DatabaseClient.from_resource_name(
storage_account="<storage-account>",
container_name="<container-name>",
sub_path="<sub-path>",
)
# Query a table
df = client.query(
table_name="my_table",
filters=[("column", "=", "value")],
)
AND and OR filters
A list of filters combines them with AND. A list of such lists combines the lists with OR:
# (x = 'x1' AND y = 'y1') OR (x = 'x2' AND y = 'y2')
filters = [
[("x", "=", "x1"), ("y", "=", "y1")],
[("x", "=", "x2"), ("y", "=", "y2")],
]
df = client.query(table_name="my_table", filters=filters)
Table.read, Table.update and Table.delete accept the same filters.
Time interval and time travel filters in query apply to each OR group, and
rows matching several groups are returned once. Empty groups, such as [[]],
and in filters with an empty list raise a ValueError, while a flat []
still means no filtering.
Development
Create a virtual environment, install poetry and run poetry install.
This can be done by running the following in a terminal:
pyenv virtualenv 3.13.11 datazone-sdk
pyenv local datazone-sdk
pip install poetry
poetry install
Metadata
Release files for datazone-sdk 7.1.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 | |
|---|---|---|---|
| datazone_sdk-7.1.0.tar.gz | 18.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datazone_sdk-7.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.3 kB
Release files / datazone_sdk-7.1.0.tar.gz
| Download URL | datazone_sdk-7.1.0.tar.gz |
|---|---|
| Size | 18.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a89cf6375abf0473d40dcd59500ed7cb54d327ad6c5651842c2c93ae21558714
|
|
BLAKE2b-256 checksum How to use checksums |
597e88bb1c9b2122e0fa55a59eada6ba4eb08d7b9bc2cd6ff5443ef0344a6c27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.10.22 Linux/6.17.0-1022-azure
|
Release files / datazone_sdk-7.1.0-py3-none-any.whl
| Download URL | datazone_sdk-7.1.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92e5b912a96ff502bbd247a53d23b498bac98b0ddaba7e017268d5da83f12b31
|
|
BLAKE2b-256 checksum How to use checksums |
38e6c3f0a12a6361ab65d75c0965129335000093de8f22d29cdf887c11bdb17d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.5.1 CPython/3.10.22 Linux/6.17.0-1022-azure
|