# epf-pg-importer

> Take parsed Apple iTunes Enterprise Partner Feed data and import it into a PostgreSQL table, using a streaming `COPY`.

Latest version **4.1.1** (published 2016-06-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install epf-pg-importer
pnpm add epf-pg-importer
yarn add epf-pg-importer
bun add epf-pg-importer
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.1.1 |
| Published | 2016-06-14 |
| First published | 2016-05-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | juliangruber |

## Links

- npm: https://www.npmjs.com/package/epf-pg-importer
- Repository: https://github.com/viaforensics/epf-pg-importer
- Homepage: https://github.com/viaforensics/epf-pg-importer#readme
- Issues: https://github.com/viaforensics/epf-pg-importer/issues
- npm.io page: https://npm.io/package/epf-pg-importer

## Dependencies (4)

- [multipipe](https://npm.io/package/multipipe.md) ^0.3.0
- [csv-stringify](https://npm.io/package/csv-stringify.md) github:juliangruber/node-csv-stringify#add/buffer-support
- [pg-copy-streams](https://npm.io/package/pg-copy-streams.md) ^1.0.0
- [stream-buffer-replace](https://npm.io/package/stream-buffer-replace.md) ^1.0.1

## Recent versions

- 4.1.1 (latest) — 2016-06-14
- 4.1.0 — 2016-06-10
- 4.0.2 — 2016-06-10
- 4.0.1 — 2016-06-04
- 4.0.0 — 2016-06-04
- 3.0.3 — 2016-06-04
- 3.0.2 — 2016-06-01
- 3.0.1 — 2016-05-31
- 3.0.0 — 2016-05-30
- 2.0.4 — 2016-05-26
- 2.0.3 — 2016-05-26
- 2.0.2 — 2016-05-26
- 2.0.1 — 2016-05-25
- 2.0.0 — 2016-05-25
- 1.0.0 — 2016-05-23

## README

# epf-pg-importer

  Take parsed Apple iTunes Enterprise Partner Feed data and import it into a PostgreSQL table, using a streaming `COPY`.

## Usage

```js
'use strict';

const parse = require('epf-parser');
const pgImport = require('epf-pg-importer');
const fs = require('fs');
const pg = require('pg');

var client = new pg.Client;
client.connect(err => {
  if (err) throw err;

  console.log('Starting import...');

  fs.createReadStream('/Users/julian/Downloads/itunes20160518/application')
    .pipe(parse((meta, rows) => {
      pgImport({
        client,
        table: 'application',
        meta
      }, (err, copy) => {
        if (err) throw err;

        rows.pipe(copy).on('finish', () => {
          console.log('Done! Disconnecting...');
          client.on('drain', () => client.end());
        });
      });
    }));
  
});
```

## License

  MIT

---
_Source: https://npm.io/package/epf-pg-importer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
