PHPackages                             wapcaf/delta-sharing-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. wapcaf/delta-sharing-php

ActiveLibrary

wapcaf/delta-sharing-php
========================

PHP connector for the Delta Sharing open protocol

v0.2.0(yesterday)00MITPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0CI passing

Since Jul 27Pushed todayCompare

[ Source](https://github.com/wapcaf/delta-sharing-php)[ Packagist](https://packagist.org/packages/wapcaf/delta-sharing-php)[ Docs](https://github.com/wapcaf/delta-sharing-php)[ RSS](/packages/wapcaf-delta-sharing-php/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (3)Used By (0)

Delta Sharing connector for PHP
===============================

[](#delta-sharing-connector-for-php)

A PHP client for the [Delta Sharing](https://github.com/delta-io/delta-sharing) open protocol. It lets PHP applications discover and read tables that a Delta Sharing server exposes, in the same spirit as the official Python connector and the community connectors for Node.js, Java, Rust, Go, R and others.

Requirements
------------

[](#requirements)

- PHP 8.2, 8.3 or 8.4
- ext-json, ext-bcmath and ext-zlib (all bundled with PHP on most platforms)

Parquet decoding is handled by [flow-php/parquet](https://packagist.org/packages/flow-php/parquet), a pure PHP implementation installed automatically with this package. Snappy compressed files are decoded with a pure PHP snappy implementation, so no extra extensions are needed on any platform, including Windows.

Installation
------------

[](#installation)

```
composer require wapcaf/delta-sharing-php

```

Getting a profile
-----------------

[](#getting-a-profile)

Access to a Delta Sharing server is granted through a profile file, a small JSON document that the data provider sends you:

```
{
  "shareCredentialsVersion": 1,
  "endpoint": "https://sharing.delta.io/delta-sharing/",
  "bearerToken": ""
}
```

The examples below use [examples/open-datasets.share](examples/open-datasets.share), the public demo profile published by the Delta Sharing project.

Quick start
-----------

[](#quick-start)

Load a whole table (or the first N rows) as an array of associative rows. Table URLs use the same format as the other connectors: `#..`.

```
use DeltaSharing\DeltaSharing;

$rows = DeltaSharing::loadAsArray(
    'examples/open-datasets.share#delta_sharing.default.owid-covid-data',
    limit: 100
);

print_r($rows[0]);
```

For large tables, stream rows with a generator instead. Files are downloaded and decoded one at a time, so memory use stays flat:

```
use DeltaSharing\DeltaSharingClient;

$client = DeltaSharingClient::fromProfileFile('examples/open-datasets.share');

foreach ($client->readTable('delta_sharing.default.owid-covid-data', limit: 1000) as $row) {
    // each $row is an associative array, partition columns included
}
```

Discovering shares, schemas and tables
--------------------------------------

[](#discovering-shares-schemas-and-tables)

```
use DeltaSharing\DeltaSharingClient;

$client = DeltaSharingClient::fromProfileFile('examples/open-datasets.share');

foreach ($client->listShares() as $share) {
    foreach ($client->listSchemas($share) as $schema) {
        foreach ($client->listTables($schema) as $table) {
            echo $table->fullyQualifiedName(), PHP_EOL;
        }
    }
}

// Or in one call per share:
$tables = $client->listAllTables('delta_sharing');
```

Table metadata and versions
---------------------------

[](#table-metadata-and-versions)

```
$meta = $client->getTableMetadata('delta_sharing.default.owid-covid-data');

echo $meta->metadata->id, PHP_EOL;
print_r($meta->metadata->partitionColumns);
print_r($meta->metadata->schema());   // decoded schemaString

$version = $client->getTableVersion('delta_sharing.default.owid-covid-data');
```

Reading data files without decoding them
----------------------------------------

[](#reading-data-files-without-decoding-them)

`queryTable` returns the pre-signed URLs of the parquet files that make up the table. The URLs are short lived but need no extra credentials, so any downstream tool can download them.

```
$result = $client->queryTable(
    'delta_sharing.default.owid-covid-data',
    predicateHints: ["date >= '2021-01-01'"],
    limitHint: 1000
);

foreach ($result->files as $file) {
    echo $file->url, ' (', $file->size, " bytes)\n";
}
```

Predicate and limit hints are best effort on the server side. The server may return files containing rows that do not match, so apply your own filtering after reading.

Change data feed
----------------

[](#change-data-feed)

For tables with CDF enabled, read the changes between two versions or timestamps:

```
$changes = $client->getTableChanges(
    'my_share.my_schema.my_table',
    startingVersion: 5,
    endingVersion: 10
);

foreach ($changes['actions'] as $action) {
    echo $action->type, ' ', $action->url, PHP_EOL;   // add, cdf or remove
}
```

Time travel
-----------

[](#time-travel)

Both `queryTable` and `DeltaSharing::loadAsArray` accept a version number to read a snapshot of the table as of that version. `queryTable` also accepts an ISO 8601 timestamp.

Error handling and retries
--------------------------

[](#error-handling-and-retries)

Transient failures (connection errors, HTTP 429 and 5xx) are retried automatically with exponential backoff and jitter, honouring any Retry-After header. Once retries are exhausted, or for non-retryable errors, a typed exception is thrown:

```
use DeltaSharing\Exception\AuthenticationException;  // 401 / 403
use DeltaSharing\Exception\NotFoundException;        // 404
use DeltaSharing\Exception\RateLimitException;       // 429, exposes retryAfterSeconds
use DeltaSharing\Exception\ServerException;          // 5xx
use DeltaSharing\Exception\ProtocolException;        // malformed server response
use DeltaSharing\Exception\HttpException;            // any other HTTP error
use DeltaSharing\Exception\DeltaSharingException;    // base class of everything above

try {
    $client->getTableMetadata('my_share.my_schema.missing_table');
} catch (NotFoundException $e) {
    echo $e->statusCode, ' ', $e->errorCode, ' ', $e->getMessage();
}
```

Profiles expose their expiry so applications can warn before a token lapses:

```
$profile = DeltaSharing\Profile::fromFile('config.share');

if ($profile->isExpired()) { /* request new credentials */ }
if ($profile->expiresWithin(new DateInterval('P7D'))) { /* warn */ }
```

Protocol coverage
-----------------

[](#protocol-coverage)

EndpointSupportedList Sharesyes, with paginationGet ShareyesList Schemasyes, with paginationList Tables / List All Tablesyes, with paginationQuery Table VersionyesQuery Table MetadatayesQuery Table (read data)yes, parquet response formatRead Change Data FeedyesDelta response format, deletion vectorsnot yetTemporary table credentials (dir access)not yetRunning the tests
-----------------

[](#running-the-tests)

```
composer install
composer test

```

The unit tests mock the HTTP layer and do not need network access. See [examples/](examples/) for scripts that run against the public demo server at sharing.delta.io.

License
-------

[](#license)

MIT

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

2

Last Release

1d ago

PHP version history (2 changes)v0.1.0PHP &gt;=8.1

v0.2.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/b5967f5bd718805d2db2f7691e96d42e96739b7a413d2ef2c7139e4fd6fc594f?d=identicon)[wapcaf](/maintainers/wapcaf)

---

Top Contributors

[![jakem-cn](https://avatars.githubusercontent.com/u/185048271?v=4)](https://github.com/jakem-cn "jakem-cn (6 commits)")[![wapcaf](https://avatars.githubusercontent.com/u/83754905?v=4)](https://github.com/wapcaf "wapcaf (2 commits)")

---

Tags

parquetdatabricksdelta-sharingdelta-lakedata-sharinglakehouse

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wapcaf-delta-sharing-php/health.svg)

```
[![Health](https://phpackages.com/badges/wapcaf-delta-sharing-php/health.svg)](https://phpackages.com/packages/wapcaf-delta-sharing-php)
```

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.2k555.0M2.8k](/packages/aws-aws-sdk-php)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.9M528](/packages/pimcore-pimcore)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k832.6k50](/packages/neuron-core-neuron-ai)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.3M48](/packages/tencentcloud-tencentcloud-sdk-php)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k18](/packages/tempest-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
