Skip to content

Instantly share code, notes, and snippets.

@clementsjj
Created January 22, 2020 17:36
Show Gist options
  • Save clementsjj/53d0cfe5c027c3eb3c6d1699b784bb0c to your computer and use it in GitHub Desktop.
Save clementsjj/53d0cfe5c027c3eb3c6d1699b784bb0c to your computer and use it in GitHub Desktop.
// Following will poll only the rows for Staten Island
// ✓ Staten Island
// ✓ Queens
// ✓ Brooklyn (4,000,000 / maxComplaintNumResult[2])
// ✓ Bronx (3,000,000 / maxComplaintNumResult[1])
// ✓ Manhattan (2,000,000 / maxComplaintNumResult[0])
const highNum = 2000000;
const whereStatement = `complaint_number<'${highNum}' AND complaint_number>='${maxComplaintNumResult[0]}'`;
const statenIslandComplaints = await publisher(
datasetIdentifier,
'nyc-dob-complaints',
'nyc-dob-complaints-subscriber',
complaintsCleanRecord,
{
$where: whereStatement
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment