I am trying to create a new bucket and populate it with the first 10 records of an existing bucket. Here is the query I used:
INSERT INTO kate (KEY UUID())
Select * from stuff limit 10;
The results I got were not what I intended:
{
“stuff”: {
“Computer”: “1266F66B524F1.gmail.com”,
“Role”: “Cashregister”,
“TimeGenerated”: “2020-08-21T09:00:00Z”
}
}
How do I just get the data values and not the “stuff” array?
I’m doing something wrong, it gives me an error on the colon.
“code”: 3000,
“msg”: “syntax error - at Role”,
“query”: “insert into kate-nouuid (key k, value doc)\n select doc.Role || ":" || doc.Computer AS k, doc from stuff as doc limit 10;”
BTW I already read the documents on insert but the examples are too simple and the syntax doesn’t tell you how to handle multiple key values or even multiple values to load. It only shows all or nothing.
This didn’t work, it created 10 records with UUIDs and no data. I have a lot to learn here clearly.
INSERT INTO kate (KEY UUID(), value doc)
Select doc from stuff limit 10;