I'm newbie in NiFi and try to import data from MySQL to DynamoDB.
I can fetch data from MySQL(5 mln records) but I don't understand how to ingest query result to DynamoDB table. How I should configure PutDynamoDB? Especially how to fill Json Document attribute?
Hello, Alena! How are you?
I have some doubts too about build a workflow to move data from SQL to NoSQL. Did you manage to solve this?
I realize this is from 3 years ago, but nobody ever answered and I needed the answer today. Turns out that if your intent is to push your JSON flow file into your dynamoDB table, all you need to do is put $ in the Json Document attribute field.
2 other things I learned along the way and I have no better place to share them:
1) the range key in the processor is the sort key you defined when you created your table
2) if you have a + in your secret key Nifi has a hard time encoding it or something, and you won't be able to authenticate.
Admittedly I know very little about DynamoDB, but I don't think it provides a native method to pull the entire table. If this is a one-time task, I suppose you could export your table to S3, and then use the FetchS3 nifi processor to get it into your flow. If you're looking to process new records as they arrive, I suppose you could use lambda to push the new records into Kafka or Kinesis and use nifi to consume that queue.
There is also a way (which I have not explored) to use HiveQL with EMR for querying DynamoDB tables. Assuming that works how I *think* it works, you could then use the SelectHiveQL processor to pull your DynamoDB table into your nifi flow. I've also never used EMR, but maybe it will be a fun experiment?