You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When querying a table designed with "single-table design" practices, the package fails to escape index names.
Schema
The standard names for secondary indexes would be:
'GSI-1-PK': '...',
'GSI-1-SK': '...',
etc.
Here's an example of a query I do in JavaScript on that table:
TableName: ...,IndexName: 'GSI-1',KeyConditionExpression: '#indexName = :PK',ExpressionAttributeValues: {':PK': `...`,},ExpressionAttributeNames: {// The `-` character is a reserved character in DynamoDB, so we need to escape it'#indexName': 'GSI-1-PK',},
That's what ExpressionAttributeNames is here for (to alias attribute names).
I think this package needs to do the same thing and escape attribute names. Can you confirm that this isn't the case currently?
I get the following error:
Error executing "Query" on "https://dynamodb.us-east-1.amazonaws.com"; AWS HTTP error: Client error: POST https://dynamodb.us-east-1.amazonaws.com resulted in a 400 Bad Request response: {"__type":"com.amazon.coral.validate#ValidationException","message":"ExpressionAttributeNames contains invalid key: Synt (truncated...) ValidationException (client): ExpressionAttributeNames contains invalid key: Syntax error; key: "#GSI-1-PK" - {"__type":"com.amazon.coral.validate#ValidationException","message":"ExpressionAttributeNames contains invalid key: Syntax error; key: "#GSI-1-PK""}
Most important part:
Syntax error; key: "#GSI-1-PK"
DynamoDB doesn't like the - in the names.
Debug info
Show the query that you're having trouble with by copy-pasting the result of:
Hi. Try to enable debug in config and then run the query only.
There will be some debug logs of your query in your .log file under storage/logs/xxx.log (you can use daily type and debug as min level in the laravel logs config).
Describe the bug
When querying a table designed with "single-table design" practices, the package fails to escape index names.
Schema
The standard names for secondary indexes would be:
Here's an example of a query I do in JavaScript on that table:
That's what
ExpressionAttributeNames
is here for (to alias attribute names).I think this package needs to do the same thing and escape attribute names. Can you confirm that this isn't the case currently?
I get the following error:
Most important part:
DynamoDB doesn't like the
-
in the names.Debug info
Show the query that you're having trouble with by copy-pasting the result of:
Version info
The text was updated successfully, but these errors were encountered: