0

I want to query from a secondary index with PartiQL. Querys from the basetable work fine. But when trying it on a Secondary Index i get an empty list I tried the following:

table_name_2 = "datatable.GSI1"

pk = 'U-0001'
stmt = f"SELECT * FROM {table_name_2} WHERE pk=?"
pmt =[{ "S": pk }] 

resp = dynamodb_client.execute_statement( Statement=stmt , Parameters= pmt ) 

pp.pprint(resp['Items'])

I want to query from a secondary index with PartiQL.

I was expecting to get the correct item from the dynamodb.

SwiftMiner
  • 47
  • 5

0 Answers0