DeltaAgent - Deltalake Agent
This library can used to fetch data from deltalake tables without the dependency on Spark clusters. It is developed based on the pandas, adlfs and Office365-REST-Python-Client libraries.
Use cases and benefits
To use the library, firstly we need to install it by
pip install DeltaAgent
It requires the datalake account_name and account_key for setting up the connection to a Gen2 Azure blob storage account.
from DeltaAgent import DeltaAgent
da = DeltaAgent(account_name="account_name", account_key="account_key")
With the established connection agent, by the method parse_log_as_df, we can then parse the paths of valid parquet files and their corresponding partition information from the system log files under the _delta_log folder. The result is returned in the format of a pandas DataFrame, with an additonal method fetch_data.
At this stage we can do the basic inspections and perform the parition based filtering operation by the normal DataFrame loc method.
df_log = da.parse_log_as_df(container_name='container_name', table_path='deltatable_name')
df_log_filtered = df_log.loc[df_log.partition=='partition_value']
By calling the fetch_data method on the above delta log DataFrame, we can fetch the actual data from a deltalake table. This may take some time if the data volumn if big.
df_delta = df_log_filtered.fetch_data()
Please note that the values for container_name and delta_table can be also assigned when setting up the agent connection, as below:
da = DeltaAgent(account_name="account_name", account_key="account_key", container_name='container_name', table_path='deltatable_name')
Release files for DeltaAgent 0.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| deltaagent-0.0.11.tar.gz | 7.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deltaagent-0.0.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.2 kB
Release files / deltaagent-0.0.11.tar.gz
| Download URL | deltaagent-0.0.11.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
860e7b40680086d1db48acddcccd48cfdb3293cdba438746d12815977bb78af3
|
|
BLAKE2b-256 checksum How to use checksums |
4a33069609a32cace12d7fe7eaea2360a75e456f9efcf2c0169bd9a1b4a72177
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Release files / deltaagent-0.0.11-py3-none-any.whl
| Download URL | deltaagent-0.0.11-py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8ca76d784bbcf1244a1f343113b0a1aad2ea3e23455333a71a344740bea5876
|
|
BLAKE2b-256 checksum How to use checksums |
ae5273d59507ea7ca5dff75235c6f473cc0ad6a5c7dc6583110b14f180c6d988
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|