Created
December 4, 2019 04:56
-
-
Save rbotzer/acf99798656e582fa21feddb7de5598e to your computer and use it in GitHub Desktop.
Scan the entire dataset for a random sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def print_sensor_data(rec, pp): | |
k, _, b = rec | |
print(k[2]) | |
print(b['t']) | |
print("=" * 30) | |
print("\nScan for a random sampling (about 0.25%) of all the sensor data") | |
if options.interactive: | |
pause() | |
predexp = [ | |
pxp.rec_digest_modulo(365), | |
pxp.integer_value(1), | |
pxp.integer_equal() | |
] | |
query = client.query(namespace, set) | |
query.predexp(predexp) | |
query.foreach(print_sensor_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment