In this video, you will learn how to write records from CSV file into Amazon DynamoDB.
CSV to Amazon DynamoDB
Read full transcript
- Hi! In this video, I will explain how to write records from a CSV file to Amazon DynamoDB.
- First, I create a Pipeline file and name it CSV to DynamoDB.
- Then I add the File Reader Snap; and open the Settings.
- And, select the file from which I want to read records.
- Next, I add a CSV Parser Snap;
- And, save the Pipeline so that it gets validated.
- I open the data preview of the CSV Parser. The file contains records pertaining to books and the price field is of number type and all the remaining fields are of string type in DynamoDB.
- Next, I add a Mapper Snap and configure the Settings;
- I add all the fields in the Expression column and Target path column;
- In case of DynamoDB, in the target path column, we must prepend ‘$PutRequest.Item’ and append the DynamoDB type. Because values in the price column are of number type, I append N. And, because all the remaining columns are of string type, I append S.
- Then, I add the DynamoDB Bulk Write Snap and select the DynamoDB account that contains the table to which I want to write data;
- Then I open the DynamoDB Bulk Write Snap settings;
- Select the table to which I want to write data and save it.
- Before I execute the Pipeline, I open Eclipse which has been configured to display data in the table selected earlier. The table should be empty.
- Now we go back to the Designer and execute the Pipeline manually.
- I open ‘Pipeline Execution Statistics’.
- There are 9 records have been written to DynamoDB.
- I return to Eclipse and run a scan.
- And we see that the table contains 9 records.
- In this demo, I showed how SnapLogic makes it easy to extract records from files and write them to DynamoDB.
- Thank you for watching this demo! Visit docs-snaplogic.atlassian.net to learn about more features.