Q: Scan of data of a specific column in DynamoDB table - Reserved Keyword I am trying to scan all the items of a specific column from a dynamodb table:

I only want to get the data from the data column. I am not interesting in the seqno and payload column. I am using this code right now
import boto3

dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('TablaLoraPF')
response  = table.scan(ProjectionExpression = 'data')
data = response['Items']


for x in range(80):
    print(data[x])

where with the ProjectionExpression I am choosing the data column and I am orinting 80 items of my table BUT what happened is when I run the code I got this error
Traceback (most recent call last):
  File "c:\Users\Moises Curvelo\Desktop\python dynamo\dynamo.py", line 15, in <module>
    response = table.get_item(
  File "C:\Python310\lib\site-packages\boto3\resources\factory.py", line 580, in do_action
    response = action(self, *args, **kwargs)
  File "C:\Python310\lib\site-packages\boto3\resources\action.py", line 88, in _call_
    response = getattr(parent.meta.client, operation_name)(*args, **params)
  File "C:\Python310\lib\site-packages\botocore\client.py", line 495, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "C:\Python310\lib\site-packages\botocore\client.py", line 914, in _make_api_call
    raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: **An error occurred (ValidationException) when calling the GetItem operation: Invalid ProjectionExpression: Attribute name is a reserved keyword; reserved keyword: data
**

But that only happens when I am choosing the data column, because when I am choosing seqno column it print to me the correct items.
This is for my thesis.
This is what I get when I am using seqno but that is not the item column that I need.

This is what I am expecting but from the data column.

A: Sometimes there is a need for everyone to use DynamoDB's reserved keyword names on their attribute names. In such cases, they can utilize the expression attribute names to map the reserved keyword name with another alternative name.
You can use the expression attribute names in your code as like below:
...
response  = table.scan(
        ExpressionAttributeNames = {'#data': 'data'},
        ProjectionExpression = '#data')
...

