N1QL insert-select

Hi @dejan, try this:
INSERT INTO tmp (key _k, value _v) SELECT META().id || “_new” _k, { “myid” : t.id, “myname” : t.name } _v
FROM travel-sample t WHERE type = “airline” limit 4 RETURNING meta(tmp).id, *;

In insert-select example in your documentation it is confusing to me

Thanks for the feedback. We will add more explanation. The 3 references to _v are correct and is referring to the documents of bucket_2

  1. bucket2 alias
  2. projection list of SELECT, which is all docs from bucket2, i.e (1)
  3. VALUE parameter, which is the output _v from SELECT in (2)

-Prasad