Git Product home page Git Product logo

dynamodb-read-stream's Introduction

dynamodb-read-stream

An open-source tool for reading data chunk by chunk. This tool is created for handling DynamoDB limitation for one response (1 MB). This library provides read stream implementation for DynamoDB.

npm

Example usage

Query reader

const reader = new DocumentClientQueryReadable(
  new DocumentClient(), {
  TableName: 'someTable',
  KeyConditionExpression: 'key = :primaryKey',
  ExpressionAttributeValues: {
    ':primaryKey': 'someValue'
  }
})
const transformOutput = new Transform({
  objectMode: true,
  transform (chunk: DocumentClient.QueryOutput, encoding: string, callback: (error?: Error, data?: any) => void): void {
    callback(undefined, JSON.stringify(chunk) + '\n')
  }
})

reader
  .pipe(transformOutput)
  .pipe(process.stdout)

Scan reader

const client = new DocumentClient()
const reader = new DocumentClientScanReadable(client, {
  TableName: 'someTable'
});
const transformOutput = new Transform({
  objectMode: true,
  transform (chunk: DocumentClient.ScanOutput, encoding: string, callback: (error?: Error, data?: any) => void): void {
    callback(undefined, JSON.stringify(chunk) + '\n')
  }
})

reader
  .pipe(transformOutput)
  .pipe(process.stdout)

dynamodb-read-stream's People

Contributors

alexhladin avatar dependabot-preview[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

filmaj

dynamodb-read-stream's Issues

⚠️ Greenkeeper is no longer available for new installations

Hello!

Greenkeeper is no longer available for new installations.

The service will be saying goodbye πŸ‘‹ and passing the torch to Snyk on June 3rd, 2020. Find out more at greenkeeper.io.

If this is your only Greenkeeper installation, you can just sign up for Snyk directly, it’s free for Open Source even has free features for private projects as well.

Nevertheless, thanks for your interest in Greenkeeper! We’re sure your repositories will find a good home at Snyk β˜€οΈπŸ‘πŸ’œ

All the best from everyone at Greenkeeper! πŸ‘‹πŸ€–πŸŒ΄

⚠️ Greenkeeper is no longer available for new installations

Hello!

Greenkeeper is no longer available for new installations.

The service will be saying goodbye πŸ‘‹ and passing the torch to Snyk on June 3rd, 2020. Find out more at greenkeeper.io.

If this is your only Greenkeeper installation, you can just sign up for Snyk directly, it’s free for Open Source even has free features for private projects as well.

Nevertheless, thanks for your interest in Greenkeeper! We’re sure your repositories will find a good home at Snyk β˜€οΈπŸ‘πŸ’œ

All the best from everyone at Greenkeeper! πŸ‘‹πŸ€–πŸŒ΄

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.