Loading Data From DynamoDB Into Amazon Redshift
DynamoDB is an exceptional key-value store with great performance characteristics. But it's quite limited when it comes to data analysis and business intelligence queries.
Before you can copy data from a DynamoDB table, you need to create the corresponding table in Redshift.
The following copy
command performs the copy (this will count against your DynamoDB's read capacity):
copy users from 'dynamodb://my-users'
credentials 'aws_access_key_id=<Your-Access-Key-ID>;aws_secret_access_key=<Your-Secret-Access-Key>'
readratio 50;
where users
is the destination table in Redshift, my-users
is the corresponding DynamoDB table and readratio
is how much of the provisioned read capacity the copy operation can consume.
Caveats
- DynamoDB does not support NULL values, so empty strings, blank values will have to be specially handled in Redshift.
- The DynamoDB attributes are case-insensitively matched to the Redshift table's columns. If there are two columns on Redshift that can match case-insensitively to the DynamoDB attributes, the
copy
command will fail. - The data types on Redshift and Dynamo do not match one-to-one. For example, DynamoDB's
binary
andset
data types are not supported.
Next Generation SQL Data Analysis
Write SQL, visualize data, and share your results.
Onboarding forward-thinking teams now:
No spam, ever! Unsubscribe any time. Learn more about the product.