DynamoDB how to use index in PartiQL queries?

I have seen the dynamoDB doc for the PartiQL syntax:

      SELECT expression  [, ...] 
FROM table[.index]
[ WHERE condition ] [ [ORDER BY key  [DESC|ASC] , ...]

but in practice:

      select * from dev .pk-all-index
where "pk" = 'config' AND ("brand" = 'tesla' OR contains("aliases", 'tesla.com'))

gives me the error:

An error occurred during the execution of the command. ValidationException: Statement wasn't well formed, can't be processed: Unexpected keyword

2 ответа

из "tablename"."indexname" надеюсь, что это поможет

Вы можете поместить имя таблицы и индекс в кавычки по отдельности.

      SELECT * FROM "dev"."pk-all-index" WHERE "pk" = 'config' AND ("brand" = 'tesla' OR contains("aliases", 'tesla.com'))
Другие вопросы по тегам