say8425 / dynamodb-parallel-scan

Scan large DynamoDB tables faster with parallelism

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dynamodb-parallel-scan CircleCI npm (scoped)

Scan DynamoDB table concurrently (up to 1,000,000 segments), recursively read all items from every segment

Install

$ yarn add @shelf/dynamodb-parallel-scan

Usage

const {parallelScan} = require('@shelf/dynamodb-parallel-scan');

(async () => {
  const items = await parallelScan(
    {
      TableName: 'files',
      FilterExpression: 'attribute_exists(#fileSize)',
      ExpressionAttributeNames: {
        '#fileSize': 'fileSize'
      },
      ProjectionExpression: 'fileSize'
    },
    {concurrency: 1000}
  );

  console.log(items);
})();

Read

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master

License

MIT © Shelf

About

Scan large DynamoDB tables faster with parallelism

License:MIT License


Languages

Language:TypeScript 77.6%Language:JavaScript 22.4%