Hi,
I am trying to build an application that shows data stored in DynamoDB in a data table, then when clicked take the user through to the item to allow them to edit it and submit the change.
I've followed the documentation on the connector and the below video, but being new to Outsystems I am struggling to get anything working. Is there a step-by-step guide to help me do this?
https://www.outsystems.com/forums/discussion/70312/new-video-how-to-use-amazon-dynamodb/
Thanks in advance!
Hi Adrian, thanks for posting the question in the forums (assuming you are the same Adrian Woodrup as the person who commented on the video)
Let me try to help you:
For a more concrete example:
Let's say you have a table with all your music collection (which is the get started example in the AWS documentation).
You create the Music table and the ArtistName as the Partition Key for that table.
If you want to get all your music, you use the Scan method (which again, is very resource intensive).
If you want to get the music from Artist Z, you use the Query method. Something along these lines:
Here's the documentation on how to use the inputs for the Query method: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Query.html
To get a specific record/row from a table, you'll need to use the Item_Get action in the DynamoDBConnector. The Key input parameter should be the result of a JSON Serialize of the helper structures. So for example, if you want to return the Song "Another one Bites the Dust" you'll want to do something like this:
I'm pretty sure you'll have more questions, I just want to keep it simple for now.
Hi @Cristiana Umbelino
Thank you about your video. Very useful...
But we have a problema when use Query. I don't why but i receve error when i try use
I guess all attribuited is correct or not? Do you can see bellow?
"id" is my Parition key;
My return is a error: "Invalid FilterExpression: The expression can not be empty;". But FilterExpression is not mandatory!
Do you have any exemple that use Query and that can share with us?
Thank you again.
Hi @Aaron Mukerjee
have you solved this issue? cause i got the same problem now. could you give some advice?
Hey Jeferson,
The FilterExpression parameter should indeed be optional and as much as I can see there's nothing in the connector's code that makes it mandatory. I can't open Integration Studio right now to check the extension code but I'm guessing that's something in the Query method that is not properly handled.
From what you showed and from what I recall when I was using DynamoDB it seems that you have the correct values for the parameters. I did a few tests and I'm having the same issue which is really weird, that error is not supposed to happen.
While I try to get a glimpse at the code, are you able to open the extension module and check what's missing?
Hi Christian, thanks for the reply!!!
Now I'm using Mac OS, but i'm going to find a Windows one to investigate the code as well.
My first impression was that my parameter might be incorrect, but now with your analysis I will focus on the connector code.
I return here with the results of my investigation.
Thanks.
Does anyone still experience the issue with "Invalid FilterExpression: The expression can not be empty "?
I just happened to fix mine with tinkering with my AmazonDynamoDBConnector (extension)
I just Copied the Query action then removed those parameters that are not needed. It works for me.