Registry / data / delta-sharing

delta-sharing

JSON →
library1.4.2pypypi✓ verified 28d ago

The Delta Sharing Python Connector is a client library that implements the Delta Sharing Protocol, enabling secure, real-time exchange of large datasets across different computing platforms without data replication. It allows users to read shared Delta Lake and Apache Parquet tables as pandas DataFrames or Apache Spark DataFrames. The current version is 1.4.1, with frequent minor releases providing continuous improvements and feature enhancements.

pip install delta-sharing
INSTALL
IMPORT
SIG · DELTA-SHARING
D
delta-sharing
datapythonv1.4.2
Install
14.7s avg
Import
2109ms
Disk
418MB
Pass rate
4/ 10
Env Coverage4 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.4.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✓ 17.05s
py 3.11
✕ build_error
✓ 15.15s
py 3.12
✕ build_error
✓ 13.3s
py 3.13
✕ build_error
✓ 13.4s
py 3.9
✕ build_error
✕ build_error
418MB installed
● package 418MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SharingClient
✓ from delta_sharing import SharingClient
The primary client for interacting with Delta Sharing servers.
load_as_pandas
✓ from delta_sharing import load_as_pandas
Function to load a shared table directly into a pandas DataFrame.
load_as_spark
✓ from delta_sharing import load_as_spark
Function to load a shared table directly into a PySpark DataFrame (requires PySpark environment).
list_all_tables
✓ client.list_all_tables()
Method of SharingClient to list all available tables.

This quickstart demonstrates how to initialize the Delta Sharing client, list available shared tables, and load a sample table into a pandas DataFrame. It assumes you have a Delta Sharing profile file (e.g., `open-datasets.share`) that provides credentials to a Delta Sharing server. For demonstration, it attempts to load a publicly available dataset.

