Support Questions

Find answers, ask questions, and share your expertise

Hash key value missing putdynamodb nifi

avatar
New Contributor

Hi

Does someone know how to work properly with putdynamodb?

I'm getting this error  "Hash key value '' is required for flow
file StandardFlowFileRecord"

My flow is the next

CJLlanes_0-1648143041428.png

The configuration of my processor is the next

CJLlanes_1-1648143115783.png

 

My Partition Key in the dynamo table is Recursos ID

my json is the next

{
    "id"1,
    "nombres":"Gian",
    "paterno":"Perez",
    "materno":"Perez",
    "rfc":"PEPJ870530N11",
    "domicilios":[
        {"calle":"calle 10","colonia":"Miraflores","cp":"0000"}
    ]
}
 
Thanks in advance

 

1 REPLY 1

avatar
Super Guru

@CJ-Llanes ,

 

The expression ${id} refers to a flowfile attribute called "id", not to the "id" attribute of your flowfile content.

You need to extract the "id" from the flowfile first with a EvaluateJsonPath between your FlattenJson and PutDynamoDB processors. Like this:

araujo_0-1648162921787.png

Cheers,

André

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.