PHPackages                             iamgold/dataloader-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. [File &amp; Storage](/categories/file-storage)
4. /
5. iamgold/dataloader-php

ActiveLibrary[File &amp; Storage](/categories/file-storage)

iamgold/dataloader-php
======================

This library provides a simple and lightweight component to help loading data into csv, tsv or parquet etc....

v1.0.1(3y ago)07Apache-2.0PHPPHP ^8.0

Since Nov 13Pushed 3y ago1 watchersCompare

[ Source](https://github.com/iamgold/dataloader-php)[ Packagist](https://packagist.org/packages/iamgold/dataloader-php)[ RSS](/packages/iamgold-dataloader-php/feed)WikiDiscussions main Synced 1mo ago

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

Data Loader
===========

[](#data-loader)

This is a lightweight, simple and flexible library for exporting data, and now support csv, tsv, parquet etc....

[![Latest Stable Version](https://camo.githubusercontent.com/5a9c0d551112148cec5825c3899d79c1f695f0481c71d9cab2be08e6d4db0c87/687474703a2f2f706f7365722e707567782e6f72672f69616d676f6c642f646174616c6f616465722d7068702f76)](https://packagist.org/packages/iamgold/dataloader-php) [![Total Downloads](https://camo.githubusercontent.com/8f7ca4b76375d77778eefbdc4c0cd19605ed4f0dcf51693736649fef00d30983/687474703a2f2f706f7365722e707567782e6f72672f69616d676f6c642f646174616c6f616465722d7068702f646f776e6c6f616473)](https://packagist.org/packages/iamgold/dataloader-php) [![Latest Unstable Version](https://camo.githubusercontent.com/4c099384a0b8fc4d86b99539e15ebee74ee8c47a5d6f338abbd4487fe2ce6b54/687474703a2f2f706f7365722e707567782e6f72672f69616d676f6c642f646174616c6f616465722d7068702f762f756e737461626c65)](https://packagist.org/packages/iamgold/dataloader-php) [![License](https://camo.githubusercontent.com/7812ebd1af247ac5455b6db837c8d04408054926c6d9f81880d4ad52b22db17b/687474703a2f2f706f7365722e707567782e6f72672f69616d676f6c642f646174616c6f616465722d7068702f6c6963656e7365)](https://packagist.org/packages/iamgold/dataloader-php) [![PHP Version Require](https://camo.githubusercontent.com/bfe4949ed1db44aecbe36df3428a85bfac9247909ff5dffc27f9282ff8535447/687474703a2f2f706f7365722e707567782e6f72672f69616d676f6c642f646174616c6f616465722d7068702f726571756972652f706870)](https://packagist.org/packages/iamgold/dataloader-php)

Getting Start
-------------

[](#getting-start)

### Features

[](#features)

- Support csv
- Support tsv
- Support parquet

### Requirements

[](#requirements)

- PHP 8.0+
- ext-snappy (optional when using ParquetLoader and Snappy compression method)
- ext-zip

### Install

[](#install)

```
composer require iamgold/dataloader-php

```

### Usage

[](#usage)

```
// prepare column definitions
$defs = [
    ['id', 'int', 0], // name, type, defaultValue
    ['name', 'string', '-'],
    ['gender', 'string', '-'],
    ['email', 'email', '-'],
    ['join_date', 'dateTime', '-']
];

// prepare columns for each definitions and mapping related type calss.
$columns = [];
foreach($defs as $def) {
    list($name, $type, $defaultValue) = $def;
    $typeClass = match ($type) {
        'int' => new Integer,
        'string' => new Strings,
        'dateTime' => new DateTime,
        'email' => new Email,
        default => null,
    };

    if ($typeClass === null)
        die("The type($type) doest't support");

    // create column by name and type
    $columns[] = new Column($name, $typeClass);
}

// prepare data
$data = [
    [1, 'Eric', 'male', 'eric@abc.com', date('Y-m-d')],
    [2, 'Peter', 'male', 'peter@abc.com', date('Y-m-d')],
    [3, 'Marry', 'female', 'marry@abc.com', date('Y-m-d')],
    [5, 'Jenny', 'female', 'jenny@abc.com', date('Y-m-d')],
    [100, 'Mandy', 'f', 'mandy@abc.com', date('Y-m-d')],
];

// create a file manager for storing file
$fileManager = new FileManager(__DIR__, 'csv', '20221113_');

// create loader for collecting data and parsing into columns
$loader = new CsvLoader($columns, ',', true);
$loader->setFileManager($fileManager);

// push data
foreach($data as $r) {
    $loader->push($r, false);
}

// load by file manager
$result = $loader->load();

```

### Documents

[](#documents)

- [html](https://github.com/iamgold/dataloader-php/tree/main/docs).

comming soon...

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1283d ago

### Community

Maintainers

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

---

Top Contributors

[![iamgold](https://avatars.githubusercontent.com/u/19813333?v=4)](https://github.com/iamgold "iamgold (1 commits)")

---

Tags

exportloaderetldata-processFile ProcessCyntelliAtelliAdGeek

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/iamgold-dataloader-php/health.svg)

```
[![Health](https://phpackages.com/badges/iamgold-dataloader-php/health.svg)](https://phpackages.com/packages/iamgold-dataloader-php)
```

###  Alternatives

[silverstripe/staticpublisher

StaticPublisher provides an extensions for exporting a SilverStripe application to either a local or remote file systems.

2813.5k](/packages/silverstripe-staticpublisher)[kolay/xlsx-stream

High-performance XLSX streaming writer for Laravel with zero disk I/O and direct S3 support

383.0k](/packages/kolay-xlsx-stream)[cleverage/process-bundle

Process, import/export, transform and validate data with a simple API with Symfony3

2052.2k13](/packages/cleverage-process-bundle)

PHPackages © 2026

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