You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 15, 2018. It is now read-only.
Is anybody able to help me work out how to use BatchWriteItem on Arduino using the SDK? I've got putItem working fine, and from reading the library have worked out I need to change the following (currently shown with putItem as working, Batchwriteitem commented out:
In my header: PutItemInput putItemInput; //BatchWriteItemInput batchWriteItemInput;
In the function:
`putItemInput.setItem(MinimalMap < AttributeValue > (itemArray, 4));
putItemInput.setTableName(TABLE_NAME);
// batchWriteItemInput.setRequestItems(MinimalMap<MinimalList > requestItems);
//perform putItem and check for errors.
PutItemOutput putItemOutput = ddbClient.putItem(putItemInput, actionError);
//BatchWriteItemOutput batchWriteItemOutput = ddbClient.batchWriteItem(batchWriteItemInput, actionError);`
For putItem, the library helps me create the necessary JSON for MinimalMap < AttributeValue > (itemArray, 4) using the following: MinimalKeyValuePair < MinimalString, AttributeValue > att1(HASH_KEY_NAME, deviceValue); MinimalKeyValuePair < MinimalString, AttributeValue > att2(RANGE_KEY_NAME, timeValue); MinimalKeyValuePair < MinimalString, AttributeValue > att3(CATEGORY_KEY_NAME, categoryValue); MinimalKeyValuePair < MinimalString, AttributeValue > att4(DEBUG_KEY_NAME, debugValue); MinimalKeyValuePair < MinimalString, AttributeValue> itemArray[] = { att1, att2, att3, att4 };
What I can't get my head around is how to use something similar within a loop to create the MinimalMap<MinimalList > requestItems needed for batchWriteItem.
I'm learning everything as I go with the power of google, so don't really know what I'm doing - if anyone can point me in the right direction it would be much appreciated - would be great to be able to share a working BatchWriteItem example here for others.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
Is anybody able to help me work out how to use BatchWriteItem on Arduino using the SDK? I've got putItem working fine, and from reading the library have worked out I need to change the following (currently shown with putItem as working, Batchwriteitem commented out:
In my header:
PutItemInput putItemInput; //BatchWriteItemInput batchWriteItemInput;
In the function:
`putItemInput.setItem(MinimalMap < AttributeValue > (itemArray, 4));
putItemInput.setTableName(TABLE_NAME);
// batchWriteItemInput.setRequestItems(MinimalMap<MinimalList > requestItems);
For putItem, the library helps me create the necessary JSON for MinimalMap < AttributeValue > (itemArray, 4) using the following:
MinimalKeyValuePair < MinimalString, AttributeValue > att1(HASH_KEY_NAME, deviceValue); MinimalKeyValuePair < MinimalString, AttributeValue > att2(RANGE_KEY_NAME, timeValue); MinimalKeyValuePair < MinimalString, AttributeValue > att3(CATEGORY_KEY_NAME, categoryValue); MinimalKeyValuePair < MinimalString, AttributeValue > att4(DEBUG_KEY_NAME, debugValue); MinimalKeyValuePair < MinimalString, AttributeValue> itemArray[] = { att1, att2, att3, att4 };
What I can't get my head around is how to use something similar within a loop to create the MinimalMap<MinimalList > requestItems needed for batchWriteItem.
I'm learning everything as I go with the power of google, so don't really know what I'm doing - if anyone can point me in the right direction it would be much appreciated - would be great to be able to share a working BatchWriteItem example here for others.
The text was updated successfully, but these errors were encountered: