有谁知道这些记录与roles_masks> 250代表什么?
查询:https://blazer.instacart.com/queries/68866-roles_mask-weird-roles_mask
SELECT roles_mask
, count(distinct batch_id) as batches
FROM fact_batch
WHERE delivery_completed_date_time_pt >= current_date - 3
GROUP BY 1
ORDER BY 2 DESC
输出:
+---------------+---------+
| roles_mask | |
+---------------+---------+
| batches | |
| 32 | 178,752 |
| 8 | 48,453 |
| 1,075,855,362 | 2,171 |
| 0 | 556 |
| 128 | 528 |
| 136 | 434 |
| 544 | 325 |
| 1,091,600,387 | 251 |
| 192 | 222 |
| 1,109,409,794 | 164 |
| 200 | 95 |
| 520 | 80 |
| 34 | 50 |
| 648 | 38 |
| 1,075,856,386 | 35 |
| 546 | 30 |
| 138 | 29 |
| 2,113,538 | 24 |
| 2,114,562 | 20 |
| 72 | 16 |
| 640 | 15 |
| 1,073,774,595 | 13 |
| 1,048,587 | 11 |
+---------------+---------+
ETL脚本:
fact_batch:https://github.com/instacart/carrot/blob/master/data-engineering/redshift_sql/agg_fact_batch.sql
fact_batch_state:https://github.com/instacart/carrot/blob/master/data-engineering/redshift_sql/batches_elt.sql