Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

PutDynamoDB Error - Hash Key Value

PutDynamoDB Error - Hash Key Value

New Contributor

Hello, Everyone!

I have been trying to use the PutDynamoDB processor, and I almost there. I'm able to run the ExecuteSQLRecord to get my data and store in a JSON file. The data is flowing, but I'm getting the following error in the log:

PutDynamoDB[id=28e4e8cf-016b-1000-a35c-276514f81580] Hash key value '' is required for flow file StandardFlowFileRecord[uuid=0ce692ff-d784-4882-a565-f5425479d316,claim=StandardContentClaim [resourceClaim=StandardResourceClaim[id=1559758360111-4, container=default, section=4], offset=0, length=275868738],offset=0,name=0ce692ff-d784-4882-a565-f5425479d316.json,size=275868738]

I understand that, is looking for the Hash Key Value, but I not sure how do I pass it. In the PutDynamoDB properties tab, NiFi sets

${dynamodb.item.hash.key.value} 

as default value. But looks like this isn't the right way to do it.

 

Can I get some guidance on this?

 

My workflow:

109196-screen-shot-2019-06-05-at-154517.png

 

The JSON I'm trying to put in DynamoDB looks like this:

  1. [ {
  2.   "CUSTOMER_ID" : "11111111111",
  3.   "TRANSACTION_TYPE" : "G",
  4.   "ID_TRANSACTION" : 3,
  5.   "ACCOUNT_ID" : 111111111,
  6.   "TRANSACTION_VALUE" : "100.00"
  7. }, {
  8.   "CUSTOMER_ID" : "22222222222",
  9.   "TRANSACTION_TYPE" : "G",
  10.   "ID_TRANSACTION" : 10,
  11.   "ACCOUNT_ID" : 222222222,
  12.   "TRANSACTION_VALUE" : "1000.00"
  13. }, {
  14.   "CUSTOMER_ID" : "33333333333",
  15.   "TRANSACTION_TYPE" : "R",
  16.   "ID_TRANSACTION" : 8,
  17.   "ACCOUNT_ID" : 333333333,
  18.   "TRANSACTION_VALUE" : "3000.00"
  19. }
  20.  ]

 

Any help will be appreciated

 

Thanks!

1 REPLY 1
Highlighted

PutDynamoDB Error - Hash Key Value

New Contributor

Up!

Don't have an account?
Coming from Hortonworks? Activate your account here