dynamodb-migrations icon indicating copy to clipboard operation
dynamodb-migrations copied to clipboard

Can't seed string sets

Open csi-lk opened this issue 9 years ago • 2 comments

Looking for a way to add string sets to seeds, when putting this in an array it just seeds a list

Any ideas?

csi-lk avatar Nov 17 '16 23:11 csi-lk

@Si1kIfY Can you provide an example of what sort of data?

AshanFernando avatar Nov 18 '16 06:11 AshanFernando

Hi, sorry for the late reply...

There doesn't seem to be a syntax for seeding DynamoDB String Sets

For eg.

    {
      "docId":"4a6dfdc4-b6b1-2bde-bfa7-0fd3b3647152",
      "list": [
        "0",
        "1",
        "2"
      ],
      "stringSet": [
        "test1",
        "test2",
        "test3"
      ]
    }

Would create two list data types

As far as I can tell you are using the DynamoDB document client batchWrite function in runSeeds to create the seeds, maybe I could submit a PR for some sort of string set syntax to wrap the createSet function around an array?

Maybe double brackets ie. [[ ... ]]

Thoughts?

csi-lk avatar Jan 03 '17 04:01 csi-lk