@devrev/meerkat-node 0.0.112 → 0.0.116

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,397 @@
1
+ export declare const WITH_DOT_ALIAS_TEST_DATA: ({
2
+ testName: string;
3
+ expectedSQL: string;
4
+ cubeInput: {
5
+ measures: string[];
6
+ filters: never[];
7
+ dimensions: string[];
8
+ limit: number;
9
+ };
10
+ expectedOutput: {
11
+ 'orders.order_month': string;
12
+ 'orders.total_order_amount': number;
13
+ }[];
14
+ }[] | {
15
+ testName: string;
16
+ expectedSQL: string;
17
+ cubeInput: {
18
+ measures: string[];
19
+ filters: never[];
20
+ dimensions: string[];
21
+ order: {
22
+ 'orders.total_order_amount': string;
23
+ 'orders.customer_id': string;
24
+ };
25
+ };
26
+ expectedOutput: ({
27
+ 'orders.customer_id': string;
28
+ 'orders.total_order_amount': number;
29
+ } | {
30
+ 'orders.customer_id': null;
31
+ 'orders.total_order_amount': number;
32
+ })[];
33
+ }[] | {
34
+ testName: string;
35
+ expectedSQL: string;
36
+ cubeInput: {
37
+ measures: string[];
38
+ filters: {
39
+ member: string;
40
+ operator: string;
41
+ values: string[];
42
+ }[];
43
+ dimensions: never[];
44
+ };
45
+ expectedOutput: ({
46
+ order_id: number;
47
+ customer_id: string;
48
+ 'orders.customer_id': string;
49
+ product_id: string;
50
+ order_date: string;
51
+ order_amount: number;
52
+ vendors: string[];
53
+ } | {
54
+ order_id: number;
55
+ customer_id: string;
56
+ 'orders.customer_id': string;
57
+ product_id: string;
58
+ order_date: string;
59
+ order_amount: number;
60
+ vendors: null;
61
+ })[];
62
+ }[] | {
63
+ testName: string;
64
+ expectedSQL: string;
65
+ cubeInput: {
66
+ measures: string[];
67
+ filters: {
68
+ and: {
69
+ member: string;
70
+ operator: string;
71
+ values: string[];
72
+ }[];
73
+ }[];
74
+ dimensions: never[];
75
+ };
76
+ expectedOutput: ({
77
+ order_id: number;
78
+ customer_id: string;
79
+ 'orders.customer_id': string;
80
+ product_id: string;
81
+ order_date: string;
82
+ order_amount: number;
83
+ vendors: string[];
84
+ 'orders.order_date'?: undefined;
85
+ } | {
86
+ customer_id: string;
87
+ order_amount: number;
88
+ order_date: string;
89
+ order_id: number;
90
+ 'orders.customer_id': string;
91
+ 'orders.order_date': undefined;
92
+ product_id: string;
93
+ vendors: string[];
94
+ } | {
95
+ customer_id: string;
96
+ order_amount: number;
97
+ order_date: string;
98
+ order_id: number;
99
+ 'orders.customer_id': string;
100
+ 'orders.order_date': undefined;
101
+ product_id: string;
102
+ vendors: null;
103
+ })[];
104
+ }[] | {
105
+ testName: string;
106
+ expectedSQL: string;
107
+ cubeInput: {
108
+ measures: string[];
109
+ filters: {
110
+ member: string;
111
+ operator: string;
112
+ values: string[];
113
+ }[];
114
+ dimensions: never[];
115
+ };
116
+ expectedOutput: ({
117
+ order_id: number;
118
+ customer_id: string;
119
+ product_id: string;
120
+ order_date: string;
121
+ order_amount: number;
122
+ 'orders.order_amount': number;
123
+ vendors: string[];
124
+ 'orders.order_date'?: undefined;
125
+ } | {
126
+ customer_id: null;
127
+ order_amount: number;
128
+ order_date: string;
129
+ order_id: number;
130
+ 'orders.order_amount': number;
131
+ 'orders.order_date': undefined;
132
+ product_id: string;
133
+ vendors: string[];
134
+ } | {
135
+ customer_id: string;
136
+ order_amount: number;
137
+ order_date: string;
138
+ order_id: number;
139
+ 'orders.order_amount': number;
140
+ 'orders.order_date': undefined;
141
+ product_id: string;
142
+ vendors: string[];
143
+ })[];
144
+ }[] | {
145
+ testName: string;
146
+ expectedSQL: string;
147
+ cubeInput: {
148
+ measures: string[];
149
+ filters: {
150
+ member: string;
151
+ operator: string;
152
+ values: string[];
153
+ }[];
154
+ dimensions: never[];
155
+ };
156
+ expectedOutput: ({
157
+ order_id: number;
158
+ customer_id: string;
159
+ product_id: string;
160
+ order_date: string;
161
+ order_amount: number;
162
+ 'orders.order_date': string;
163
+ vendors: string[];
164
+ } | {
165
+ customer_id: null;
166
+ order_amount: number;
167
+ order_date: string;
168
+ order_id: number;
169
+ 'orders.order_date': string;
170
+ product_id: string;
171
+ vendors: string[];
172
+ } | {
173
+ customer_id: string;
174
+ order_amount: number;
175
+ order_date: string;
176
+ order_id: number;
177
+ 'orders.order_date': string;
178
+ product_id: string;
179
+ vendors: null;
180
+ })[];
181
+ }[] | {
182
+ testName: string;
183
+ expectedSQL: string;
184
+ cubeInput: {
185
+ measures: string[];
186
+ filters: {
187
+ and: {
188
+ member: string;
189
+ operator: string;
190
+ values: string[];
191
+ }[];
192
+ }[];
193
+ dimensions: never[];
194
+ };
195
+ expectedOutput: {
196
+ order_id: number;
197
+ customer_id: string;
198
+ product_id: string;
199
+ order_date: string;
200
+ order_amount: number;
201
+ 'orders.order_amount': number;
202
+ 'orders.order_date': string;
203
+ vendors: string[];
204
+ }[];
205
+ }[] | {
206
+ testName: string;
207
+ expectedSQL: string;
208
+ cubeInput: {
209
+ measures: string[];
210
+ filters: {
211
+ and: ({
212
+ member: string;
213
+ operator: string;
214
+ values?: undefined;
215
+ } | {
216
+ member: string;
217
+ operator: string;
218
+ values: string[];
219
+ })[];
220
+ }[];
221
+ dimensions: never[];
222
+ };
223
+ expectedOutput: ({
224
+ customer_id: string;
225
+ order_amount: number;
226
+ order_date: string;
227
+ order_id: number;
228
+ 'orders.order_amount': number;
229
+ 'orders.order_date': undefined;
230
+ 'orders.product_id': string;
231
+ product_id: string;
232
+ vendors: string[];
233
+ } | {
234
+ customer_id: null;
235
+ order_amount: number;
236
+ order_date: string;
237
+ order_id: number;
238
+ 'orders.order_amount': number;
239
+ 'orders.order_date': undefined;
240
+ 'orders.product_id': string;
241
+ product_id: string;
242
+ vendors: string[];
243
+ })[];
244
+ }[] | {
245
+ testName: string;
246
+ expectedSQL: string;
247
+ cubeInput: {
248
+ measures: string[];
249
+ filters: {
250
+ and: ({
251
+ member: string;
252
+ operator: string;
253
+ values?: undefined;
254
+ } | {
255
+ member: string;
256
+ operator: string;
257
+ values: string[];
258
+ })[];
259
+ }[];
260
+ dimensions: never[];
261
+ };
262
+ expectedOutput: {
263
+ 'orders.customer_id': null;
264
+ customer_id: null;
265
+ order_amount: number;
266
+ order_date: string;
267
+ order_id: number;
268
+ 'orders.order_date': undefined;
269
+ 'orders.product_id': string;
270
+ product_id: string;
271
+ vendors: string[];
272
+ }[];
273
+ }[] | ({
274
+ testName: string;
275
+ expectedSQL: string;
276
+ cubeInput: {
277
+ measures: string[];
278
+ filters: {
279
+ and: {
280
+ member: string;
281
+ operator: string;
282
+ values: string[];
283
+ }[];
284
+ }[];
285
+ dimensions: never[];
286
+ };
287
+ expectedOutput: {
288
+ customer_id: string;
289
+ order_amount: number;
290
+ order_date: string;
291
+ order_id: number;
292
+ 'orders.customer_id': string;
293
+ 'orders.order_date': undefined;
294
+ 'orders.vendors': string[];
295
+ product_id: string;
296
+ vendors: string[];
297
+ }[];
298
+ } | {
299
+ testName: string;
300
+ expectedSQL: string;
301
+ cubeInput: {
302
+ measures: string[];
303
+ filters: {
304
+ and: {
305
+ member: string;
306
+ operator: string;
307
+ values: string[];
308
+ }[];
309
+ }[];
310
+ dimensions: never[];
311
+ };
312
+ expectedOutput: {
313
+ customer_id: string;
314
+ order_amount: number;
315
+ order_date: string;
316
+ order_id: number;
317
+ 'orders.order_date': undefined;
318
+ 'orders.vendors': string[];
319
+ product_id: string;
320
+ vendors: string[];
321
+ }[];
322
+ })[] | ({
323
+ testName: string;
324
+ expectedSQL: string;
325
+ cubeInput: {
326
+ measures: string[];
327
+ filters: {
328
+ and: {
329
+ member: string;
330
+ operator: string;
331
+ values: string[];
332
+ }[];
333
+ }[];
334
+ dimensions: never[];
335
+ };
336
+ expectedOutput: ({
337
+ customer_id: string;
338
+ order_amount: number;
339
+ order_date: string;
340
+ order_id: number;
341
+ 'orders.customer_id': string;
342
+ 'orders.order_date': undefined;
343
+ 'orders.product_id': string;
344
+ product_id: string;
345
+ vendors: string[];
346
+ } | {
347
+ customer_id: null;
348
+ order_amount: number;
349
+ order_date: string;
350
+ order_id: number;
351
+ 'orders.customer_id': null;
352
+ 'orders.order_date': undefined;
353
+ 'orders.product_id': string;
354
+ product_id: string;
355
+ vendors: string[];
356
+ })[];
357
+ } | {
358
+ testName: string;
359
+ expectedSQL: string;
360
+ cubeInput: {
361
+ measures: string[];
362
+ filters: {
363
+ member: string;
364
+ operator: string;
365
+ values: string[];
366
+ }[];
367
+ dimensions: never[];
368
+ };
369
+ expectedOutput: ({
370
+ customer_id: string;
371
+ order_amount: number;
372
+ order_date: string;
373
+ order_id: number;
374
+ 'orders.order_date': undefined;
375
+ 'orders.vendors': string[];
376
+ product_id: string;
377
+ vendors: string[];
378
+ } | {
379
+ customer_id: null;
380
+ order_amount: number;
381
+ order_date: string;
382
+ order_id: number;
383
+ 'orders.order_date': undefined;
384
+ 'orders.vendors': string[];
385
+ product_id: string;
386
+ vendors: string[];
387
+ } | {
388
+ customer_id: string;
389
+ order_amount: number;
390
+ order_date: string;
391
+ order_id: number;
392
+ 'orders.order_date': undefined;
393
+ 'orders.vendors': null;
394
+ product_id: string;
395
+ vendors: null;
396
+ })[];
397
+ })[])[];
@@ -1,7 +1,13 @@
1
- import { ContextParams, Query, TableSchema } from '@devrev/meerkat-core';
1
+ import { ContextParams, Query, QueryOptions, TableSchema } from '@devrev/meerkat-core';
2
2
  export interface CubeQueryToSQLParams {
3
3
  query: Query;
4
4
  tableSchemas: TableSchema[];
5
5
  contextParams?: ContextParams;
6
+ /**
7
+ * Options for controlling output format.
8
+ * When useDotNotation is true, aliases use dot notation (e.g., "orders.customer_id")
9
+ * When useDotNotation is false, aliases use underscore notation (e.g., orders__customer_id)
10
+ */
11
+ options: QueryOptions;
6
12
  }
