Update query to add new attribute and its value in existing document

Not sure what do u mean pass. I am not expert on those tools. cc @binh.le

There is many ways to do this. Even you can insert your input into bucket as temporary key.
USE MERGE option from temp key and actual documents

Best approach is described here Query to insert new document from an existing document through named parameter - #6 by vsr1