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!

posta 3 anni fa527 visualizzazioni
2 Risposte
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

con risposta 3 anni fa
0

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

con risposta 3 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande