gary
gary

Reputation: 213

Why azure storage table explorer returning wrong result?

enter image description here

As we see there i filtered the result so i get rows where gps_speed > 150, but i get gps_speed that eqauls to (25,24,27,...), I thought maybe the explorer have a bug so i typed script to do the same job still get the same result

async function speed1Query(carId,continuationToken){
    speed = "150"
return new Promise((resolve ,reject)=>{
    query = new azure.TableQuery()
    .select(['*'])
    .where('gps_speed gt ?',speed);
    tableSvc.queryEntities('eventsdata', query, continuationToken, (error, results)=> {
        if(!error){
            resolve(results); 
        }else{
            reject(error);
        }
      });
})
}
async function speed1(carId){
    var continuationToken = null;
    do{
        var results =  await speed1Query(carId, continuationToken);
        continuationToken = results.continuationToken;
        
    }
    while(continuationToken!=null);
    return results;
}
async function show(){
      result1 = await speed1("1");
      console.log(result1.entries.length);
      
  }

This is what i get when i run the code

247

Which is the same number of rows Azure Explorer return.

Upvotes: 1

Views: 95

Answers (1)

user480184
user480184

Reputation:

Check the type of the column in your filter. Its doing an alphabetical filtering. In case of strings, "25" > "150".

Upvotes: 1

Related Questions