import delta_sharing import os # Point to a Delta Sharing profile file (e.g., downloaded from a data provider) # For a public example, you can use: # profile_file = "https://raw.githubusercontent.com/delta-io/delta-sharing/main/examples/open-datasets.share" # In a real scenario, this would be a local path or cloud storage path (e.g., s3://bucket/profile.share) # Ensure your profile file (e.g., 'config.share') is accessible. # For local testing, download from https://databricks-datasets-oregon.s3-us-west-2.amazonaws.com/delta-sharing/share/open-datasets.share # and save it as 'open-datasets.share' in your working directory. profile_file = os.environ.get('DELTA_SHARING_PROFILE', 'open-datasets.share') try: # Create a SharingClient client = delta_sharing.SharingClient(profile_file) # List all shared tables print("\nAvailable Shares, Schemas, and Tables:") tables = client.list_all_tables() if not tables: print("No tables found. Ensure your profile file is correct and has access.") for table in tables: print(f" - Share: {table.share}, Schema: {table.schema}, Table: {table.name}") # Example: Load a specific table (replace with a table from your profile if needed) # Using the 'COVID_19_NYT' table from the open-datasets.share example # The format is <profile-path>#<share>.<schema>.<table> example_table_url = f"{profile_file}#delta_sharing.default.COVID_19_NYT" print(f"\nLoading data from: {example_table_url}") # Load the table as a pandas DataFrame, with a limit for demonstration df = delta_sharing.load_as_pandas(example_table_url, limit=5) print("\nFirst 5 rows of the DataFrame:") print(df) except Exception as e: print(f"An error occurred: {e}") print("Please ensure you have a valid Delta Sharing profile file configured and accessible.") print("You can set the DELTA_SHARING_PROFILE environment variable or download 'open-datasets.share'.")
Debug
Known issues
gotchaLinux users may encounter installation issues for `delta-kernel-rust-sharing-wrapper` if `glibc` version is older than 2.31 or if a pre-built Python wheel is not available for their environment.
fix
Ensure your Linux system has `glibc >= 2.31`. If installation still fails, install the Rust toolchain (e.g., via `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`) as `pip` might try to build the Rust component from source.
affects: >=1.1.0
gotchaDelta Sharing profile files (`.share`) contain sensitive credentials (e.g., bearer tokens, OAuth client secrets). These files must be stored securely and not exposed in public repositories or insecure locations.
fix
Store profile files in secure, access-controlled locations (e.g., local filesystem with restricted permissions, cloud storage with IAM policies, or secret management services). Avoid hardcoding credentials directly in code. For OIDC authentication, ensure `clientId` and `clientSecret` are managed securely.
affects: All versions
gotchaWhen using `load_as_spark()` to read shared tables as Spark DataFrames, you must be running in a PySpark environment with the Apache Spark Connector for Delta Sharing properly configured and installed.
fix
Refer to the official Delta Sharing documentation for setting up the Apache Spark Connector for Delta Sharing in your Spark environment, including necessary Spark package configurations (e.g., `--packages io.delta:delta-sharing-spark_2.12:<version>`).
affects: All versions
gotchaBearer tokens used for open sharing have a maximum validity of one year. Recipients must coordinate with data providers for token rotation and renewal to maintain access.
fix
Implement a process for regularly renewing and rotating bearer tokens with your data provider well before their expiration. For OIDC federation, token management is typically handled more dynamically.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'delta_kernel_rust_sharing_wrapper'
This error occurs because the `delta-sharing` package, especially in versions 1.1.0 and later, depends on `delta-kernel-rust-sharing-wrapper`, which sometimes needs to be built from source if a pre-built wheel isn't available for your environment, or if your Python/glibc version is incompatible.
fix
Ensure you have Python >= 3.8 and glibc >= 2.31 (on Linux). Upgrade `pip` (`pip install --upgrade pip`) and retry installation. If the issue persists, you might need to install the Rust toolchain to allow `pip` to build `delta-kernel-rust-sharing-wrapper` from source (`curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` and then `pip install delta-sharing`). Alternatively, you can temporarily downgrade to `delta-sharing==1.0.5` which does not have this Rust dependency, but note that this version may lack newer features.
RESOURCE_LIMIT_EXCEEDED
This error indicates that a query on a shared table exceeded resource limits, such as the maximum number of active files (400,000) or remove file actions (100,000) in the Delta log, leading to excessive metadata size.
fix
Contact your data provider and ask them to optimize the shared table by running `OPTIMIZE` and `VACUUM` to compact small files and remove stale `RemoveFile` entries from the Delta log. You may also request a limit increase from your data provider if necessary.
SSLCertVerificationError
This error typically occurs due to network restrictions on the storage location of the shared table or volume, often related to firewall settings blocking the client's access to the storage provider.
fix
In your storage provider's interface, allow access to the storage location by enabling the client's IP address in the storage account firewall settings. Ensure that required ports (e.g., 443 for HTTPS) are open.
HTTP 403 Forbidden
This error indicates a lack of authorization to access the shared data. Common causes include expired pre-signed URLs, incorrect or missing access tokens, or firewall rules on the data provider's storage account blocking the recipient's IP address.
fix
Ensure your access token is valid and not expired. If using a Delta Sharing client, the application should re-send the data request with a valid access token to obtain fresh pre-signed URLs. For direct storage access, verify that the data provider has configured their storage account firewall to allow the client's public IP address.
Upgrade
Version history
1.4.2latest on PyPI · released Aug 10, 2026
Audit
Dependencies
pythonrequiredRequired Python version.
pandasrequiredFor loading shared tables as DataFrames.
pyarrowrequiredApache Arrow library for efficient columnar data handling.
fsspecrequiredFilesystem specification for abstracting local and remote storage paths, including cloud storage.
delta-kernel-rust-sharing-wrapperrequiredRust-based kernel for efficient data reading, a core internal dependency.
pysparkoptionalOptional: For loading shared tables as Spark DataFrames and distributed processing. Requires Apache Spark Connector setup.
requestsrequiredHTTP client library for making API requests.
aiohttprequiredAsynchronous HTTP client, used internally.
yarlrequiredURL parsing library, used internally.
jwcryptorequiredJSON Web Crypto implementation, used for OAuth/OIDC authentication.
Agent activity
20 hits · last 30 days
node
16
OpenAI (training)
1
Resources