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!

demandé il y a 3 ans527 vues
2 réponses
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

répondu il y a 3 ans
0

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

répondu il y a 3 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions