Search code examples
node.jsgoogle-cloud-platformgoogle-cloud-functionsgoogle-cloud-bigtablebigtable

How to add limit options while fetching data from bigTable ? Can someone give me the proper syntax to do so in NodeJS


Currenlty I am doing like this

var [rowData] = await table.row(key).get({limit: 2});

Still am getting the 4 results instead of 2.


Solution

  • Worked for me:

    var filter = [
          {
             family: 'payloads'
          },
          {
             row: {
                    key: identifier,
                    cellLimit:2
             }
          }
    ];