Can you use an array as a index key?

0

Seeking clarification, the doc page (https://docs.aws.amazon.com/qldb/latest/developerguide/working.create.html) says:

"Indexes can only be created on a single top-level field. Composite, nested, unique, and function-based indexes are currently not supported."

So does that mean that you can only create an index on simple Ion values? I'd like to use a tuple/list of strings as a key, and while it'd be easy enough to generate a single string from the list, it'd be nice to avoid it if possible.

Thanks!

gefragt vor 3 Jahren527 Aufrufe
2 Antworten
0

Hello TomCulliton, thanks for reaching out to us!

Yes, you can create an index on any Ion types, including Lists and Structs. However, the index lookup is only by equality of the Ion value regardless of the type of the Ion Value. For example, you can't find a value within an indexed List. Please let me know if this helps.

Thanks,
QLDB team

beantwortet vor 3 Jahren
0

Equality to the whole list is fine and exactly what I was looking for. Many thanks!

beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen