How to bulk upsert of JsonArrayDocuments through N1QL

Hi
I have a set of key and values with me. I want to do a bulk upsert of them into couchbase through N1QL.
If the key does not exist it should create new record, otherwise it just should just upserts the existing record.

Any way of doing this in bulk through N1QL

https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/insert.html

Performing Bulk Inserts
Use the UPSERT statement to batch insert multiple documents using the following syntax:

UPSERT INTO keyspace (KEY, VALUE)
VALUES ( “1”, { “value”: “one” } ),
VALUES ( “2”, { “value”: “two” } ),
…,
VALUES ( “n”, { “value”: “n” } );

If you already have keys values you can use SDKS to do same

Thanks @vsr. Will check this bulk upsert n1ql option and tick the solution.

Regards

Viswa