Reputation: 609
I'm trying to perform a dynamodb table scan with some filter expression. Current filter expression has a condition of begins_with something like :
import os
import boto3
from boto3.dynamodb.conditions import Attr
env_id = os.environ['ENVIRONMENT']
buId = '10014'
# Define the table
table = boto3.resource('dynamodb').Table(env_id+'-abcd')
response = table.scan(
ProjectionExpression='#SubsId,#ItemId,#SeqNum',
ExpressionAttributeNames={
'#SubsId' : 'SubsId', # partition key
'#ItemId' : 'ItemId', # sort key
'#SeqNum' : 'SeqNum' # sequence number
},
FilterExpression=Attr('SubsId').begins_with(buId) AND //SeqNum Not Exists
)
In the FilterExpression I want to check if
SeqNum Not Exists
Can someone help me with how can I add that after AND condition on the above code?
Upvotes: 0
Views: 6150