Open
Description
ok, I've been banging my head on this too long now.
Simple summary - import
(and put
) dont actually load data into ddb.
I've also tested this with put
(removing the first line that contains the table schema from the export) after creating a table, with the same result. empty stdout/stderr, and no data added to ddb.
running v1.4.1 code:
%% dyno export us-west-2/dsr-test
{"AttributeDefinitions":[{"AttributeName":"user","AttributeType":"S"}],"TableName":"dsr-test","KeySchema":[{"AttributeName":"user","KeyType":"HASH"}],"ProvisionedThroughput":{"ReadCapacityUnits":8,"WriteCapacityUnits":2},"TableArn":"arn:aws:dynamodb:us-west-2:569641690693:table/dsr-test"}
{"user":{"S":"testser"}}
{"user":{"S":"teetst"}}
%% dyno export us-west-2/dsr-test | dyno import us-west-2/dsr-test-restore-1
%% dyno export us-west-2/dsr-test-restore-1
{"AttributeDefinitions":[{"AttributeName":"user","AttributeType":"S"}],"TableName":"dsr-test-restore-1","KeySchema":[{"AttributeName":"user","KeyType":"HASH"}],"ProvisionedThroughput":{"ReadCapacityUnits":8,"WriteCapacityUnits":2},"TableArn":"arn:aws:dynamodb:us-west-2:569641690693:table/dsr-test-restore-1"}
%%
The tests added in #117 for #96 seem to pass:
cheese:~/git/github/dyno-clone((v1.4.1))%% npm uninstall
cheese:~/git/github/dyno-clone((v1.4.1))%% npm install
cheese:~/git/github/dyno-clone((v1.4.1))%% export PATH="$(npm bin):$PATH"
cheese:~/git/github/dyno-clone((v1.4.1))%% node test/cli.test.js
...
# [cli] export --> import roundtrip
ok 31 cli success
ok 32 cli success
ok 33 loaded records into table
and using the direct code (vs the npm installed package) has the same result:
cheese:~/git/github/dyno-clone((v1.4.1))%% node bin/cli.js export us-west-2/dsr-test
{"AttributeDefinitions":[{"AttributeName":"user","AttributeType":"S"}],"TableName":"dsr-test","KeySchema":[{"AttributeName":"user","KeyType":"HASH"}],"ProvisionedThroughput":{"ReadCapacityUnits":8,"WriteCapacityUnits":2},"TableArn":"arn:aws:dynamodb:us-west-2:569641690693:table/dsr-test"}
{"user":{"S":"testser"}}
{"user":{"S":"teetst"}}
cheese:~/git/github/dyno-clone((v1.4.1))%% node bin/cli.js export us-west-2/dsr-test | node bin/cli.js import us-west-2/dsr-test-restore-3
cheese:~/git/github/dyno-clone((v1.4.1))%% node bin/cli.js export us-west-2/dsr-test-restore-3
{"AttributeDefinitions":[{"AttributeName":"user","AttributeType":"S"}],"TableName":"dsr-test-restore-3","KeySchema":[{"AttributeName":"user","KeyType":"HASH"}],"ProvisionedThroughput":{"ReadCapacityUnits":8,"WriteCapacityUnits":2},"TableArn":"arn:aws:dynamodb:us-west-2:569641690693:table/dsr-test-restore-3"}
cheese:~/git/github/dyno-clone((v1.4.1))%%
Metadata
Metadata
Assignees
Labels
No labels