We are using dynamo db scan functionality to fetch all the data from dynamo like this and it works fine:
var myScanConditions = new List<ScanCondition>();
myScanConditions .Add(new ScanCondition("PartitionKey", ScanOperator.BeginsWith, "data"));
var myData= await Context.ScanAsync(myScanConditions ).GetRemainingAsync();
//some code to filter some data from above
in our dynamo db partition key is like
data#rec1
data#rec2
data#rec3
and so on
I wanted to check if we can replace Scan with Query. I tried using the below code by passing scan condition to the Query but looks like its not correct. It returns me nothing.
var myData= await Context.QueryAsync("data", myScanConditions );
So my question is there an option to provide partial text for partition key to the QueryAsync method and still return all records from dynamo. For example in my case as above if I just pass "data" (partial text) to my query async.
Is there a way to do this?
Thanks