How putdynamodb works in nifi?

2019-07-06 15:04发布

I am trying to put a value into dynamoDB using nifi, But i don't know where to enter my new value in putdynamoDB properties. It always inserts my hash key value into dynamoDB.

GetDynamoDB works fine.

enter image description here

Any help will be appreciated.

1条回答
Melony?
2楼-- · 2019-07-06 15:32

I'll just go through each property of the processor.

Table Name - The name of your Dynamo DB table.

Hash Key Name - The name of your primary partition key in the Dynamo table.

Range Key Name - The range key name of your primary partition key (not required must be set when setting up the Dynamo table).

Hash Key Value - The key you want to use to look up values in the Dynamo table. This would most likely be a unique id that you have in the FlowFile attribute and you would reference with the expression language. Example: ${uuid} would use the unique id of the flow file NiFi generated.

Range Key Value - If you are using the range key feature, provide the range key value here.

Hash Key Value Type - The type you are sending as the key value, string or number. If you're using the uuid, it would be string.

Range Key Value Type - Same as the line above except with the range key. Will be ignored if Range Key Name property is not set.

Json Document attribute - This is the content you want stored as the value in Dynamo. When you reference the corresponding Hash Key associated with this data, this is the value Dynamo will return. The value comes from your FlowFile content that is passed into processor which must be in JSON format. If you want to store the entire contents of the FlowFile that is in JSON formate, simply put a $ here. If you want a specific JSON attribute, this behaves exactly like the EvaluateJSONPath processor where if you have an id at the root object, you would reference this by: $.id. One thing to be aware of, you may not have empty strings in your JSON object, see here for more details: https://github.com/aws/aws-sdk-js/issues/833

Character set of document - The character format your JSON FlowFile content is in.

Batch items for each request (between 1 and 50) - The number of items you want sent in one post. The higher the number the less API calls to Dynamo and possible better write performance.

Region - The AWS region your Dynamo Table is in.

Access Key - Your AWS access key given to you upon sign up or creating a new user.

Secret Key - Your AWS secret key given to you upon sign up or creating a new user.

AWS Credentials Provider service - If running NiFi on an EC2 instance using this service is how you can use the default IAM role to authenticate. You must create this service in the controller services section. https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-aws-nar/1.5.0/org.apache.nifi.processors.aws.credentials.provider.service.AWSCredentialsProviderControllerService/

Communications Timeout - Amount of time to wait for response from Dynamo.

SSL Context Service - SSL Context Service that, if provided, will be used to create connections also created in the controller services section of NiFi.

查看更多
登录 后发表回答