0.7.5 • Published 19 days ago

@flatfile/plugin-json-extractor v0.7.5

Weekly downloads
-
License
ISC
Repository
github
Last release
19 days ago

The @flatfile/json-extractor plugin parses a JSON file and extracts first-level nested objects as Sheets in Flatfile.

Event Type: listener.on('file:created')

Supported file types: .json

When embedding Flatfile, this plugin should be deployed in a server-side listener. Learn more

Parameters

options.chunkSize - default: "10_000" - number - (optional)

The chunkSize parameter allows you to specify the quantity of records to in each chunk.

options.parallel - default: "1" - number - (optional)

The parallel parameter allows you to specify the number of chunks to process in parallel.

API Calls

  • api.files.download
  • api.files.get
  • api.files.update
  • api.jobs.ack
  • api.jobs.complete
  • api.jobs.create
  • api.jobs.fail
  • api.jobs.update
  • api.records.insert
  • api.workbooks.create

Usage

Listen for a JSON file to be uploaded to Flatfile. The platform will then extract the file automatically. Once complete, the file will be ready for import in the Files area.

npm i @flatfile/plugin-json-extractor
import { JSONExtractor } from "@flatfile/plugin-json-extractor";
listener.use(JSONExtractor());

Full Example

In this example, the JSONExtractor is initialized, and then registered as middleware with the Flatfile listener. When a JSON file is uploaded, the plugin will extract the structured data and process it the extractor's parser.

import { JSONExtractor } from "@flatfile/plugin-json-extractor";

// Initialize the JSON extractor
const jsonExtractor = JSONExtractor();

// Register the extractor as a middleware for the Flatfile listener
listener.use(jsonExtractor);

// When a JSON file is uploaded, the data will be extracted and processed using the extractor's parser.

See a working example in our flatfile-docs-kitchen-sink Github repo.

0.7.5

19 days ago

0.7.4

25 days ago

0.7.3

27 days ago

0.7.2

1 month ago

0.7.1

3 months ago

0.7.0

3 months ago

0.6.12

4 months ago

0.6.11

5 months ago

0.6.10

5 months ago

0.6.9

6 months ago

0.6.8

6 months ago

0.6.7

7 months ago

0.6.6

7 months ago

0.6.5

7 months ago

0.6.4

8 months ago

0.6.3

8 months ago

0.6.2

8 months ago

0.6.1

8 months ago

0.6.0

8 months ago

0.5.0

9 months ago

0.4.5

9 months ago

0.4.4

9 months ago

0.4.3

9 months ago

0.4.2

9 months ago

0.4.1

9 months ago

0.4.0

9 months ago

0.3.0

9 months ago

0.2.0

10 months ago

0.1.0

10 months ago

0.0.1

10 months ago