PHPackages                             keboola/php-load-type-decider - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. keboola/php-load-type-decider

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

keboola/php-load-type-decider
=============================

Single source of truth for Keboola workspace table load-type decisions (COPY/CLONE/VIEW)

00PHP

Since Jun 5Pushed 1w agoCompare

[ Source](https://github.com/keboola/php-load-type-decider)[ Packagist](https://packagist.org/packages/keboola/php-load-type-decider)[ RSS](/packages/keboola-php-load-type-decider/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (266)Used By (0)

Load Type Decider
=================

[](#load-type-decider)

Single source of truth for Keboola's workspace table **load-type decision** — which mechanism the server uses to load a Storage table into a workspace:

- `COPY` — always available fallback.
- `CLONE` — zero-copy, identical row semantics (Snowflake / BigQuery).
- `VIEW` — live view over the source table.

The library is intentionally **dependency-free of the platform**: it never reads features from a database or talks to any backend. The caller resolves project features one level up and passes them in as plain booleans via `LoadTypeDeciderFeatures`. This keeps the decision logic centralized, pure, and trivially testable.

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

[](#installation)

```
composer require keboola/php-load-type-decider
```

Usage
-----

[](#usage)

```
use Keboola\LoadTypeDecider\LoadTypeDecider;
use Keboola\LoadTypeDecider\LoadTypeDeciderFeatures;

$decision = LoadTypeDecider::decide(
    $tableInfo,      // Storage API table detail
    $workspaceType,  // 'snowflake' | 'bigquery'
    $exportOptions,  // options about to be passed to the workspace load
    new LoadTypeDeciderFeatures(
        bigqueryDefaultImView: false,
        snowflakeReadOnlyStorage: true,
    ),
);

$decision->preferred;  // LoadType the server picks when none is pinned
$decision->possible;   // full set the caller may choose from (always contains COPY)
```

Call `LoadTypeDecider::checkViableLoadMethod()` before deciding to reject loads that no method can satisfy (throws `Exception\InvalidInputException`).

Development
-----------

[](#development)

This package is developed inside the [keboola/connection](https://github.com/keboola/connection)monorepo and mirrored read-only to [keboola/php-load-type-decider](https://github.com/keboola/php-load-type-decider). Open pull requests against the monorepo.

```
composer install
composer ci      # lint + phpcs + phpstan + tests
```

License
-------

[](#license)

MIT — see [LICENSE](LICENSE).

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance64

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/101dbf2551a0709ddab522f97669f13a2c4cc2d0a1e8d009f3af6ba80accb1a9?d=identicon)[Keboola](/maintainers/Keboola)

---

Top Contributors

[![vojtabiberle](https://avatars.githubusercontent.com/u/528942?v=4)](https://github.com/vojtabiberle "vojtabiberle (29 commits)")

### Embed Badge

![Health badge](/badges/keboola-php-load-type-decider/health.svg)

```
[![Health](https://phpackages.com/badges/keboola-php-load-type-decider/health.svg)](https://phpackages.com/packages/keboola-php-load-type-decider)
```

###  Alternatives

[ph-7/html-to-text

Lightweight package to convert HTML code to plain text (handy for plain text email format).

129.4k7](/packages/ph-7-html-to-text)

PHPackages © 2026

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