Giter Site home page Giter Site logo

Example for DynamoDB about dsc HOT 3 CLOSED

jetzlstorfer avatar jetzlstorfer commented on July 18, 2024
Example for DynamoDB

from dsc.

Comments (3)

adranwit avatar adranwit commented on July 18, 2024

Good call, I will add dbynamo db example.

Besides the driver name, you have to supply the following parameters

  • key - AWS key
  • secret - AWS secret
  • region - AWS region
  • dbname

https://github.com/adrianwit/dyndb/blob/master/connection.go

Here is e2etesting example from
https://github.com/adrianwit/serverless_e2e/tree/master/lambda

config:
  driverName: dyndb
  credentials: $awsCredentials
tables:
  - table: Events
    pkColumns:
      - Date
      - EventType
    schemaURL: ${parent.path}/db1/schema/events.json

Where schema looks like the following:

{
"AttributeDefinitions": [
{
"AttributeName": "EventDate",
"AttributeType": "S"
},
{
"AttributeName": "EventType",
"AttributeType": "N"
}

],
"KeySchema": [
{
"AttributeName": "EventDate",
"KeyType": "HASH"
},
{
"AttributeName": "EventType",
"KeyType": "RANGE"
}
],
"ProvisionedThroughput": {
"ReadCapacityUnits": 1,
"WriteCapacityUnits": 1
}
}

from dsc.

adranwit avatar adranwit commented on July 18, 2024

Updated doc: https://github.com/viant/dsc/tree/master/docs
Looks like I've already added an example to dsunit
https://github.com/viant/dsunit/tree/master/example/dynamodb

from dsc.

jetzlstorfer avatar jetzlstorfer commented on July 18, 2024

Great, thanks!

from dsc.

Related Issues (2)

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.