Skip to content

Instantly share code, notes, and snippets.

@joel-bernstein
Created September 14, 2018 13:37
Show Gist options
  • Save joel-bernstein/538817ea3c8c2f6284656ee21f15b834 to your computer and use it in GitHub Desktop.
Save joel-bernstein/538817ea3c8c2f6284656ee21f15b834 to your computer and use it in GitHub Desktop.
plist(facet(collection1, q="stock_s:(1 2 3)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d)),
facet(collection1, q="stock_s:(4 5 6)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d)),
facet(collection1, q="stock_s:(7 8 9)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d)))
@joel-bernstein
Copy link
Author

joel-bernstein commented Sep 14, 2018

Using list and plist combined:

list(plist(facet(collection1, q="stock_s:(1 2 3)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d)),
           facet(collection1, q="stock_s:(4 5 6)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d)),
           facet(collection1, q="stock_s:(7 8 9)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d))),
     plist(facet(collection1, q="stock_s:(10 11 12)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d)),
           facet(collection1, q="stock_s:(13 14 15)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d)),
           facet(collection1, q="stock_s:(16 17 18)", buckets="prod_ss, stock_s, day_i", bucketSizeLimit="-1", bucketSorts="index asc", count(*), sum(price_i), sum(price_f), sum(service_d), sum(componentA_d))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment