में जेसन डालने के लिए यहां मेरा कोड है।
मैं asset_data
जेसन asset_data
कॉलम में डालना चाहता हूं। मैं aws sdk का उपयोग कर रहा हूँ। यह कहता है कि एसएसके अब जेसन के लिए समर्थन है। http://aws.amazon.com/releasenotes/SDK/JavaScript/1691866671551861dsonodb
var asset_data = {
"name": "name" + i,
"contentUrl": "http://www.hdwallpapersimages.com/nature-beauty-desktop-images/94892/",
"size": 300,
"headline": "headline",
"description": "assetUrl reference for the creator",
"encodingFormat": 'jpeg'
};
var params = {
TableName: 'xyz',
Item: { // a map of attribute name to AttributeValue
"asset_id": {S: "asset" + i},
"hit_id": {S: "0"},
"created_date": {"S": Date.now().toString()},
"status": {N: "0"},
"operation": {S: "image_tagging"},
"asset_data": {L: asset_data},
"source": {S: "DAM"},
"completed_date": {S: Date.now().toString()},
"response_data": {S: "taged value"}
// more attributes...
},
ReturnValues: 'NONE', // optional (NONE | ALL_OLD)
ReturnConsumedCapacity: 'NONE', // optional (NONE | TOTAL | INDEXES)
ReturnItemCollectionMetrics: 'NONE' // optional (NONE | SIZE)
};
db.putItem(params, function (err, data) {
if (err) console.log(err); // an error occurred
else console.log("inserted..."); // successful response
});
क्या इस दस्तावेज़ क्लाइंट() चीज को सीएलआई से पुट-आइटम करने के लिए उपयोग करने का कोई तरीका है? इसे दस्तावेज़ीकरण में नहीं देख सकते हैं। धन्यवाद! – Gopala