import * as wmill from 'windmill-client'

type AnalyticsRow = {
	metric: string
	value: number
	segment: string
	notes: string
}

const fallbackRows: AnalyticsRow[] = [
	{ metric: 'metric_1', value: 3, segment: 'segment_1', notes: 'Verbose fallback analytics row 1 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_2', value: 6, segment: 'segment_2', notes: 'Verbose fallback analytics row 2 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_3', value: 9, segment: 'segment_3', notes: 'Verbose fallback analytics row 3 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_4', value: 12, segment: 'segment_4', notes: 'Verbose fallback analytics row 4 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_5', value: 15, segment: 'segment_5', notes: 'Verbose fallback analytics row 5 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_6', value: 18, segment: 'segment_6', notes: 'Verbose fallback analytics row 6 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_7', value: 21, segment: 'segment_0', notes: 'Verbose fallback analytics row 7 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_8', value: 24, segment: 'segment_1', notes: 'Verbose fallback analytics row 8 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_9', value: 27, segment: 'segment_2', notes: 'Verbose fallback analytics row 9 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_10', value: 30, segment: 'segment_3', notes: 'Verbose fallback analytics row 10 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_11', value: 33, segment: 'segment_4', notes: 'Verbose fallback analytics row 11 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_12', value: 36, segment: 'segment_5', notes: 'Verbose fallback analytics row 12 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_13', value: 39, segment: 'segment_6', notes: 'Verbose fallback analytics row 13 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_14', value: 42, segment: 'segment_0', notes: 'Verbose fallback analytics row 14 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_15', value: 45, segment: 'segment_1', notes: 'Verbose fallback analytics row 15 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_16', value: 48, segment: 'segment_2', notes: 'Verbose fallback analytics row 16 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_17', value: 51, segment: 'segment_3', notes: 'Verbose fallback analytics row 17 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_18', value: 54, segment: 'segment_4', notes: 'Verbose fallback analytics row 18 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_19', value: 57, segment: 'segment_5', notes: 'Verbose fallback analytics row 19 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_20', value: 60, segment: 'segment_6', notes: 'Verbose fallback analytics row 20 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_21', value: 63, segment: 'segment_0', notes: 'Verbose fallback analytics row 21 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_22', value: 66, segment: 'segment_1', notes: 'Verbose fallback analytics row 22 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_23', value: 69, segment: 'segment_2', notes: 'Verbose fallback analytics row 23 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_24', value: 72, segment: 'segment_3', notes: 'Verbose fallback analytics row 24 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_25', value: 75, segment: 'segment_4', notes: 'Verbose fallback analytics row 25 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_26', value: 78, segment: 'segment_5', notes: 'Verbose fallback analytics row 26 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_27', value: 81, segment: 'segment_6', notes: 'Verbose fallback analytics row 27 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_28', value: 84, segment: 'segment_0', notes: 'Verbose fallback analytics row 28 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_29', value: 87, segment: 'segment_1', notes: 'Verbose fallback analytics row 29 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_30', value: 90, segment: 'segment_2', notes: 'Verbose fallback analytics row 30 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_31', value: 93, segment: 'segment_3', notes: 'Verbose fallback analytics row 31 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_32', value: 96, segment: 'segment_4', notes: 'Verbose fallback analytics row 32 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_33', value: 99, segment: 'segment_5', notes: 'Verbose fallback analytics row 33 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_34', value: 102, segment: 'segment_6', notes: 'Verbose fallback analytics row 34 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_35', value: 105, segment: 'segment_0', notes: 'Verbose fallback analytics row 35 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_36', value: 108, segment: 'segment_1', notes: 'Verbose fallback analytics row 36 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_37', value: 111, segment: 'segment_2', notes: 'Verbose fallback analytics row 37 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_38', value: 114, segment: 'segment_3', notes: 'Verbose fallback analytics row 38 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_39', value: 117, segment: 'segment_4', notes: 'Verbose fallback analytics row 39 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_40', value: 120, segment: 'segment_5', notes: 'Verbose fallback analytics row 40 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_41', value: 123, segment: 'segment_6', notes: 'Verbose fallback analytics row 41 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_42', value: 126, segment: 'segment_0', notes: 'Verbose fallback analytics row 42 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_43', value: 129, segment: 'segment_1', notes: 'Verbose fallback analytics row 43 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_44', value: 132, segment: 'segment_2', notes: 'Verbose fallback analytics row 44 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_45', value: 135, segment: 'segment_3', notes: 'Verbose fallback analytics row 45 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_46', value: 138, segment: 'segment_4', notes: 'Verbose fallback analytics row 46 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_47', value: 141, segment: 'segment_5', notes: 'Verbose fallback analytics row 47 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_48', value: 144, segment: 'segment_6', notes: 'Verbose fallback analytics row 48 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_49', value: 147, segment: 'segment_0', notes: 'Verbose fallback analytics row 49 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_50', value: 150, segment: 'segment_1', notes: 'Verbose fallback analytics row 50 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_51', value: 153, segment: 'segment_2', notes: 'Verbose fallback analytics row 51 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_52', value: 156, segment: 'segment_3', notes: 'Verbose fallback analytics row 52 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_53', value: 159, segment: 'segment_4', notes: 'Verbose fallback analytics row 53 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_54', value: 162, segment: 'segment_5', notes: 'Verbose fallback analytics row 54 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_55', value: 165, segment: 'segment_6', notes: 'Verbose fallback analytics row 55 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_56', value: 168, segment: 'segment_0', notes: 'Verbose fallback analytics row 56 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_57', value: 171, segment: 'segment_1', notes: 'Verbose fallback analytics row 57 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_58', value: 174, segment: 'segment_2', notes: 'Verbose fallback analytics row 58 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_59', value: 177, segment: 'segment_3', notes: 'Verbose fallback analytics row 59 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_60', value: 180, segment: 'segment_4', notes: 'Verbose fallback analytics row 60 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_61', value: 183, segment: 'segment_5', notes: 'Verbose fallback analytics row 61 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_62', value: 186, segment: 'segment_6', notes: 'Verbose fallback analytics row 62 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_63', value: 189, segment: 'segment_0', notes: 'Verbose fallback analytics row 63 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_64', value: 192, segment: 'segment_1', notes: 'Verbose fallback analytics row 64 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_65', value: 195, segment: 'segment_2', notes: 'Verbose fallback analytics row 65 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_66', value: 198, segment: 'segment_3', notes: 'Verbose fallback analytics row 66 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_67', value: 201, segment: 'segment_4', notes: 'Verbose fallback analytics row 67 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_68', value: 204, segment: 'segment_5', notes: 'Verbose fallback analytics row 68 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_69', value: 207, segment: 'segment_6', notes: 'Verbose fallback analytics row 69 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_70', value: 210, segment: 'segment_0', notes: 'Verbose fallback analytics row 70 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_71', value: 213, segment: 'segment_1', notes: 'Verbose fallback analytics row 71 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_72', value: 216, segment: 'segment_2', notes: 'Verbose fallback analytics row 72 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_73', value: 219, segment: 'segment_3', notes: 'Verbose fallback analytics row 73 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_74', value: 222, segment: 'segment_4', notes: 'Verbose fallback analytics row 74 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_75', value: 225, segment: 'segment_5', notes: 'Verbose fallback analytics row 75 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_76', value: 228, segment: 'segment_6', notes: 'Verbose fallback analytics row 76 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_77', value: 231, segment: 'segment_0', notes: 'Verbose fallback analytics row 77 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_78', value: 234, segment: 'segment_1', notes: 'Verbose fallback analytics row 78 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_79', value: 237, segment: 'segment_2', notes: 'Verbose fallback analytics row 79 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_80', value: 240, segment: 'segment_3', notes: 'Verbose fallback analytics row 80 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_81', value: 243, segment: 'segment_4', notes: 'Verbose fallback analytics row 81 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_82', value: 246, segment: 'segment_5', notes: 'Verbose fallback analytics row 82 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_83', value: 249, segment: 'segment_6', notes: 'Verbose fallback analytics row 83 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_84', value: 252, segment: 'segment_0', notes: 'Verbose fallback analytics row 84 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_85', value: 255, segment: 'segment_1', notes: 'Verbose fallback analytics row 85 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_86', value: 258, segment: 'segment_2', notes: 'Verbose fallback analytics row 86 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_87', value: 261, segment: 'segment_3', notes: 'Verbose fallback analytics row 87 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_88', value: 264, segment: 'segment_4', notes: 'Verbose fallback analytics row 88 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_89', value: 267, segment: 'segment_5', notes: 'Verbose fallback analytics row 89 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_90', value: 270, segment: 'segment_6', notes: 'Verbose fallback analytics row 90 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_91', value: 273, segment: 'segment_0', notes: 'Verbose fallback analytics row 91 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_92', value: 276, segment: 'segment_1', notes: 'Verbose fallback analytics row 92 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_93', value: 279, segment: 'segment_2', notes: 'Verbose fallback analytics row 93 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_94', value: 282, segment: 'segment_3', notes: 'Verbose fallback analytics row 94 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_95', value: 285, segment: 'segment_4', notes: 'Verbose fallback analytics row 95 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_96', value: 288, segment: 'segment_5', notes: 'Verbose fallback analytics row 96 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_97', value: 291, segment: 'segment_6', notes: 'Verbose fallback analytics row 97 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_98', value: 294, segment: 'segment_0', notes: 'Verbose fallback analytics row 98 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_99', value: 297, segment: 'segment_1', notes: 'Verbose fallback analytics row 99 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_100', value: 300, segment: 'segment_2', notes: 'Verbose fallback analytics row 100 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_101', value: 303, segment: 'segment_3', notes: 'Verbose fallback analytics row 101 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_102', value: 306, segment: 'segment_4', notes: 'Verbose fallback analytics row 102 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_103', value: 309, segment: 'segment_5', notes: 'Verbose fallback analytics row 103 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_104', value: 312, segment: 'segment_6', notes: 'Verbose fallback analytics row 104 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_105', value: 315, segment: 'segment_0', notes: 'Verbose fallback analytics row 105 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_106', value: 318, segment: 'segment_1', notes: 'Verbose fallback analytics row 106 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_107', value: 321, segment: 'segment_2', notes: 'Verbose fallback analytics row 107 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_108', value: 324, segment: 'segment_3', notes: 'Verbose fallback analytics row 108 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_109', value: 327, segment: 'segment_4', notes: 'Verbose fallback analytics row 109 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_110', value: 330, segment: 'segment_5', notes: 'Verbose fallback analytics row 110 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_111', value: 333, segment: 'segment_6', notes: 'Verbose fallback analytics row 111 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_112', value: 336, segment: 'segment_0', notes: 'Verbose fallback analytics row 112 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_113', value: 339, segment: 'segment_1', notes: 'Verbose fallback analytics row 113 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_114', value: 342, segment: 'segment_2', notes: 'Verbose fallback analytics row 114 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_115', value: 345, segment: 'segment_3', notes: 'Verbose fallback analytics row 115 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_116', value: 348, segment: 'segment_4', notes: 'Verbose fallback analytics row 116 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_117', value: 351, segment: 'segment_5', notes: 'Verbose fallback analytics row 117 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_118', value: 354, segment: 'segment_6', notes: 'Verbose fallback analytics row 118 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_119', value: 357, segment: 'segment_0', notes: 'Verbose fallback analytics row 119 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_120', value: 360, segment: 'segment_1', notes: 'Verbose fallback analytics row 120 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_121', value: 363, segment: 'segment_2', notes: 'Verbose fallback analytics row 121 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_122', value: 366, segment: 'segment_3', notes: 'Verbose fallback analytics row 122 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_123', value: 369, segment: 'segment_4', notes: 'Verbose fallback analytics row 123 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_124', value: 372, segment: 'segment_5', notes: 'Verbose fallback analytics row 124 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_125', value: 375, segment: 'segment_6', notes: 'Verbose fallback analytics row 125 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_126', value: 378, segment: 'segment_0', notes: 'Verbose fallback analytics row 126 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_127', value: 381, segment: 'segment_1', notes: 'Verbose fallback analytics row 127 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_128', value: 384, segment: 'segment_2', notes: 'Verbose fallback analytics row 128 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_129', value: 387, segment: 'segment_3', notes: 'Verbose fallback analytics row 129 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_130', value: 390, segment: 'segment_4', notes: 'Verbose fallback analytics row 130 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_131', value: 393, segment: 'segment_5', notes: 'Verbose fallback analytics row 131 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_132', value: 396, segment: 'segment_6', notes: 'Verbose fallback analytics row 132 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_133', value: 399, segment: 'segment_0', notes: 'Verbose fallback analytics row 133 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_134', value: 402, segment: 'segment_1', notes: 'Verbose fallback analytics row 134 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_135', value: 405, segment: 'segment_2', notes: 'Verbose fallback analytics row 135 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_136', value: 408, segment: 'segment_3', notes: 'Verbose fallback analytics row 136 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_137', value: 411, segment: 'segment_4', notes: 'Verbose fallback analytics row 137 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_138', value: 414, segment: 'segment_5', notes: 'Verbose fallback analytics row 138 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_139', value: 417, segment: 'segment_6', notes: 'Verbose fallback analytics row 139 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_140', value: 420, segment: 'segment_0', notes: 'Verbose fallback analytics row 140 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_141', value: 423, segment: 'segment_1', notes: 'Verbose fallback analytics row 141 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_142', value: 426, segment: 'segment_2', notes: 'Verbose fallback analytics row 142 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_143', value: 429, segment: 'segment_3', notes: 'Verbose fallback analytics row 143 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_144', value: 432, segment: 'segment_4', notes: 'Verbose fallback analytics row 144 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_145', value: 435, segment: 'segment_5', notes: 'Verbose fallback analytics row 145 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_146', value: 438, segment: 'segment_6', notes: 'Verbose fallback analytics row 146 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_147', value: 441, segment: 'segment_0', notes: 'Verbose fallback analytics row 147 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_148', value: 444, segment: 'segment_1', notes: 'Verbose fallback analytics row 148 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_149', value: 447, segment: 'segment_2', notes: 'Verbose fallback analytics row 149 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_150', value: 450, segment: 'segment_3', notes: 'Verbose fallback analytics row 150 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_151', value: 453, segment: 'segment_4', notes: 'Verbose fallback analytics row 151 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_152', value: 456, segment: 'segment_5', notes: 'Verbose fallback analytics row 152 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_153', value: 459, segment: 'segment_6', notes: 'Verbose fallback analytics row 153 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_154', value: 462, segment: 'segment_0', notes: 'Verbose fallback analytics row 154 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_155', value: 465, segment: 'segment_1', notes: 'Verbose fallback analytics row 155 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_156', value: 468, segment: 'segment_2', notes: 'Verbose fallback analytics row 156 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_157', value: 471, segment: 'segment_3', notes: 'Verbose fallback analytics row 157 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_158', value: 474, segment: 'segment_4', notes: 'Verbose fallback analytics row 158 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_159', value: 477, segment: 'segment_5', notes: 'Verbose fallback analytics row 159 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_160', value: 480, segment: 'segment_6', notes: 'Verbose fallback analytics row 160 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_161', value: 483, segment: 'segment_0', notes: 'Verbose fallback analytics row 161 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_162', value: 486, segment: 'segment_1', notes: 'Verbose fallback analytics row 162 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_163', value: 489, segment: 'segment_2', notes: 'Verbose fallback analytics row 163 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_164', value: 492, segment: 'segment_3', notes: 'Verbose fallback analytics row 164 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_165', value: 495, segment: 'segment_4', notes: 'Verbose fallback analytics row 165 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_166', value: 498, segment: 'segment_5', notes: 'Verbose fallback analytics row 166 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_167', value: 501, segment: 'segment_6', notes: 'Verbose fallback analytics row 167 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_168', value: 504, segment: 'segment_0', notes: 'Verbose fallback analytics row 168 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_169', value: 507, segment: 'segment_1', notes: 'Verbose fallback analytics row 169 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_170', value: 510, segment: 'segment_2', notes: 'Verbose fallback analytics row 170 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_171', value: 513, segment: 'segment_3', notes: 'Verbose fallback analytics row 171 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_172', value: 516, segment: 'segment_4', notes: 'Verbose fallback analytics row 172 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_173', value: 519, segment: 'segment_5', notes: 'Verbose fallback analytics row 173 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_174', value: 522, segment: 'segment_6', notes: 'Verbose fallback analytics row 174 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_175', value: 525, segment: 'segment_0', notes: 'Verbose fallback analytics row 175 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_176', value: 528, segment: 'segment_1', notes: 'Verbose fallback analytics row 176 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_177', value: 531, segment: 'segment_2', notes: 'Verbose fallback analytics row 177 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_178', value: 534, segment: 'segment_3', notes: 'Verbose fallback analytics row 178 with context about historical cohorts and operating constraints.' },
	{ metric: 'metric_179', value: 537, segment: 'segment_4', notes: 'Verbose fallback analytics row 179 with context about historical cohorts and operating constraints.' },
]

export async function main(range: string = '30d') {
	const sql = wmill.datatable()
	let rows: AnalyticsRow[] = []
	try {
		rows = await sql`SELECT metric, value, segment, notes FROM analytics_rollups WHERE range = ${range} LIMIT 50`.fetch()
	} catch {
		rows = []
	}
	const sourceRows = Array.isArray(rows) && rows.length > 0 ? rows : fallbackRows
	const total = sourceRows.reduce((acc, row) => acc + Number(row.value ?? 0), 0)
	return {
		range,
		summary: `Loaded ${sourceRows.length} analytics rows with total ${total}`,
		rows: sourceRows.slice(0, 10)
	}
}
