title: Amazon DynamoDB :1 validation error detected: Value '0' at 'segment' failed to satisfy constraint: Member must have value less than or equal to -1
body: <p>This is my query :</p>
  
  <pre><code>var params = {
      TableName: 'UserGroup',
  
      // optional expression to filter results
      FilterExpression: '#groupId = :val',
  
      // optional - list of attributes to return (default is to return all)
      //ProjectionExpression: 'STRING_VALUE',
  
      // optional - if used by relevant expressions
      ExpressionAttributeNames: {
          '#groupId': 'groupId',
          // ... more expression attribute names ...
      },
      ExpressionAttributeValues: {
          ':val':{'S':'f8803eb0-8210-11e5-9d6b-bb8d7a911aab'},
          // ... more expression attribute values ...
      },
  
      Limit: 1, // optional (limit the number of items to evaluate)
      Select: 'ALL_ATTRIBUTES', // optional (ALL_ATTRIBUTES | COUNT)
      Segment: 0, // optional (for parallel scan)
      TotalSegments: 0, // optional (for parallel scan)
      ReturnConsumedCapacity: 'NONE', // optional (NONE | TOTAL | INDEXES)
  };
  dynamodb.scan(params, function(err, data) {
      if (err) print(err); // an error occurred
      else print(data); // successful response});
  }
  </code></pre>
  
  <p>I am trying to scan the data from the Dynamo Db But it throws the Error.during fetching the data,Since scan query result all the data from the database but i want to filter the result return b the query.
  Can any body give the query to fetch the filter scan result in dynamoDb usin 
  node.js</p>