7
- export declare const cubeQueryToSQL: ({ query, tableSchemas, contextParams, }: CubeQueryToSQLParams) => Promise<string>;
13
+ export declare const cubeQueryToSQL: ({ query, tableSchemas, contextParams, options, }: CubeQueryToSQLParams) => Promise<string>;
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../meerkat-node/src/__tests__/test-data.ts"],"sourcesContent":["export const CREATE_TEST_TABLE = `\nCREATE TABLE orders (\n order_id INTEGER,\n customer_id VARCHAR,\n product_id VARCHAR,\n order_date DATE,\n order_amount FLOAT,\n vendors VARCHAR[]\n);\n`;\n\nexport const INPUT_DATA_QUERY = `\nINSERT INTO orders VALUES\n(1, '1', '1', '2022-01-01', 50, ['myntra', 'amazon', 'flipkart']),\n(2, '1', '2', '2022-01-02', 80, ['myntra']),\n(3, '2', '3', '2022-02-01', 25, []),\n(4, '2', '1', '2022-03-01', 75, ['flipkart']),\n(5, '3', '1', '2022-03-02', 100, ['myntra', 'amazon', 'flipkart']),\n(6, '4', '2', '2022-04-01', 45, []),\n(7, '4', '3', '2022-05-01', 90, ['myntra', 'flipkart']),\n(8, '5', '1', '2022-05-02', 65, ['amazon', 'flipkart']),\n(9, '5', '2', '2022-05-05', 85, []),\n(10, '6', '3', '2022-06-01', 120, ['myntra', 'amazon']),\n(11, '6aa6', '3', '2024-06-01', 0, ['amazon']),\n(12, NULL, '3', '2024-07-01', 100, ['flipkart']),\n(13, '7', '6', '2024-08-01', 100, ['swiggy''s']);\n`;\n\nexport const TABLE_SCHEMA = {\n name: 'orders',\n sql: 'select * from orders',\n measures: [\n {\n name: 'order_amount',\n sql: 'order_amount',\n type: 'number',\n },\n {\n name: 'total_order_amount',\n sql: 'SUM(order_amount)',\n type: 'number',\n },\n ],\n dimensions: [\n {\n name: 'order_date',\n sql: 'order_date',\n type: 'time',\n },\n {\n name: 'order_id',\n sql: 'order_id',\n type: 'number',\n },\n {\n name: 'customer_id',\n sql: 'customer_id',\n type: 'string',\n },\n {\n name: 'product_id',\n sql: 'product_id',\n type: 'string',\n },\n {\n name: 'order_month',\n sql: `DATE_TRUNC('month', order_date)`,\n type: 'string',\n },\n {\n name: 'vendors',\n sql: 'vendors',\n type: 'string_array',\n },\n ],\n};\n\nexport const TEST_DATA = [\n [\n {\n testName: 'GroupBySQLInnerQuery',\n expectedSQL: `SELECT SUM(order_amount) AS orders__total_order_amount , orders__order_month FROM (SELECT DATE_TRUNC('month', order_date) AS orders__order_month, * FROM (select * from orders) AS orders) AS orders GROUP BY orders__order_month LIMIT 1`,\n cubeInput: {\n measures: ['orders.total_order_amount'],\n filters: [],\n dimensions: ['orders.order_month'],\n limit: 1,\n },\n expectedOutput: [\n {\n orders__order_month: '2022-01-01T00:00:00.000Z',\n orders__total_order_amount: 130,\n },\n ],\n },\n ],\n [\n {\n testName: 'GroupBy',\n expectedSQL: `SELECT SUM(order_amount) AS orders__total_order_amount , orders__customer_id FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders GROUP BY orders__customer_id ORDER BY orders__total_order_amount ASC, orders__customer_id ASC`,\n cubeInput: {\n measures: ['orders.total_order_amount'],\n filters: [],\n dimensions: ['orders.customer_id'],\n order: {\n 'orders.total_order_amount': 'asc',\n 'orders.customer_id': 'asc',\n },\n },\n expectedOutput: [\n {\n orders__customer_id: '6aa6',\n orders__total_order_amount: 0,\n },\n {\n orders__customer_id: '2',\n orders__total_order_amount: 100,\n },\n {\n orders__customer_id: '3',\n orders__total_order_amount: 100,\n },\n {\n orders__customer_id: '7',\n orders__total_order_amount: 100,\n },\n {\n orders__customer_id: null,\n orders__total_order_amount: 100,\n },\n {\n orders__customer_id: '6',\n orders__total_order_amount: 120,\n },\n {\n orders__customer_id: '1',\n orders__total_order_amount: 130,\n },\n {\n orders__customer_id: '4',\n orders__total_order_amount: 135,\n },\n {\n orders__customer_id: '5',\n orders__total_order_amount: 150,\n },\n ],\n },\n ],\n [\n {\n testName: 'Equals',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE (orders__customer_id = '1')`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.customer_id',\n operator: 'equals',\n values: ['1'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 1,\n customer_id: '1',\n orders__customer_id: '1',\n product_id: '1',\n order_date: '2022-01-01',\n order_amount: 50.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 2,\n customer_id: '1',\n orders__customer_id: '1',\n product_id: '2',\n order_date: '2022-01-02',\n order_amount: 80.0,\n vendors: ['myntra'],\n },\n ],\n },\n {\n testName: 'Equals for multiple values',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id = '1') AND (orders__customer_id = '2'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.customer_id',\n operator: 'equals',\n values: ['1', '2'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [],\n },\n ],\n [\n {\n testName: 'NotEquals',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE (orders__customer_id != '1')`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.customer_id',\n operator: 'notEquals',\n values: ['1'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 3,\n customer_id: '2',\n orders__customer_id: '2',\n product_id: '3',\n order_date: '2022-02-01',\n order_amount: 25.0,\n vendors: [],\n },\n {\n order_id: 4,\n customer_id: '2',\n orders__customer_id: '2',\n product_id: '1',\n order_date: '2022-03-01',\n order_amount: 75.0,\n vendors: ['flipkart'],\n },\n {\n order_id: 5,\n customer_id: '3',\n orders__customer_id: '3',\n product_id: '1',\n order_date: '2022-03-02',\n order_amount: 100.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 6,\n customer_id: '4',\n orders__customer_id: '4',\n product_id: '2',\n order_date: '2022-04-01',\n order_amount: 45.0,\n vendors: [],\n },\n {\n order_id: 7,\n customer_id: '4',\n orders__customer_id: '4',\n product_id: '3',\n order_date: '2022-05-01',\n order_amount: 90.0,\n vendors: ['myntra', 'flipkart'],\n },\n {\n order_id: 8,\n customer_id: '5',\n orders__customer_id: '5',\n product_id: '1',\n order_date: '2022-05-02',\n order_amount: 65.0,\n vendors: ['amazon', 'flipkart'],\n },\n {\n order_id: 9,\n customer_id: '5',\n orders__customer_id: '5',\n product_id: '2',\n order_date: '2022-05-05',\n order_amount: 85.0,\n vendors: [],\n },\n {\n order_id: 10,\n customer_id: '6',\n orders__customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n order_amount: 120.0,\n vendors: ['myntra', 'amazon'],\n },\n {\n order_id: 11,\n customer_id: '6aa6',\n orders__customer_id: '6aa6',\n product_id: '3',\n order_date: '2024-06-01',\n order_amount: 0.0,\n vendors: ['amazon'],\n },\n {\n order_id: 13,\n customer_id: '7',\n orders__customer_id: '7',\n product_id: '6',\n order_date: '2024-08-01',\n order_amount: 100.0,\n vendors: [\"swiggy's\"],\n },\n ],\n },\n ],\n [\n {\n testName: 'Contains',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE (orders__customer_id ~~* '%aa%')`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.customer_id',\n operator: 'contains',\n values: ['aa'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 11,\n customer_id: '6aa6',\n orders__customer_id: '6aa6',\n product_id: '3',\n order_date: '2024-06-01',\n order_amount: 0.0,\n vendors: ['amazon'],\n },\n ],\n },\n ],\n [\n {\n testName: 'NotContains',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id !~~ '%1%') AND (orders__customer_id !~~ '%2%') AND (orders__customer_id !~~ '%3%') AND (orders__customer_id !~~ '%4%') AND (orders__customer_id !~~ '%5%') AND (orders__customer_id !~~ '%aa%'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['1'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['2'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['3'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['4'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['5'],\n },\n {\n member: 'orders.customer_id',\n operator: 'notContains',\n values: ['aa'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 10,\n customer_id: '6',\n orders__customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n order_amount: 120,\n vendors: ['myntra', 'amazon'],\n },\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__customer_id: '7',\n orders__order_date: undefined,\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n ],\n },\n ],\n [\n {\n testName: 'GreaterThan',\n expectedSQL: `SELECT orders.* FROM (SELECT orders.order_amount AS orders__order_amount, * FROM (select * from orders) AS orders) AS orders WHERE (orders__order_amount > 50)`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.order_amount',\n operator: 'gt',\n values: ['50'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 2,\n customer_id: '1',\n product_id: '2',\n order_date: '2022-01-02',\n order_amount: 80.0,\n orders__order_amount: 80.0,\n vendors: ['myntra'],\n },\n {\n order_id: 4,\n customer_id: '2',\n product_id: '1',\n order_date: '2022-03-01',\n order_amount: 75.0,\n orders__order_amount: 75.0,\n vendors: ['flipkart'],\n },\n {\n order_id: 5,\n customer_id: '3',\n product_id: '1',\n order_date: '2022-03-02',\n order_amount: 100.0,\n orders__order_amount: 100.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 7,\n customer_id: '4',\n product_id: '3',\n order_date: '2022-05-01',\n order_amount: 90.0,\n orders__order_amount: 90.0,\n vendors: ['myntra', 'flipkart'],\n },\n {\n order_id: 8,\n customer_id: '5',\n product_id: '1',\n order_date: '2022-05-02',\n order_amount: 65.0,\n orders__order_amount: 65.0,\n vendors: ['amazon', 'flipkart'],\n },\n {\n order_id: 9,\n customer_id: '5',\n product_id: '2',\n order_date: '2022-05-05',\n order_amount: 85.0,\n orders__order_amount: 85.0,\n vendors: [],\n },\n {\n order_id: 10,\n customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n order_amount: 120.0,\n orders__order_amount: 120.0,\n vendors: ['myntra', 'amazon'],\n },\n {\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__order_amount: 100,\n orders__order_date: undefined,\n product_id: '3',\n vendors: ['flipkart'],\n },\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__order_amount: 100,\n orders__order_date: undefined,\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n ],\n },\n ],\n [\n {\n testName: 'LessThan',\n expectedSQL: `SELECT orders.* FROM (SELECT orders.order_amount AS orders__order_amount, * FROM (select * from orders) AS orders) AS orders WHERE (orders__order_amount < 50)`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.order_amount',\n operator: 'lt',\n values: ['50'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 3,\n customer_id: '2',\n product_id: '3',\n order_date: '2022-02-01',\n order_amount: 25.0,\n orders__order_amount: 25.0,\n vendors: [],\n },\n {\n order_id: 6,\n customer_id: '4',\n product_id: '2',\n order_date: '2022-04-01',\n order_amount: 45.0,\n orders__order_amount: 45.0,\n vendors: [],\n },\n {\n order_id: 11,\n customer_id: '6aa6',\n product_id: '3',\n order_date: '2024-06-01',\n order_amount: 0.0,\n orders__order_amount: 0.0,\n vendors: ['amazon'],\n },\n ],\n },\n ],\n [\n {\n testName: 'InDateRange',\n expectedSQL: `SELECT orders.* FROM (SELECT order_date AS orders__order_date, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__order_date >= '2022-02-01') AND (orders__order_date <= '2022-03-31'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.order_date',\n operator: 'inDateRange',\n values: ['2022-02-01', '2022-03-31'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 3,\n customer_id: '2',\n product_id: '3',\n order_date: '2022-02-01',\n orders__order_date: '2022-02-01',\n order_amount: 25.0,\n vendors: [],\n },\n {\n order_id: 4,\n customer_id: '2',\n product_id: '1',\n order_date: '2022-03-01',\n orders__order_date: '2022-03-01',\n order_amount: 75.0,\n vendors: ['flipkart'],\n },\n {\n order_id: 5,\n customer_id: '3',\n product_id: '1',\n order_date: '2022-03-02',\n orders__order_date: '2022-03-02',\n order_amount: 100.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n ],\n },\n ],\n [\n {\n testName: 'NotInDateRange',\n expectedSQL: `SELECT orders.* FROM (SELECT order_date AS orders__order_date, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__order_date < '2022-02-01') OR (orders__order_date > '2022-03-31'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n member: 'orders.order_date',\n operator: 'notInDateRange',\n values: ['2022-02-01', '2022-03-31'],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 1,\n customer_id: '1',\n product_id: '1',\n order_date: '2022-01-01',\n order_amount: 50.0,\n orders__order_date: '2022-01-01',\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 2,\n customer_id: '1',\n product_id: '2',\n order_date: '2022-01-02',\n order_amount: 80.0,\n orders__order_date: '2022-01-02',\n vendors: ['myntra'],\n },\n {\n order_id: 6,\n customer_id: '4',\n product_id: '2',\n order_date: '2022-04-01',\n orders__order_date: '2022-04-01',\n order_amount: 45.0,\n vendors: [],\n },\n {\n order_id: 7,\n customer_id: '4',\n product_id: '3',\n order_date: '2022-05-01',\n orders__order_date: '2022-05-01',\n order_amount: 90.0,\n vendors: ['myntra', 'flipkart'],\n },\n {\n order_id: 8,\n customer_id: '5',\n product_id: '1',\n order_date: '2022-05-02',\n orders__order_date: '2022-05-02',\n order_amount: 65.0,\n vendors: ['amazon', 'flipkart'],\n },\n {\n order_id: 9,\n customer_id: '5',\n product_id: '2',\n order_date: '2022-05-05',\n orders__order_date: '2022-05-05',\n order_amount: 85.0,\n vendors: [],\n },\n {\n order_id: 10,\n customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n orders__order_date: '2022-06-01',\n order_amount: 120.0,\n vendors: ['myntra', 'amazon'],\n },\n {\n order_id: 11,\n customer_id: '6aa6',\n product_id: '3',\n order_date: '2024-06-01',\n orders__order_date: '2024-06-01',\n order_amount: 0.0,\n vendors: ['amazon'],\n },\n {\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__order_date: '2024-07-01T00:00:00.000Z',\n product_id: '3',\n vendors: ['flipkart'],\n },\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__order_date: '2024-08-01T00:00:00.000Z',\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n ],\n },\n ],\n // {\n // testName: 'Or',\n // expectedSQL: `SELECT orders.* FROM (select * from orders) AS orders WHERE ((orders.order_amount > 80) OR ((orders.order_date >= '2022-02-01') AND (orders.order_date <= '2022-03-01')))`,\n // cubeInput: {\n // measures: ['*'],\n // filters: [\n // {\n // or: [\n // {\n // member: 'orders.order_amount',\n // operator: 'gt',\n // values: ['80'],\n // },\n // {\n // member: 'orders.order_date',\n // operator: 'inDateRange',\n // values: ['2022-02-01', '2022-03-01'],\n // },\n // ],\n // },\n // ],\n // dimensions: [],\n // },\n // expectedOutput: [\n // {\n // order_id: 3,\n // customer_id: '2',\n // product_id: '3',\n // order_date: '2022-02-01',\n // order_amount: 25.0,\n // },\n // {\n // order_id: 4,\n // customer_id: '2',\n // product_id: '1',\n // order_date: '2022-03-01',\n // order_amount: 75.0,\n // },\n // {\n // order_id: 5,\n // customer_id: '3',\n // product_id: '1',\n // order_date: '2022-03-02',\n // order_amount: 100.0,\n // },\n // {\n // order_id: 7,\n // customer_id: '4',\n // product_id: '3',\n // order_date: '2022-05-01',\n // order_amount: 90.0,\n // },\n // {\n // order_id: 9,\n // customer_id: '5',\n // product_id: '2',\n // order_date: '2022-05-05',\n // order_amount: 85.0,\n // },\n // {\n // order_id: 10,\n // customer_id: '6',\n // product_id: '3',\n // order_date: '2022-06-01',\n // order_amount: 120.0,\n // },\n // ],\n // },\n [\n {\n testName: 'And',\n expectedSQL: `SELECT orders.* FROM (SELECT orders.order_amount AS orders__order_amount, order_date AS orders__order_date, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__order_amount > 50) AND ((orders__order_date >= '2022-02-01') AND (orders__order_date <= '2022-06-01')))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.order_amount',\n operator: 'gt',\n values: ['50'],\n },\n {\n member: 'orders.order_date',\n operator: 'inDateRange',\n values: ['2022-02-01', '2022-06-01'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n order_id: 4,\n customer_id: '2',\n product_id: '1',\n order_date: '2022-03-01',\n order_amount: 75.0,\n orders__order_amount: 75.0,\n orders__order_date: '2022-03-01',\n vendors: ['flipkart'],\n },\n {\n order_id: 5,\n customer_id: '3',\n product_id: '1',\n order_date: '2022-03-02',\n orders__order_date: '2022-03-02',\n order_amount: 100.0,\n orders__order_amount: 100.0,\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n order_id: 7,\n customer_id: '4',\n product_id: '3',\n order_date: '2022-05-01',\n orders__order_date: '2022-05-01',\n order_amount: 90.0,\n orders__order_amount: 90.0,\n vendors: ['myntra', 'flipkart'],\n },\n {\n order_id: 8,\n customer_id: '5',\n product_id: '1',\n order_date: '2022-05-02',\n orders__order_date: '2022-05-02',\n order_amount: 65,\n orders__order_amount: 65,\n vendors: ['amazon', 'flipkart'],\n },\n {\n order_id: 9,\n customer_id: '5',\n product_id: '2',\n order_date: '2022-05-05',\n orders__order_date: '2022-05-05',\n order_amount: 85.0,\n orders__order_amount: 85.0,\n vendors: [],\n },\n {\n order_id: 10,\n customer_id: '6',\n product_id: '3',\n order_date: '2022-06-01',\n orders__order_date: '2022-06-01',\n order_amount: 120.0,\n orders__order_amount: 120.0,\n vendors: ['myntra', 'amazon'],\n },\n ],\n },\n ],\n [\n {\n testName: 'Set',\n expectedSQL: `SELECT orders.* FROM (SELECT orders.order_amount AS orders__order_amount, product_id AS orders__product_id, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__order_amount IS NOT NULL) AND (orders__product_id = '3'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.order_amount',\n operator: 'set',\n },\n {\n member: 'orders.product_id',\n operator: 'equals',\n values: ['3'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '2',\n order_amount: 25,\n order_date: '2022-02-01T00:00:00.000Z',\n order_id: 3,\n orders__order_amount: 25,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: [],\n },\n {\n customer_id: '4',\n order_amount: 90,\n order_date: '2022-05-01T00:00:00.000Z',\n order_id: 7,\n orders__order_amount: 90,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['myntra', 'flipkart'],\n },\n {\n customer_id: '6',\n order_amount: 120,\n order_date: '2022-06-01T00:00:00.000Z',\n order_id: 10,\n orders__order_amount: 120,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['myntra', 'amazon'],\n },\n {\n customer_id: '6aa6',\n order_amount: 0,\n order_date: '2024-06-01T00:00:00.000Z',\n order_id: 11,\n orders__order_amount: 0,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['amazon'],\n },\n {\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__order_amount: 100,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['flipkart'],\n },\n ],\n },\n ],\n [\n {\n testName: 'Not Set',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, product_id AS orders__product_id, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id IS NULL) AND (orders__product_id = '3'))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.customer_id',\n operator: 'notSet',\n },\n {\n member: 'orders.product_id',\n operator: 'equals',\n values: ['3'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n orders__customer_id: null,\n customer_id: null,\n order_amount: 100,\n order_date: '2024-07-01T00:00:00.000Z',\n order_id: 12,\n orders__order_date: undefined,\n orders__product_id: '3',\n product_id: '3',\n vendors: ['flipkart'],\n },\n ],\n },\n ],\n [\n {\n testName: 'In',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, vendors AS orders__vendors, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id IN ('1', '2')) AND (orders__vendors && (ARRAY['myntra', 'amazon'])))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.customer_id',\n operator: 'in',\n values: ['1', '2'],\n },\n {\n member: 'orders.vendors',\n operator: 'in',\n values: ['myntra', 'amazon'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '1',\n order_amount: 50,\n order_date: '2022-01-01T00:00:00.000Z',\n order_id: 1,\n orders__customer_id: '1',\n orders__order_date: undefined,\n orders__vendors: ['myntra', 'amazon', 'flipkart'],\n product_id: '1',\n vendors: ['myntra', 'amazon', 'flipkart'],\n },\n {\n customer_id: '1',\n order_amount: 80,\n order_date: '2022-01-02T00:00:00.000Z',\n order_id: 2,\n orders__customer_id: '1',\n orders__order_date: undefined,\n orders__vendors: ['myntra'],\n product_id: '2',\n vendors: ['myntra'],\n },\n ],\n },\n {\n testName: 'In with single quotes',\n expectedSQL: `SELECT orders.* FROM (SELECT vendors AS orders__vendors, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__vendors && (ARRAY['swiggy''s'])))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.vendors',\n operator: 'in',\n values: [\"swiggy's\"],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__order_date: undefined,\n orders__vendors: [\"swiggy's\"],\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n ],\n },\n ],\n [\n {\n testName: 'Not In',\n expectedSQL: `SELECT orders.* FROM (SELECT customer_id AS orders__customer_id, vendors AS orders__vendors, * FROM (select * from orders) AS orders) AS orders WHERE ((orders__customer_id NOT IN ('1', '2')) AND (NOT (orders__vendors && (ARRAY['myntra', 'flipkart']))))`,\n cubeInput: {\n measures: ['*'],\n filters: [\n {\n and: [\n {\n member: 'orders.customer_id',\n operator: 'notIn',\n values: ['1', '2'],\n },\n {\n member: 'orders.vendors',\n operator: 'notIn',\n values: ['myntra', 'flipkart'],\n },\n ],\n },\n ],\n dimensions: [],\n },\n expectedOutput: [\n {\n customer_id: '4',\n order_amount: 45,\n order_date: '2022-04-01T00:00:00.000Z',\n order_id: 6,\n orders__customer_id: '4',\n orders__order_date: undefined,\n orders__vendors: [],\n product_id: '2',\n vendors: [],\n },\n {\n customer_id: '5',\n order_amount: 85,\n order_date: '2022-05-05T00:00:00.000Z',\n order_id: 9,\n orders__customer_id: '5',\n orders__order_date: undefined,\n orders__vendors: [],\n product_id: '2',\n vendors: [],\n },\n {\n customer_id: '6aa6',\n order_amount: 0,\n order_date: '2024-06-01T00:00:00.000Z',\n order_id: 11,\n orders__customer_id: '6aa6',\n orders__order_date: undefined,\n orders__vendors: ['amazon'],\n product_id: '3',\n vendors: ['amazon'],\n },\n {\n customer_id: '7',\n order_amount: 100,\n order_date: '2024-08-01T00:00:00.000Z',\n order_id: 13,\n orders__customer_id: '7',\n orders__order_date: undefined,\n orders__vendors: [\"swiggy's\"],\n product_id: '6',\n vendors: [\"swiggy's\"],\n },\n ],\n },\n ],\n];\n"],"names":["CREATE_TEST_TABLE","INPUT_DATA_QUERY","TABLE_SCHEMA","TEST_DATA","name","sql","measures","type","dimensions","testName","expectedSQL","cubeInput","filters","limit","expectedOutput","orders__order_month","orders__total_order_amount","order","orders__customer_id","member","operator","values","order_id","customer_id","product_id","order_date","order_amount","vendors","and","orders__order_date","undefined","orders__order_amount","orders__product_id","orders__vendors"],"mappings":";;;;;;;;IAAaA,iBAAiB;eAAjBA;;IAWAC,gBAAgB;eAAhBA;;IAiBAC,YAAY;eAAZA;;IAiDAC,SAAS;eAATA;;;AA7EN,MAAMH,oBAAoB,CAAC;;;;;;;;;AASlC,CAAC;AAEM,MAAMC,mBAAmB,CAAC;;;;;;;;;;;;;;;AAejC,CAAC;AAEM,MAAMC,eAAe;IAC1BE,MAAM;IACNC,KAAK;IACLC,UAAU;QACR;YACEF,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;KACD;IACDC,YAAY;QACV;YACEJ,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK,CAAC,+BAA+B,CAAC;YACtCE,MAAM;QACR;QACA;YACEH,MAAM;YACNC,KAAK;YACLE,MAAM;QACR;KACD;AACH;AAEO,MAAMJ,YAAY;IACvB;QACE;YACEM,UAAU;YACVC,aAAa,CAAC,2OAA2O,CAAC;YAC1PC,WAAW;gBACTL,UAAU;oBAAC;iBAA4B;gBAC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