Hey folks,
I’m simply trying to grab the first n elements of an array field like this:
SELECT
attributes[0:3] AS attributes
FROM `bucket`
USE KEYS["id"]
If there are less than ‘n’ (in this case 3) items in the array nothing is returned. I’m getting around this by doing the following:
IFMISSING(attributes[0:3], attributes) AS attributes
Is there a better way to do this?
Thanks