diff --git a/packages/cubejs-schema-compiler/src/adapter/BaseDimension.ts b/packages/cubejs-schema-compiler/src/adapter/BaseDimension.ts index f994c8cb04ad7..5eac83d7238aa 100644 --- a/packages/cubejs-schema-compiler/src/adapter/BaseDimension.ts +++ b/packages/cubejs-schema-compiler/src/adapter/BaseDimension.ts @@ -64,11 +64,11 @@ export class BaseDimension { return [this]; } - public isPostAggregate() { + public isMultiStage() { if (this.expression) { // TODO return false; } - return this.definition().postAggregate; + return this.definition().multiStage; } public cube() { diff --git a/packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts b/packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts index 347bbf094232d..ea010dc0fd711 100644 --- a/packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts +++ b/packages/cubejs-schema-compiler/src/adapter/BaseMeasure.ts @@ -106,11 +106,11 @@ export class BaseMeasure { return BaseMeasure.isCumulative(this.measureDefinition()); } - public isPostAggregate() { + public isMultiStage() { if (this.expression) { // TODO return false; } - return this.definition().postAggregate; + return this.definition().multiStage; } public isAdditive() { @@ -118,7 +118,7 @@ export class BaseMeasure { return false; } const definition = this.measureDefinition(); - if (definition.postAggregate) { + if (definition.multiStage) { return false; } return definition.type === 'sum' || definition.type === 'count' || definition.type === 'countDistinctApprox' || diff --git a/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js b/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js index ec790486e983c..3deef37f981e2 100644 --- a/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js +++ b/packages/cubejs-schema-compiler/src/adapter/BaseQuery.js @@ -221,20 +221,20 @@ export class BaseQuery { expressionParams: this.options.expressionParams, convertTzForRawTimeDimension: this.options.convertTzForRawTimeDimension, from: this.options.from, - postAggregateQuery: this.options.postAggregateQuery, - postAggregateDimensions: this.options.postAggregateDimensions, - postAggregateTimeDimensions: this.options.postAggregateTimeDimensions, + multiStageQuery: this.options.multiStageQuery, + multiStageDimensions: this.options.multiStageDimensions, + multiStageTimeDimensions: this.options.multiStageTimeDimensions, }); this.from = this.options.from; - this.postAggregateQuery = this.options.postAggregateQuery; + this.multiStageQuery = this.options.multiStageQuery; this.timezone = this.options.timezone; this.rowLimit = this.options.rowLimit; this.offset = this.options.offset; this.preAggregations = this.newPreAggregations(); this.measures = (this.options.measures || []).map(this.newMeasure.bind(this)); this.dimensions = (this.options.dimensions || []).map(this.newDimension.bind(this)); - this.postAggregateDimensions = (this.options.postAggregateDimensions || []).map(this.newDimension.bind(this)); - this.postAggregateTimeDimensions = (this.options.postAggregateTimeDimensions || []).map(this.newTimeDimension.bind(this)); + this.multiStageDimensions = (this.options.multiStageDimensions || []).map(this.newDimension.bind(this)); + this.multiStageTimeDimensions = (this.options.multiStageTimeDimensions || []).map(this.newTimeDimension.bind(this)); this.segments = (this.options.segments || []).map(this.newSegment.bind(this)); const filters = this.extractFiltersAsTree(this.options.filters || []); @@ -498,7 +498,7 @@ export class BaseQuery { regularMeasures, cumulativeMeasures, withQueries, - postAggregateMembers, + multiStageMembers, } = this.fullKeyQueryAggregateMeasures(); if (cumulativeMeasures.length === 0) { @@ -770,7 +770,7 @@ export class BaseQuery { // eslint-disable-next-line prefer-template const inlineWhereConditions = []; const commonQuery = this.rewriteInlineWhere(() => this.commonQuery(), inlineWhereConditions); - if (this.postAggregateQuery) { + if (this.multiStageQuery) { return `${commonQuery} ${this.baseWhere(this.allFilters.concat(inlineWhereConditions))}`; } return `${commonQuery} ${this.baseWhere(this.allFilters.concat(inlineWhereConditions))}` + @@ -793,10 +793,10 @@ export class BaseQuery { regularMeasures, cumulativeMeasures, withQueries, - postAggregateMembers, + multiStageMembers, } = this.fullKeyQueryAggregateMeasures(); - if (!multipliedMeasures.length && !cumulativeMeasures.length && !postAggregateMembers.length) { + if (!multipliedMeasures.length && !cumulativeMeasures.length && !multiStageMembers.length) { return this.simpleQuery(); } @@ -880,7 +880,7 @@ export class BaseQuery { ) )(cumulativeMeasures) // TODO SELECT * - ).concat(postAggregateMembers.map(m => `SELECT * FROM ${m.alias}`)); + ).concat(multiStageMembers.map(m => `SELECT * FROM ${m.alias}`)); } // Move regular measures to multiplied ones if there're same @@ -924,11 +924,11 @@ export class BaseQuery { } } - const postAggregateMeasures = R.flatten(postAggregateMembers.map(m => m.measures)).map(m => this.newMeasure(m)); + const multiStageMeasures = R.flatten(multiStageMembers.map(m => m.measures)).map(m => this.newMeasure(m)); return this.withQueries(this.joinFullKeyQueryAggregate( // TODO separate param? - multipliedMeasures.concat(postAggregateMeasures), + multipliedMeasures.concat(multiStageMeasures), regularMeasures, cumulativeMeasures, toJoin, @@ -1008,20 +1008,20 @@ export class BaseQuery { fullKeyQueryAggregateMeasures(context) { const measureToHierarchy = this.collectRootMeasureToHieararchy(context); const allMemberChildren = this.collectAllMemberChildren(context); - const memberToIsPostAggregate = this.collectAllPostAggregateMembers(allMemberChildren); + const memberToIsMultiStage = this.collectAllMultiStageMembers(allMemberChildren); - const hasPostAggregateMembers = (m) => { - if (memberToIsPostAggregate[m]) { + const hasMultiStageMembers = (m) => { + if (memberToIsMultiStage[m]) { return true; } - return allMemberChildren[m]?.some(c => hasPostAggregateMembers(c)) || false; + return allMemberChildren[m]?.some(c => hasMultiStageMembers(c)) || false; }; const measuresToRender = (multiplied, cumulative) => R.pipe( R.values, R.flatten, R.filter( - m => m.multiplied === multiplied && this.newMeasure(m.measure).isCumulative() === cumulative && !hasPostAggregateMembers(m.measure) + m => m.multiplied === multiplied && this.newMeasure(m.measure).isCumulative() === cumulative && !hasMultiStageMembers(m.measure) ), R.map(m => m.measure), R.uniq, @@ -1036,19 +1036,19 @@ export class BaseQuery { R.unnest )([false, true]); const withQueries = []; - const postAggregateMembers = R.uniq( + const multiStageMembers = R.uniq( this.allMembersConcat(false) // TODO boolean logic filter support - .filter(m => m.expressionPath && hasPostAggregateMembers(m.expressionPath())) + .filter(m => m.expressionPath && hasMultiStageMembers(m.expressionPath())) .map(m => m.expressionPath()) - ).map(m => this.postAggregateWithQueries( + ).map(m => this.multiStageWithQueries( m, { dimensions: this.dimensions.map(d => d.dimension), - postAggregateDimensions: this.dimensions.map(d => d.dimension), + multiStageDimensions: this.dimensions.map(d => d.dimension), // TODO accessing timeDimensions directly from options might miss some processing logic timeDimensions: this.options.timeDimensions || [], - postAggregateTimeDimensions: (this.options.timeDimensions || []).filter(td => !!td.granularity), + multiStageTimeDimensions: (this.options.timeDimensions || []).filter(td => !!td.granularity), // TODO accessing filters directly from options might miss some processing logic filters: this.options.filters || [] }, @@ -1056,13 +1056,13 @@ export class BaseQuery { withQueries )); const usedWithQueries = {}; - postAggregateMembers.forEach(m => this.collectUsedWithQueries(usedWithQueries, m)); + multiStageMembers.forEach(m => this.collectUsedWithQueries(usedWithQueries, m)); return { multipliedMeasures, regularMeasures, cumulativeMeasures, - postAggregateMembers, + multiStageMembers, withQueries: withQueries.filter(q => usedWithQueries[q.alias]) }; } @@ -1082,9 +1082,9 @@ export class BaseQuery { ).reduce((a, b) => ({ ...a, ...b }), {}); } - collectAllPostAggregateMembers(allMemberChildren) { + collectAllMultiStageMembers(allMemberChildren) { const allMembers = R.uniq(R.flatten(Object.keys(allMemberChildren).map(k => [k].concat(allMemberChildren[k])))); - return R.fromPairs(allMembers.map(m => ([m, this.memberInstanceByPath(m).isPostAggregate()]))); + return R.fromPairs(allMembers.map(m => ([m, this.memberInstanceByPath(m).isMultiStage()]))); } memberInstanceByPath(m) { @@ -1104,20 +1104,20 @@ export class BaseQuery { return member; } - postAggregateWithQueries(member, queryContext, memberChildren, withQueries) { + multiStageWithQueries(member, queryContext, memberChildren, withQueries) { // TODO calculate based on remove_filter in future const wouldNodeApplyFilters = !memberChildren[member]; let memberFrom = memberChildren[member] - ?.map(child => this.postAggregateWithQueries(child, this.childrenPostAggregateContext(member, queryContext, wouldNodeApplyFilters), memberChildren, withQueries)); + ?.map(child => this.multiStageWithQueries(child, this.childrenMultiStageContext(member, queryContext, wouldNodeApplyFilters), memberChildren, withQueries)); const unionFromDimensions = memberFrom ? R.uniq(R.flatten(memberFrom.map(f => f.dimensions))) : queryContext.dimensions; - const unionDimensionsContext = { ...queryContext, dimensions: unionFromDimensions.filter(d => !this.newDimension(d).isPostAggregate()) }; - // TODO is calling postAggregateWithQueries twice optimal? + const unionDimensionsContext = { ...queryContext, dimensions: unionFromDimensions.filter(d => !this.newDimension(d).isMultiStage()) }; + // TODO is calling multiStageWithQueries twice optimal? memberFrom = memberChildren[member] && R.uniqBy( f => f.alias, - memberChildren[member].map(child => this.postAggregateWithQueries(child, this.childrenPostAggregateContext(member, unionDimensionsContext, wouldNodeApplyFilters), memberChildren, withQueries)) + memberChildren[member].map(child => this.multiStageWithQueries(child, this.childrenMultiStageContext(member, unionDimensionsContext, wouldNodeApplyFilters), memberChildren, withQueries)) ); - const selfContext = this.selfPostAggregateContext(member, queryContext, wouldNodeApplyFilters); + const selfContext = this.selfMultiStageContext(member, queryContext, wouldNodeApplyFilters); const subQuery = { ...selfContext, ...(this.cubeEvaluator.isMeasure(member) ? { measures: [member] } : { measures: [], dimensions: R.uniq(selfContext.dimensions.concat(member)) }), @@ -1142,7 +1142,7 @@ export class BaseQuery { member.memberFrom?.forEach(m => this.collectUsedWithQueries(usedQueries, m)); } - childrenPostAggregateContext(memberPath, queryContext, wouldNodeApplyFilters) { + childrenMultiStageContext(memberPath, queryContext, wouldNodeApplyFilters) { let member; if (this.cubeEvaluator.isMeasure(memberPath)) { member = this.newMeasure(memberPath); @@ -1180,7 +1180,7 @@ export class BaseQuery { return queryContext; } - selfPostAggregateContext(memberPath, queryContext, wouldNodeApplyFilters) { + selfMultiStageContext(memberPath, queryContext, wouldNodeApplyFilters) { let member; if (this.cubeEvaluator.isMeasure(memberPath)) { member = this.newMeasure(memberPath); @@ -1195,16 +1195,16 @@ export class BaseQuery { if (memberDef.reduceByReferences) { queryContext = { ...queryContext, - postAggregateDimensions: R.difference(queryContext.postAggregateDimensions, memberDef.reduceByReferences), - postAggregateTimeDimensions: queryContext.postAggregateTimeDimensions.filter(td => memberDef.reduceByReferences.indexOf(td.dimension) === -1), + multiStageDimensions: R.difference(queryContext.multiStageDimensions, memberDef.reduceByReferences), + multiStageTimeDimensions: queryContext.multiStageTimeDimensions.filter(td => memberDef.reduceByReferences.indexOf(td.dimension) === -1), // dimensions: R.uniq(queryContext.dimensions.concat(memberDef.reduceByReferences)) }; } if (memberDef.groupByReferences) { queryContext = { ...queryContext, - postAggregateDimensions: R.intersection(queryContext.postAggregateDimensions, memberDef.groupByReferences), - postAggregateTimeDimensions: queryContext.postAggregateTimeDimensions.filter(td => memberDef.groupByReferences.indexOf(td.dimension) !== -1), + multiStageDimensions: R.intersection(queryContext.multiStageDimensions, memberDef.groupByReferences), + multiStageTimeDimensions: queryContext.multiStageTimeDimensions.filter(td => memberDef.groupByReferences.indexOf(td.dimension) !== -1), }; } if (!wouldNodeApplyFilters) { @@ -1217,7 +1217,7 @@ export class BaseQuery { } else { queryContext = { ...queryContext, - filters: this.keepFilters(queryContext.filters, filterMember => !this.memberInstanceByPath(filterMember).isPostAggregate()), + filters: this.keepFilters(queryContext.filters, filterMember => !this.memberInstanceByPath(filterMember).isMultiStage()), }; } return queryContext; @@ -1225,7 +1225,7 @@ export class BaseQuery { renderWithQuery(withQuery) { const fromMeasures = withQuery.memberFrom && R.uniq(R.flatten(withQuery.memberFrom.map(f => f.measures))); - // TODO get rid of this postAggregate filter + // TODO get rid of this multiStage filter const fromDimensions = withQuery.memberFrom && R.uniq(R.flatten(withQuery.memberFrom.map(f => f.dimensions))); const fromTimeDimensions = withQuery.memberFrom && R.uniq(R.flatten(withQuery.memberFrom.map(f => (f.timeDimensions || []).map(td => ({ ...td, dateRange: undefined }))))); const renderedReferenceContext = { @@ -1245,23 +1245,23 @@ export class BaseQuery { const fromSubQuery = fromMeasures && this.newSubQuery({ measures: fromMeasures, - // TODO get rid of this postAggregate filter - dimensions: fromDimensions, // .filter(d => !this.newDimension(d).isPostAggregate()), + // TODO get rid of this multiStage filter + dimensions: fromDimensions, // .filter(d => !this.newDimension(d).isMultiStage()), timeDimensions: fromTimeDimensions, - postAggregateDimensions: withQuery.postAggregateDimensions, - postAggregateTimeDimensions: withQuery.postAggregateTimeDimensions, + multiStageDimensions: withQuery.multiStageDimensions, + multiStageTimeDimensions: withQuery.multiStageTimeDimensions, filters: withQuery.filters, // TODO do we need it? - postAggregateQuery: true, // !!fromDimensions.find(d => this.newDimension(d).isPostAggregate()) + multiStageQuery: true, // !!fromDimensions.find(d => this.newDimension(d).isMultiStage()) disableExternalPreAggregations: true, }); const measures = fromSubQuery && fromMeasures.map(m => fromSubQuery.newMeasure(m)); - // TODO get rid of this postAggregate filter - const postAggregateDimensions = fromSubQuery && fromDimensions.map(m => fromSubQuery.newDimension(m)).filter(d => d.isPostAggregate()); - const postAggregateTimeDimensions = fromSubQuery && fromTimeDimensions.map(m => fromSubQuery.newTimeDimension(m)).filter(d => d.isPostAggregate()); + // TODO get rid of this multiStage filter + const multiStageDimensions = fromSubQuery && fromDimensions.map(m => fromSubQuery.newDimension(m)).filter(d => d.isMultiStage()); + const multiStageTimeDimensions = fromSubQuery && fromTimeDimensions.map(m => fromSubQuery.newTimeDimension(m)).filter(d => d.isMultiStage()); // TODO not working yet - const membersToSelect = measures?.concat(postAggregateDimensions).concat(postAggregateTimeDimensions); + const membersToSelect = measures?.concat(multiStageDimensions).concat(multiStageTimeDimensions); const select = fromSubQuery && fromSubQuery.outerMeasuresJoinFullKeyQueryAggregate(membersToSelect, membersToSelect, withQuery.memberFrom.map(f => f.alias)); const fromSql = select && this.wrapInParenthesis(select); @@ -1269,15 +1269,15 @@ export class BaseQuery { measures: withQuery.measures, dimensions: withQuery.dimensions, timeDimensions: withQuery.timeDimensions, - postAggregateDimensions: withQuery.postAggregateDimensions, - postAggregateTimeDimensions: withQuery.postAggregateTimeDimensions, + multiStageDimensions: withQuery.multiStageDimensions, + multiStageTimeDimensions: withQuery.multiStageTimeDimensions, filters: withQuery.filters, from: fromSql && { sql: fromSql, alias: `${withQuery.alias}_join`, }, // TODO condition should something else instead of rank - postAggregateQuery: !!withQuery.measures.find(d => { + multiStageQuery: !!withQuery.measures.find(d => { const { type } = this.newMeasure(d).definition(); return type === 'rank' || BaseQuery.isCalculatedMeasureType(type); }), @@ -1287,9 +1287,9 @@ export class BaseQuery { if (!subQuery.from) { const allSubQueryMembers = R.flatten(subQuery.collectFromMembers(false, subQuery.collectMemberNamesFor.bind(subQuery), 'collectMemberNamesFor')); - const postAggregateMember = allSubQueryMembers.find(m => this.memberInstanceByPath(m).isPostAggregate()); - if (postAggregateMember) { - throw new Error(`Post aggregate member '${postAggregateMember}' lacks FROM clause in sub query: ${JSON.stringify(subQueryOptions)}`); + const multiStageMember = allSubQueryMembers.find(m => this.memberInstanceByPath(m).isMultiStage()); + if (multiStageMember) { + throw new Error(`Multi stage member '${multiStageMember}' lacks FROM clause in sub query: ${JSON.stringify(subQueryOptions)}`); } } @@ -2299,9 +2299,9 @@ export class BaseQuery { if ((this.safeEvaluateSymbolContext().renderedReference || {})[memberPath]) { return this.evaluateSymbolContext.renderedReference[memberPath]; } - // if (symbol.postAggregate) { + // if (symbol.multiStage) { // const orderBySql = (symbol.orderBy || []).map(o => ({ sql: this.evaluateSql(cubeName, o.sql), dir: o.dir })); - // const partitionBy = this.postAggregateDimensions.length ? `PARTITION BY ${this.postAggregateDimensions.map(d => d.dimensionSql()).join(', ')} ` : ''; + // const partitionBy = this.multiStageDimensions.length ? `PARTITION BY ${this.multiStageDimensions.map(d => d.dimensionSql()).join(', ')} ` : ''; // if (symbol.type === 'rank') { // return `${symbol.type}() OVER (${partitionBy}ORDER BY ${orderBySql.map(o => `${o.sql} ${o.dir}`).join(', ')})`; // } @@ -2519,10 +2519,10 @@ export class BaseQuery { (this.safeEvaluateSymbolContext().foundCompositeCubeMeasures || {})[parentMeasure] && !(this.safeEvaluateSymbolContext().foundCompositeCubeMeasures || {})[measurePath] ) { - this.safeEvaluateSymbolContext().measuresToRender.push({ multiplied: resultMultiplied, measure: measurePath, postAggregate: symbol.postAggregate }); + this.safeEvaluateSymbolContext().measuresToRender.push({ multiplied: resultMultiplied, measure: measurePath, multiStage: symbol.multiStage }); } if (this.safeEvaluateSymbolContext().foundCompositeCubeMeasures && !parentMeasure) { - this.safeEvaluateSymbolContext().rootMeasure.value = { multiplied: resultMultiplied, measure: measurePath, postAggregate: symbol.postAggregate }; + this.safeEvaluateSymbolContext().rootMeasure.value = { multiplied: resultMultiplied, measure: measurePath, multiStage: symbol.multiStage }; } if (((this.evaluateSymbolContext || {}).renderedReference || {})[measurePath]) { return this.evaluateSymbolContext.renderedReference[measurePath]; @@ -2554,15 +2554,15 @@ export class BaseQuery { return onGroupedColumn; } } - if (symbol.postAggregate) { - const partitionBy = (this.postAggregateDimensions.length || this.postAggregateTimeDimensions.length) ? - `PARTITION BY ${this.postAggregateDimensions.concat(this.postAggregateTimeDimensions).map(d => d.dimensionSql()).join(', ')} ` : ''; + if (symbol.multiStage) { + const partitionBy = (this.multiStageDimensions.length || this.multiStageTimeDimensions.length) ? + `PARTITION BY ${this.multiStageDimensions.concat(this.multiStageTimeDimensions).map(d => d.dimensionSql()).join(', ')} ` : ''; if (symbol.type === 'rank') { return `${symbol.type}() OVER (${partitionBy}ORDER BY ${orderBySql.map(o => `${o.sql} ${o.dir}`).join(', ')})`; } if (!( - R.equals(this.postAggregateDimensions.map(d => d.expressionPath()), this.dimensions.map(d => d.expressionPath())) && - R.equals(this.postAggregateTimeDimensions.map(d => d.expressionPath()), this.timeDimensions.map(d => d.expressionPath())) + R.equals(this.multiStageDimensions.map(d => d.expressionPath()), this.dimensions.map(d => d.expressionPath())) && + R.equals(this.multiStageTimeDimensions.map(d => d.expressionPath()), this.timeDimensions.map(d => d.expressionPath())) )) { let funDef; if (symbol.type === 'countDistinctApprox') { @@ -2571,7 +2571,7 @@ export class BaseQuery { funDef = `count(distinct ${evaluateSql})`; } else if (BaseQuery.isCalculatedMeasureType(symbol.type)) { // TODO calculated measure type will be ungrouped - // if (this.postAggregateDimensions.length !== this.dimensions.length) { + // if (this.multiStageDimensions.length !== this.dimensions.length) { // throw new UserError(`Calculated measure '${measurePath}' uses group_by or reduce_by context modifiers while it isn't allowed`); // } return evaluateSql; diff --git a/packages/cubejs-schema-compiler/src/adapter/BaseSegment.ts b/packages/cubejs-schema-compiler/src/adapter/BaseSegment.ts index de3f788eb504d..4e80d99b6cd26 100644 --- a/packages/cubejs-schema-compiler/src/adapter/BaseSegment.ts +++ b/packages/cubejs-schema-compiler/src/adapter/BaseSegment.ts @@ -41,11 +41,11 @@ export class BaseSegment { return this.query.cubeEvaluator.segmentByPath(this.segment); } - public isPostAggregate() { + public isMultiStage() { if (this.expression) { // TODO return false; } - return this.definition().postAggregate; + return this.definition().multiStage; } public definition(): any { diff --git a/packages/cubejs-schema-compiler/src/adapter/PreAggregations.js b/packages/cubejs-schema-compiler/src/adapter/PreAggregations.js index c45143f976f3a..4495281416a00 100644 --- a/packages/cubejs-schema-compiler/src/adapter/PreAggregations.js +++ b/packages/cubejs-schema-compiler/src/adapter/PreAggregations.js @@ -373,7 +373,7 @@ export class PreAggregations { ); const isAdditive = R.all(m => m.isAdditive(), query.measures); - const hasPostAggregate = R.any(m => m.isPostAggregate(), query.measures); + const hasMultiStage = R.any(m => m.isMultiStage(), query.measures); const leafMeasures = leafMeasurePaths.map(path => query.newMeasure(path)); const leafMeasureAdditive = R.all(m => m.isAdditive(), leafMeasures); const cumulativeMeasures = leafMeasures @@ -416,7 +416,7 @@ export class PreAggregations { ungrouped: query.ungrouped, sortedUsedCubePrimaryKeys, sortedAllCubeNames, - hasPostAggregate + hasMultiStage }; } @@ -707,7 +707,7 @@ export class PreAggregations { */ const canUseFn = ( - transformedQuery.leafMeasureAdditive && !transformedQuery.hasMultipliedMeasures && !transformedQuery.hasPostAggregate || transformedQuery.ungrouped + transformedQuery.leafMeasureAdditive && !transformedQuery.hasMultipliedMeasures && !transformedQuery.hasMultiStage || transformedQuery.ungrouped ) ? (r) => canUsePreAggregationLeafMeasureAdditive(r) || canUsePreAggregationNotAdditive(r) : canUsePreAggregationNotAdditive; diff --git a/packages/cubejs-schema-compiler/src/compiler/CubeEvaluator.ts b/packages/cubejs-schema-compiler/src/compiler/CubeEvaluator.ts index e1240f27d5ccf..a88937888eb70 100644 --- a/packages/cubejs-schema-compiler/src/compiler/CubeEvaluator.ts +++ b/packages/cubejs-schema-compiler/src/compiler/CubeEvaluator.ts @@ -14,7 +14,7 @@ export type SegmentDefinition = { ownedByCube: boolean, fieldType?: string, // TODO should we have it here? - postAggregate?: boolean, + multiStage?: boolean, }; export type DimensionDefinition = { @@ -23,7 +23,7 @@ export type DimensionDefinition = { primaryKey?: true, ownedByCube: boolean, fieldType?: string, - postAggregate?: boolean, + multiStage?: boolean, shiftInterval?: string, }; @@ -47,7 +47,7 @@ export type MeasureDefinition = { filters?: any primaryKey?: true, drillFilters?: any, - postAggregate?: boolean, + multiStage?: boolean, groupBy?: Function, reduceBy?: Function, addGroupBy?: Function, @@ -107,8 +107,8 @@ export class CubeEvaluator extends CubeSymbols { this.prepareMembers(cube.dimensions, cube, errorReporter); this.prepareMembers(cube.segments, cube, errorReporter); - this.evaluatePostAggregateReferences(cube.name, cube.measures); - this.evaluatePostAggregateReferences(cube.name, cube.dimensions); + this.evaluateMultiStageReferences(cube.name, cube.measures); + this.evaluateMultiStageReferences(cube.name, cube.dimensions); this.prepareHierarchies(cube); @@ -165,14 +165,14 @@ export class CubeEvaluator extends CubeSymbols { return []; } - private evaluatePostAggregateReferences(cubeName: string, obj: { [key: string]: MeasureDefinition }) { + private evaluateMultiStageReferences(cubeName: string, obj: { [key: string]: MeasureDefinition }) { if (!obj) { return; } // eslint-disable-next-line no-restricted-syntax for (const member of Object.values(obj)) { - if (member.postAggregate) { + if (member.multiStage) { if (member.groupBy) { member.groupByReferences = this.evaluateReferences(cubeName, member.groupBy); } diff --git a/packages/cubejs-schema-compiler/src/compiler/CubeValidator.ts b/packages/cubejs-schema-compiler/src/compiler/CubeValidator.ts index 34a760ebd9699..a49d0a98181ef 100644 --- a/packages/cubejs-schema-compiler/src/compiler/CubeValidator.ts +++ b/packages/cubejs-schema-compiler/src/compiler/CubeValidator.ts @@ -556,17 +556,17 @@ const measureTypeWithCount = Joi.string().valid( 'count', 'number', 'string', 'boolean', 'time', 'sum', 'avg', 'min', 'max', 'countDistinct', 'runningTotal', 'countDistinctApprox' ); -const postAggregateMeasureType = Joi.string().valid( +const multiStageMeasureType = Joi.string().valid( 'count', 'number', 'string', 'boolean', 'time', 'sum', 'avg', 'min', 'max', 'countDistinct', 'runningTotal', 'countDistinctApprox', 'rank' ); -const MeasuresSchema = Joi.object().pattern(identifierRegex, Joi.alternatives().conditional(Joi.ref('.postAggregate'), [ +const MeasuresSchema = Joi.object().pattern(identifierRegex, Joi.alternatives().conditional(Joi.ref('.multiStage'), [ { is: true, then: inherit(BaseMeasure, { - postAggregate: Joi.boolean().strict(), - type: postAggregateMeasureType.required(), + multiStage: Joi.boolean().strict(), + type: multiStageMeasureType.required(), sql: Joi.func(), // TODO .required(), groupBy: Joi.func(), reduceBy: Joi.func(), @@ -679,7 +679,7 @@ const baseSchema = { sql: Joi.func().required() }), inherit(BaseDimension, { - postAggregate: Joi.boolean().valid(true), + multiStage: Joi.boolean().valid(true), type: Joi.any().valid('number').required(), sql: Joi.func().required(), addGroupBy: Joi.func(), diff --git a/packages/cubejs-schema-compiler/test/integration/postgres/sql-generation.test.ts b/packages/cubejs-schema-compiler/test/integration/postgres/sql-generation.test.ts index bcec043f7bee1..671b3efc45c1c 100644 --- a/packages/cubejs-schema-compiler/test/integration/postgres/sql-generation.test.ts +++ b/packages/cubejs-schema-compiler/test/integration/postgres/sql-generation.test.ts @@ -88,7 +88,7 @@ describe('SQL Generation', () => { } }, revenue_day_ago: { - post_aggregate: true, + multi_stage: true, type: 'sum', sql: \`\${revenue}\`, time_shift: [{ @@ -98,7 +98,7 @@ describe('SQL Generation', () => { }] }, cagr_1d: { - post_aggregate: true, + multi_stage: true, sql: \`ROUND(100 * \${revenue} / NULLIF(\${revenue_day_ago}, 0))\`, type: 'number', }, @@ -132,7 +132,7 @@ describe('SQL Generation', () => { }, ...(['foo', 'bar'].map(m => ({ [m]: { type: 'count' } })).reduce((a, b) => ({ ...a, ...b }))), second_rank_sum: { - post_aggregate: true, + multi_stage: true, sql: \`\${visitor_revenue}\`, filters: [{ sql: \`\${revenue_rank} = 1\` @@ -140,7 +140,7 @@ describe('SQL Generation', () => { type: 'sum', }, adjusted_rank_sum: { - post_aggregate: true, + multi_stage: true, sql: \`\${adjusted_revenue}\`, filters: [{ sql: \`\${adjusted_revenue_rank} = 1\` @@ -149,7 +149,7 @@ describe('SQL Generation', () => { add_group_by: [visitors.created_at], }, revenue_rank: { - post_aggregate: true, + multi_stage: true, type: \`rank\`, order_by: [{ sql: \`\${visitor_revenue}\`, @@ -158,7 +158,7 @@ describe('SQL Generation', () => { reduce_by: [visitors.source], }, date_rank: { - post_aggregate: true, + multi_stage: true, type: \`rank\`, order_by: [{ sql: \`\${visitors.created_at}\`, @@ -167,7 +167,7 @@ describe('SQL Generation', () => { reduce_by: [visitors.created_at] }, adjusted_revenue_rank: { - post_aggregate: true, + multi_stage: true, type: \`rank\`, order_by: [{ sql: \`\${adjusted_revenue}\`, @@ -176,18 +176,18 @@ describe('SQL Generation', () => { reduce_by: [visitors.created_at] }, visitors_revenue_total: { - post_aggregate: true, + multi_stage: true, sql: \`\${revenue}\`, type: 'sum', group_by: [] }, percentage_of_total: { - post_aggregate: true, + multi_stage: true, sql: \`(100 * \${revenue} / NULLIF(\${visitors_revenue_total}, 0))::int\`, type: 'number' }, adjusted_revenue: { - post_aggregate: true, + multi_stage: true, sql: \`\${visitor_revenue} + 0.1 * \${date_rank}\`, type: 'number', filters: [{ @@ -195,7 +195,7 @@ describe('SQL Generation', () => { }] }, customer_revenue: { - post_aggregate: true, + multi_stage: true, sql: \`\${revenue}\`, type: 'sum', group_by: [id] @@ -204,7 +204,7 @@ describe('SQL Generation', () => { dimensions: { revenue_bucket: { - post_aggregate: true, + multi_stage: true, sql: \`CASE WHEN \${revenue} < 100 THEN 1 WHEN \${revenue} >= 100 THEN 2 END\`, type: 'number', add_group_by: [id] @@ -283,7 +283,7 @@ describe('SQL Generation', () => { } }); - view('visitors_post_aggregate', { + view('visitors_multi_stage', { cubes: [{ join_path: 'visitors', includes: '*' @@ -2372,7 +2372,7 @@ describe('SQL Generation', () => { }] )); - it('post aggregate measure with multiple dependencies', async () => runQueryTest( + it('multi stage measure with multiple dependencies', async () => runQueryTest( { measures: ['visitors.second_rank_sum', 'visitors.visitor_revenue', 'visitors.revenue_rank'], dimensions: ['visitors.source'], @@ -2395,7 +2395,7 @@ describe('SQL Generation', () => { }] )); - it('post aggregate complex graph', async () => runQueryTest( + it('multi stage complex graph', async () => runQueryTest( { measures: ['visitors.adjusted_rank_sum', 'visitors.visitor_revenue'], dimensions: ['visitors.source'], @@ -2418,7 +2418,7 @@ describe('SQL Generation', () => { }] )); - it('post aggregate complex graph with time dimension', async () => runQueryTest( + it('multi stage complex graph with time dimension', async () => runQueryTest( { measures: ['visitors.adjusted_rank_sum', 'visitors.visitor_revenue'], dimensions: ['visitors.source'], @@ -2461,7 +2461,7 @@ describe('SQL Generation', () => { }] )); - it('post aggregate complex graph with time dimension no granularity', async () => runQueryTest( + it('multi stage complex graph with time dimension no granularity', async () => runQueryTest( { measures: ['visitors.adjusted_rank_sum', 'visitors.visitor_revenue'], dimensions: ['visitors.source'], @@ -2491,7 +2491,7 @@ describe('SQL Generation', () => { }] )); - it('post aggregate complex graph with time dimension no granularity raw dimension', async () => runQueryTest( + it('multi stage complex graph with time dimension no granularity raw dimension', async () => runQueryTest( { measures: ['visitors.adjusted_rank_sum', 'visitors.visitor_revenue'], dimensions: ['visitors.source', 'visitors.updated_at'], @@ -2529,50 +2529,50 @@ describe('SQL Generation', () => { }] )); - it('post aggregate complex graph with time dimension through view', async () => runQueryTest( + it('multi stage complex graph with time dimension through view', async () => runQueryTest( { - measures: ['visitors_post_aggregate.adjusted_rank_sum', 'visitors_post_aggregate.visitor_revenue'], - dimensions: ['visitors_post_aggregate.source'], + measures: ['visitors_multi_stage.adjusted_rank_sum', 'visitors_multi_stage.visitor_revenue'], + dimensions: ['visitors_multi_stage.source'], timeDimensions: [ { - dimension: 'visitors_post_aggregate.updated_at', + dimension: 'visitors_multi_stage.updated_at', granularity: 'day', }, ], order: [{ - id: 'visitors_post_aggregate.source' + id: 'visitors_multi_stage.source' }], timezone: 'UTC', }, [{ - visitors_post_aggregate__source: 'google', - visitors_post_aggregate__updated_at_day: '2017-01-20T00:00:00.000Z', - visitors_post_aggregate__adjusted_rank_sum: null, - visitors_post_aggregate__visitor_revenue: null + visitors_multi_stage__source: 'google', + visitors_multi_stage__updated_at_day: '2017-01-20T00:00:00.000Z', + visitors_multi_stage__adjusted_rank_sum: null, + visitors_multi_stage__visitor_revenue: null }, { - visitors_post_aggregate__source: 'some', - visitors_post_aggregate__updated_at_day: '2017-01-15T00:00:00.000Z', - visitors_post_aggregate__adjusted_rank_sum: '200.1', - visitors_post_aggregate__visitor_revenue: '200' + visitors_multi_stage__source: 'some', + visitors_multi_stage__updated_at_day: '2017-01-15T00:00:00.000Z', + visitors_multi_stage__adjusted_rank_sum: '200.1', + visitors_multi_stage__visitor_revenue: '200' }, { - visitors_post_aggregate__source: 'some', - visitors_post_aggregate__updated_at_day: '2017-01-30T00:00:00.000Z', - visitors_post_aggregate__adjusted_rank_sum: '100.1', - visitors_post_aggregate__visitor_revenue: '100' + visitors_multi_stage__source: 'some', + visitors_multi_stage__updated_at_day: '2017-01-30T00:00:00.000Z', + visitors_multi_stage__adjusted_rank_sum: '100.1', + visitors_multi_stage__visitor_revenue: '100' }, { - visitors_post_aggregate__source: null, - visitors_post_aggregate__updated_at_day: '2016-09-07T00:00:00.000Z', - visitors_post_aggregate__adjusted_rank_sum: null, - visitors_post_aggregate__visitor_revenue: null + visitors_multi_stage__source: null, + visitors_multi_stage__updated_at_day: '2016-09-07T00:00:00.000Z', + visitors_multi_stage__adjusted_rank_sum: null, + visitors_multi_stage__visitor_revenue: null }, { - visitors_post_aggregate__source: null, - visitors_post_aggregate__updated_at_day: '2017-01-25T00:00:00.000Z', - visitors_post_aggregate__adjusted_rank_sum: null, - visitors_post_aggregate__visitor_revenue: null + visitors_multi_stage__source: null, + visitors_multi_stage__updated_at_day: '2017-01-25T00:00:00.000Z', + visitors_multi_stage__adjusted_rank_sum: null, + visitors_multi_stage__visitor_revenue: null }] )); - it('post aggregate percentage of total', async () => runQueryTest( + it('multi stage percentage of total', async () => runQueryTest( { measures: ['visitors.revenue', 'visitors.percentage_of_total'], dimensions: ['visitors.source'], @@ -2595,33 +2595,33 @@ describe('SQL Generation', () => { }] )); - it('post aggregate percentage of total with limit', async () => runQueryTest( + it('multi stage percentage of total with limit', async () => runQueryTest( { - measures: ['visitors_post_aggregate.percentage_of_total'], - dimensions: ['visitors_post_aggregate.source'], + measures: ['visitors_multi_stage.percentage_of_total'], + dimensions: ['visitors_multi_stage.source'], order: [{ - id: 'visitors_post_aggregate.source' + id: 'visitors_multi_stage.source' }], rowLimit: 1, limit: 1 }, [{ - visitors_post_aggregate__percentage_of_total: 15, - visitors_post_aggregate__source: 'google' + visitors_multi_stage__percentage_of_total: 15, + visitors_multi_stage__source: 'google' }] )); - it('post aggregate percentage of total with limit totals', async () => runQueryTest( + it('multi stage percentage of total with limit totals', async () => runQueryTest( { - measures: ['visitors_post_aggregate.percentage_of_total'], + measures: ['visitors_multi_stage.percentage_of_total'], rowLimit: 1 }, [{ - visitors_post_aggregate__percentage_of_total: 100 + visitors_multi_stage__percentage_of_total: 100 }] )); - it('post aggregate percentage of total filtered', async () => runQueryTest( + it('multi stage percentage of total filtered', async () => runQueryTest( { measures: ['visitors.revenue', 'visitors.percentage_of_total'], dimensions: ['visitors.source'], @@ -2649,7 +2649,7 @@ describe('SQL Generation', () => { }] )); - it('post aggregate percentage of total filtered with time dimension', async () => runQueryTest( + it('multi stage percentage of total filtered with time dimension', async () => runQueryTest( { measures: ['visitors.revenue', 'visitors.percentage_of_total'], dimensions: ['visitors.source'], @@ -2695,7 +2695,7 @@ describe('SQL Generation', () => { }] )); - it('post aggregate percentage of total filtered and joined', async () => runQueryTest( + it('multi stage percentage of total filtered and joined', async () => runQueryTest( { measures: ['visitors.revenue', 'visitors.percentage_of_total'], dimensions: ['visitor_checkins.source'], @@ -2740,7 +2740,7 @@ describe('SQL Generation', () => { )); // TODO not implemented - // it('post aggregate bucketing', async () => runQueryTest( + // it('multi stage bucketing', async () => runQueryTest( // { // measures: ['visitors.revenue'], // dimensions: ['visitors.revenue_bucket'], diff --git a/packages/cubejs-testing-drivers/fixtures/_schemas.json b/packages/cubejs-testing-drivers/fixtures/_schemas.json index 5dab6f5668caf..bfd9e256a1c0c 100644 --- a/packages/cubejs-testing-drivers/fixtures/_schemas.json +++ b/packages/cubejs-testing-drivers/fixtures/_schemas.json @@ -361,7 +361,7 @@ "name": "totalProfitYearAgo", "type": "number", "sql": "{totalProfit}", - "post_aggregate": true, + "multi_stage": true, "time_shift": [{ "time_dimension": "orderDate", "interval": "366 day", @@ -372,14 +372,14 @@ "name": "totalProfitForStatus", "type": "sum", "sql": "{totalProfit}", - "post_aggregate": true, + "multi_stage": true, "reduce_by": ["category"] }, { "name": "percentageOfTotalForStatus", "type": "number", "sql": "ROUND(100 * {totalProfit} / NULLIF({totalProfitForStatus}, 0))", - "post_aggregate": true + "multi_stage": true }, { "name": "hiddenSum", diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/bigquery-export-bucket-gcs-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/bigquery-export-bucket-gcs-full.test.ts.snap index b78dcfb3eb418..88e994b36b41b 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/bigquery-export-bucket-gcs-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/bigquery-export-bucket-gcs-full.test.ts.snap @@ -2154,14 +2154,6 @@ Array [ exports[`Queries with the @cubejs-backend/bigquery-driver filtering Customers: contains + dimensions, third 1`] = `Array []`; -exports[`Queries with the @cubejs-backend/bigquery-driver filtering Products: contains with special chars + dimensions 1`] = ` -Array [ - Object { - "Products.productName": "Logitech di_Novo Edge Keyboard", - }, -] -`; - exports[`Queries with the @cubejs-backend/bigquery-driver filtering Customers: endsWith filter + dimensions, first 1`] = ` Array [ Object { @@ -3860,6 +3852,14 @@ Array [ exports[`Queries with the @cubejs-backend/bigquery-driver filtering Products: contains + dimensions + order, third 1`] = `Array []`; +exports[`Queries with the @cubejs-backend/bigquery-driver filtering Products: contains with special chars + dimensions 1`] = ` +Array [ + Object { + "Products.productName": "Logitech di_Novo Edge Keyboard", + }, +] +`; + exports[`Queries with the @cubejs-backend/bigquery-driver filtering Products: endsWith filter + dimensions + order, first 1`] = ` Array [ Object { @@ -4822,7 +4822,7 @@ Array [ exports[`Queries with the @cubejs-backend/bigquery-driver querying BigECommerce: totalProfitYearAgo 1`] = `Array []`; -exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions 1`] = ` +exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + limit 1`] = ` Array [ Object { "Customers.customerId": "AH-10465", @@ -4864,42 +4864,19 @@ Array [ "Customers.customerId": "BS-11755", "Customers.customerName": "Customer 10", }, - Object { - "Customers.customerId": "CA-12775", - "Customers.customerName": "Customer 11", - }, - Object { - "Customers.customerId": "CC-12475", - "Customers.customerName": "Customer 12", - }, - Object { - "Customers.customerId": "CD-12280", - "Customers.customerName": "Customer 13", - }, - Object { - "Customers.customerId": "CS-12355", - "Customers.customerName": "Customer 14", - }, - Object { - "Customers.customerId": "DB-13405", - "Customers.customerName": "Customer 15", - }, - Object { - "Customers.customerId": "DG-13300", - "Customers.customerName": "Customer 16", - }, - Object { - "Customers.customerId": "DW-13480", - "Customers.customerName": "Customer 17", - }, - Object { - "Customers.customerId": "EM-14140", - "Customers.customerName": "Customer 18", - }, +] +`; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + order + limit + total + offset 1`] = ` +Array [ Object { "Customers.customerId": "GA-14725", "Customers.customerName": "Customer 19", }, + Object { + "Customers.customerId": "AJ-10780", + "Customers.customerName": "Customer 2", + }, Object { "Customers.customerId": "GZ-14470", "Customers.customerName": "Customer 20", @@ -4932,66 +4909,55 @@ Array [ "Customers.customerId": "KL-16555", "Customers.customerName": "Customer 27", }, +] +`; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + order + limit + total 1`] = ` +Array [ Object { - "Customers.customerId": "KN-16705", - "Customers.customerName": "Customer 28", - }, - Object { - "Customers.customerId": "LC-17050", - "Customers.customerName": "Customer 29", - }, - Object { - "Customers.customerId": "LR-16915", - "Customers.customerName": "Customer 30", - }, - Object { - "Customers.customerId": "MC-17605", - "Customers.customerName": "Customer 31", - }, - Object { - "Customers.customerId": "MG-17650", - "Customers.customerName": "Customer 32", + "Customers.customerId": "AH-10465", + "Customers.customerName": "Customer 1", }, Object { - "Customers.customerId": "ML-17755", - "Customers.customerName": "Customer 33", + "Customers.customerId": "BS-11755", + "Customers.customerName": "Customer 10", }, Object { - "Customers.customerId": "MM-18280", - "Customers.customerName": "Customer 34", + "Customers.customerId": "CA-12775", + "Customers.customerName": "Customer 11", }, Object { - "Customers.customerId": "NP-18670", - "Customers.customerName": "Customer 35", + "Customers.customerId": "CC-12475", + "Customers.customerName": "Customer 12", }, Object { - "Customers.customerId": "PF-19165", - "Customers.customerName": "Customer 36", + "Customers.customerId": "CD-12280", + "Customers.customerName": "Customer 13", }, Object { - "Customers.customerId": "SB-20185", - "Customers.customerName": "Customer 37", + "Customers.customerId": "CS-12355", + "Customers.customerName": "Customer 14", }, Object { - "Customers.customerId": "SS-20140", - "Customers.customerName": "Customer 38", + "Customers.customerId": "DB-13405", + "Customers.customerName": "Customer 15", }, Object { - "Customers.customerId": "TB-21175", - "Customers.customerName": "Customer 39", + "Customers.customerId": "DG-13300", + "Customers.customerName": "Customer 16", }, Object { - "Customers.customerId": "TS-21205", - "Customers.customerName": "Customer 40", + "Customers.customerId": "DW-13480", + "Customers.customerName": "Customer 17", }, Object { - "Customers.customerId": "WB-21850", - "Customers.customerName": "Customer 41", + "Customers.customerId": "EM-14140", + "Customers.customerName": "Customer 18", }, ] `; -exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + limit 1`] = ` +exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + order 1`] = ` Array [ Object { "Customers.customerId": "AH-10465", @@ -5033,18 +4999,41 @@ Array [ "Customers.customerId": "BS-11755", "Customers.customerName": "Customer 10", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + order + limit + total + offset 1`] = ` -Array [ Object { - "Customers.customerId": "GA-14725", - "Customers.customerName": "Customer 19", + "Customers.customerId": "CA-12775", + "Customers.customerName": "Customer 11", }, Object { - "Customers.customerId": "AJ-10780", - "Customers.customerName": "Customer 2", + "Customers.customerId": "CC-12475", + "Customers.customerName": "Customer 12", + }, + Object { + "Customers.customerId": "CD-12280", + "Customers.customerName": "Customer 13", + }, + Object { + "Customers.customerId": "CS-12355", + "Customers.customerName": "Customer 14", + }, + Object { + "Customers.customerId": "DB-13405", + "Customers.customerName": "Customer 15", + }, + Object { + "Customers.customerId": "DG-13300", + "Customers.customerName": "Customer 16", + }, + Object { + "Customers.customerId": "DW-13480", + "Customers.customerName": "Customer 17", + }, + Object { + "Customers.customerId": "EM-14140", + "Customers.customerName": "Customer 18", + }, + Object { + "Customers.customerId": "GA-14725", + "Customers.customerName": "Customer 19", }, Object { "Customers.customerId": "GZ-14470", @@ -5078,55 +5067,66 @@ Array [ "Customers.customerId": "KL-16555", "Customers.customerName": "Customer 27", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + order + limit + total 1`] = ` -Array [ Object { - "Customers.customerId": "AH-10465", - "Customers.customerName": "Customer 1", + "Customers.customerId": "KN-16705", + "Customers.customerName": "Customer 28", }, Object { - "Customers.customerId": "BS-11755", - "Customers.customerName": "Customer 10", + "Customers.customerId": "LC-17050", + "Customers.customerName": "Customer 29", }, Object { - "Customers.customerId": "CA-12775", - "Customers.customerName": "Customer 11", + "Customers.customerId": "LR-16915", + "Customers.customerName": "Customer 30", }, Object { - "Customers.customerId": "CC-12475", - "Customers.customerName": "Customer 12", + "Customers.customerId": "MC-17605", + "Customers.customerName": "Customer 31", }, Object { - "Customers.customerId": "CD-12280", - "Customers.customerName": "Customer 13", + "Customers.customerId": "MG-17650", + "Customers.customerName": "Customer 32", }, Object { - "Customers.customerId": "CS-12355", - "Customers.customerName": "Customer 14", + "Customers.customerId": "ML-17755", + "Customers.customerName": "Customer 33", }, Object { - "Customers.customerId": "DB-13405", - "Customers.customerName": "Customer 15", + "Customers.customerId": "MM-18280", + "Customers.customerName": "Customer 34", }, Object { - "Customers.customerId": "DG-13300", - "Customers.customerName": "Customer 16", + "Customers.customerId": "NP-18670", + "Customers.customerName": "Customer 35", }, Object { - "Customers.customerId": "DW-13480", - "Customers.customerName": "Customer 17", + "Customers.customerId": "PF-19165", + "Customers.customerName": "Customer 36", }, Object { - "Customers.customerId": "EM-14140", - "Customers.customerName": "Customer 18", + "Customers.customerId": "SB-20185", + "Customers.customerName": "Customer 37", + }, + Object { + "Customers.customerId": "SS-20140", + "Customers.customerName": "Customer 38", + }, + Object { + "Customers.customerId": "TB-21175", + "Customers.customerName": "Customer 39", + }, + Object { + "Customers.customerId": "TS-21205", + "Customers.customerName": "Customer 40", + }, + Object { + "Customers.customerId": "WB-21850", + "Customers.customerName": "Customer 41", }, ] `; -exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + order 1`] = ` +exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + total 1`] = ` Array [ Object { "Customers.customerId": "AH-10465", @@ -5295,7 +5295,7 @@ Array [ ] `; -exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions + total 1`] = ` +exports[`Queries with the @cubejs-backend/bigquery-driver querying Customers: dimensions 1`] = ` Array [ Object { "Customers.customerId": "AH-10465", @@ -5573,7 +5573,7 @@ Array [ ] `; -exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions 1`] = ` +exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + limit 1`] = ` Array [ Object { "ECommerce.category": "Furniture", @@ -5725,6 +5725,11 @@ Array [ "ECommerce.sales": 1979.89, "ECommerce.subCategory": "Phones", }, +] +`; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + order + limit + total + offset 1`] = ` +Array [ Object { "ECommerce.category": "Furniture", "ECommerce.city": "Glendale", @@ -5875,370 +5880,165 @@ Array [ "ECommerce.sales": 539.97, "ECommerce.subCategory": "Phones", }, +] +`; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + order + limit + total 1`] = ` +Array [ Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "WB-21850", - "ECommerce.customerName": "Customer 41", + "ECommerce.category": "Furniture", + "ECommerce.city": "Detroit", + "ECommerce.customerId": "MC-17605", + "ECommerce.customerName": "Customer 31", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-11-11T00:00:00.000", - "ECommerce.orderId": "CA-2017-120327", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.profit": 21.5824, - "ECommerce.quantity": 4, - "ECommerce.rowId": 4227, - "ECommerce.sales": 45.92, - "ECommerce.subCategory": "Fasteners", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "TB-21175", - "ECommerce.customerName": "Customer 39", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-11-02T00:00:00.000", - "ECommerce.orderId": "CA-2017-143567", - "ECommerce.productName": "Logitech di_Novo Edge Keyboard", - "ECommerce.profit": 517.4793, - "ECommerce.quantity": 9, - "ECommerce.rowId": 4882, - "ECommerce.sales": 2249.91, - "ECommerce.subCategory": "Accessories", - }, - Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "Detroit", - "ECommerce.customerId": "CA-12775", - "ECommerce.customerName": "Customer 11", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-01T00:00:00.000", - "ECommerce.orderId": "CA-2017-145653", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.profit": 134.5302, - "ECommerce.quantity": 7, - "ECommerce.rowId": 5220, - "ECommerce.sales": 498.26, - "ECommerce.subCategory": "Chairs", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "KL-16555", - "ECommerce.customerName": "Customer 27", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-14T00:00:00.000", - "ECommerce.orderId": "CA-2017-147333", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", - "ECommerce.profit": 8.5025, - "ECommerce.quantity": 5, - "ECommerce.rowId": 5277, - "ECommerce.sales": 44.75, - "ECommerce.subCategory": "Accessories", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Los Angeles", - "ECommerce.customerId": "SS-20140", - "ECommerce.customerName": "Customer 38", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-03T00:00:00.000", - "ECommerce.orderId": "CA-2017-145772", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", - "ECommerce.profit": 8.5025, - "ECommerce.quantity": 5, - "ECommerce.rowId": 6125, - "ECommerce.sales": 44.75, - "ECommerce.subCategory": "Accessories", + "ECommerce.orderDate": "2020-01-23T00:00:00.000", + "ECommerce.orderId": "CA-2017-145142", + "ECommerce.productName": "Balt Solid Wood Rectangular Table", + "ECommerce.profit": 21.098, + "ECommerce.quantity": 2, + "ECommerce.rowId": 523, + "ECommerce.sales": 210.98, + "ECommerce.subCategory": "Tables", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Marion", - "ECommerce.customerId": "MG-17650", - "ECommerce.customerName": "Customer 32", + "ECommerce.city": "Lorain", + "ECommerce.customerId": "GA-14725", + "ECommerce.customerName": "Customer 19", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderId": "CA-2017-145660", - "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", - "ECommerce.profit": 1.7352, - "ECommerce.quantity": 2, - "ECommerce.rowId": 6205, - "ECommerce.sales": 7.712, + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderId": "CA-2017-107503", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.profit": 8.5568, + "ECommerce.quantity": 4, + "ECommerce.rowId": 849, + "ECommerce.sales": 48.896, "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Oakland", - "ECommerce.customerId": "BB-11545", - "ECommerce.customerName": "Customer 5", + "ECommerce.city": "Olympia", + "ECommerce.customerId": "PF-19165", + "ECommerce.customerName": "Customer 36", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-02T00:00:00.000", - "ECommerce.orderId": "CA-2017-102379", - "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "ECommerce.profit": 44.975, - "ECommerce.quantity": 5, - "ECommerce.rowId": 6272, - "ECommerce.sales": 179.9, - "ECommerce.subCategory": "Art", + "ECommerce.orderDate": "2020-06-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-118437", + "ECommerce.productName": "Project Tote Personal File", + "ECommerce.profit": 4.0687, + "ECommerce.quantity": 1, + "ECommerce.rowId": 1013, + "ECommerce.sales": 14.03, + "ECommerce.subCategory": "Storage", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Baltimore", - "ECommerce.customerId": "AJ-10780", - "ECommerce.customerName": "Customer 2", + "ECommerce.category": "Furniture", + "ECommerce.city": "Vancouver", + "ECommerce.customerId": "JW-15220", + "ECommerce.customerName": "Customer 26", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-14T00:00:00.000", - "ECommerce.orderId": "US-2017-133361", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.profit": 1.0904, + "ECommerce.orderDate": "2020-10-30T00:00:00.000", + "ECommerce.orderId": "CA-2017-139661", + "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", + "ECommerce.profit": 3.6632, "ECommerce.quantity": 2, - "ECommerce.rowId": 6459, - "ECommerce.sales": 3.76, - "ECommerce.subCategory": "Art", + "ECommerce.rowId": 1494, + "ECommerce.sales": 9.64, + "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Arlington", - "ECommerce.customerId": "BF-11020", - "ECommerce.customerName": "Customer 6", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "ML-17755", + "ECommerce.customerName": "Customer 33", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-09-08T00:00:00.000", - "ECommerce.orderId": "US-2017-124779", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.profit": 15.498, - "ECommerce.quantity": 5, - "ECommerce.rowId": 6651, - "ECommerce.sales": 45.92, + "ECommerce.orderDate": "2020-06-25T00:00:00.000", + "ECommerce.orderId": "CA-2017-133648", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.profit": -2.1195, + "ECommerce.quantity": 3, + "ECommerce.rowId": 1995, + "ECommerce.sales": 11.304, "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Houston", - "ECommerce.customerId": "HK-14890", - "ECommerce.customerName": "Customer 22", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "KN-16705", + "ECommerce.customerName": "Customer 28", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-03-26T00:00:00.000", - "ECommerce.orderId": "US-2017-141677", - "ECommerce.productName": "Canon PC1080F Personal Copier", - "ECommerce.profit": 569.9905, - "ECommerce.quantity": 5, - "ECommerce.rowId": 7174, - "ECommerce.sales": 2399.96, - "ECommerce.subCategory": "Copiers", + "ECommerce.orderDate": "2020-09-23T00:00:00.000", + "ECommerce.orderId": "CA-2017-138422", + "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", + "ECommerce.profit": 5.2026, + "ECommerce.quantity": 3, + "ECommerce.rowId": 2329, + "ECommerce.sales": 14.352, + "ECommerce.subCategory": "Envelopes", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "LR-16915", - "ECommerce.customerName": "Customer 30", - "ECommerce.discount": 0.5, - "ECommerce.orderDate": "2020-12-04T00:00:00.000", - "ECommerce.orderId": "CA-2017-109183", - "ECommerce.productName": "Okidata C610n Printer", - "ECommerce.profit": -272.58, - "ECommerce.quantity": 2, - "ECommerce.rowId": 7293, - "ECommerce.sales": 649, - "ECommerce.subCategory": "Machines", + "ECommerce.city": "New York City", + "ECommerce.customerId": "DB-13405", + "ECommerce.customerName": "Customer 15", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-03-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-140949", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", + "ECommerce.profit": 13.604, + "ECommerce.quantity": 8, + "ECommerce.rowId": 2455, + "ECommerce.sales": 71.6, + "ECommerce.subCategory": "Accessories", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "New York City", - "ECommerce.customerId": "MM-18280", - "ECommerce.customerName": "Customer 34", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "BM-11650", + "ECommerce.customerName": "Customer 8", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-10T00:00:00.000", - "ECommerce.orderId": "CA-2017-112172", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.profit": 0.7065, - "ECommerce.quantity": 3, - "ECommerce.rowId": 7310, - "ECommerce.sales": 14.13, - "ECommerce.subCategory": "Fasteners", + "ECommerce.orderDate": "2020-05-13T00:00:00.000", + "ECommerce.orderId": "CA-2017-149048", + "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", + "ECommerce.profit": 81.432, + "ECommerce.quantity": 2, + "ECommerce.rowId": 2595, + "ECommerce.sales": 180.96, + "ECommerce.subCategory": "Envelopes", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Philadelphia", - "ECommerce.customerId": "BS-11755", - "ECommerce.customerName": "Customer 10", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-04-10T00:00:00.000", - "ECommerce.orderId": "CA-2017-135069", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": 6.4176, + "ECommerce.city": "Provo", + "ECommerce.customerId": "AS-10225", + "ECommerce.customerName": "Customer 3", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-09-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-112515", + "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "ECommerce.profit": 77.5764, "ECommerce.quantity": 3, - "ECommerce.rowId": 7425, - "ECommerce.sales": 36.672, - "ECommerce.subCategory": "Furnishings", + "ECommerce.rowId": 2655, + "ECommerce.sales": 1292.94, + "ECommerce.subCategory": "Bookcases", }, Object { "ECommerce.category": "Technology", "ECommerce.city": "Columbus", - "ECommerce.customerId": "BF-11170", - "ECommerce.customerName": "Customer 7", + "ECommerce.customerId": "DG-13300", + "ECommerce.customerName": "Customer 16", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-14T00:00:00.000", - "ECommerce.orderId": "CA-2017-151799", - "ECommerce.productName": "Canon PC1080F Personal Copier", - "ECommerce.profit": 467.9922, - "ECommerce.quantity": 2, - "ECommerce.rowId": 7698, - "ECommerce.sales": 1199.98, - "ECommerce.subCategory": "Copiers", - }, - Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "Lakewood", - "ECommerce.customerId": "NP-18670", - "ECommerce.customerName": "Customer 35", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-10-12T00:00:00.000", - "ECommerce.orderId": "CA-2017-150091", - "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "ECommerce.profit": 129.294, - "ECommerce.quantity": 5, - "ECommerce.rowId": 8425, - "ECommerce.sales": 2154.9, - "ECommerce.subCategory": "Bookcases", - }, - Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "Dallas", - "ECommerce.customerId": "LC-17050", - "ECommerce.customerName": "Customer 29", - "ECommerce.discount": 0.6, - "ECommerce.orderDate": "2020-11-06T00:00:00.000", - "ECommerce.orderId": "US-2017-119319", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": -19.864, - "ECommerce.quantity": 5, - "ECommerce.rowId": 8621, - "ECommerce.sales": 30.56, - "ECommerce.subCategory": "Furnishings", - }, - Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Decatur", - "ECommerce.customerId": "JS-16030", - "ECommerce.customerName": "Customer 25", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-02-16T00:00:00.000", - "ECommerce.orderId": "CA-2017-163265", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.profit": 6.1992, - "ECommerce.quantity": 2, - "ECommerce.rowId": 8673, - "ECommerce.sales": 18.368, - "ECommerce.subCategory": "Fasteners", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "TS-21205", - "ECommerce.customerName": "Customer 40", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-06-15T00:00:00.000", - "ECommerce.orderId": "CA-2017-119284", - "ECommerce.productName": "HTC One", - "ECommerce.profit": 26.9973, - "ECommerce.quantity": 3, - "ECommerce.rowId": 8697, - "ECommerce.sales": 239.976, + "ECommerce.orderDate": "2020-11-28T00:00:00.000", + "ECommerce.orderId": "CA-2017-123372", + "ECommerce.productName": "Google Nexus 5", + "ECommerce.profit": 494.9725, + "ECommerce.quantity": 11, + "ECommerce.rowId": 2661, + "ECommerce.sales": 1979.89, "ECommerce.subCategory": "Phones", }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Morristown", - "ECommerce.customerId": "GZ-14470", - "ECommerce.customerName": "Customer 20", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-126928", - "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "ECommerce.profit": 225.6, - "ECommerce.quantity": 4, - "ECommerce.rowId": 8878, - "ECommerce.sales": 480, - "ECommerce.subCategory": "Machines", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "JH-15430", - "ECommerce.customerName": "Customer 23", - "ECommerce.discount": 0.5, - "ECommerce.orderDate": "2020-12-25T00:00:00.000", - "ECommerce.orderId": "CA-2017-105620", - "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "ECommerce.profit": -7.2, - "ECommerce.quantity": 2, - "ECommerce.rowId": 8958, - "ECommerce.sales": 120, - "ECommerce.subCategory": "Machines", - }, - Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "New York City", - "ECommerce.customerId": "CD-12280", - "ECommerce.customerName": "Customer 13", - "ECommerce.discount": 0.1, - "ECommerce.orderDate": "2020-11-05T00:00:00.000", - "ECommerce.orderId": "CA-2017-102925", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.profit": 24.2012, - "ECommerce.quantity": 2, - "ECommerce.rowId": 9473, - "ECommerce.sales": 128.124, - "ECommerce.subCategory": "Chairs", - }, - Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "New York City", - "ECommerce.customerId": "SB-20185", - "ECommerce.customerName": "Customer 37", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-06-25T00:00:00.000", - "ECommerce.orderId": "CA-2017-116127", - "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", - "ECommerce.profit": -5.0098, - "ECommerce.quantity": 1, - "ECommerce.rowId": 9584, - "ECommerce.sales": 400.784, - "ECommerce.subCategory": "Bookcases", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "BS-11380", - "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.4, - "ECommerce.orderDate": "2020-11-16T00:00:00.000", - "ECommerce.orderId": "CA-2017-160633", - "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", - "ECommerce.profit": 74.9985, - "ECommerce.quantity": 3, - "ECommerce.rowId": 9618, - "ECommerce.sales": 899.982, - "ECommerce.subCategory": "Copiers", - }, - Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Bowling", - "ECommerce.customerId": "BS-11380", - "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-11-16T00:00:00.000", - "ECommerce.orderId": "CA-2017-160633", - "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "ECommerce.profit": 5.397, - "ECommerce.quantity": 3, - "ECommerce.rowId": 9619, - "ECommerce.sales": 86.352, - "ECommerce.subCategory": "Art", - }, ] `; -exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + limit 1`] = ` +exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + order 1`] = ` Array [ Object { "ECommerce.category": "Furniture", @@ -6390,11 +6190,6 @@ Array [ "ECommerce.sales": 1979.89, "ECommerce.subCategory": "Phones", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + order + limit + total + offset 1`] = ` -Array [ Object { "ECommerce.category": "Furniture", "ECommerce.city": "Glendale", @@ -6545,3089 +6340,2525 @@ Array [ "ECommerce.sales": 539.97, "ECommerce.subCategory": "Phones", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + order + limit + total 1`] = ` -Array [ Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "Detroit", - "ECommerce.customerId": "MC-17605", - "ECommerce.customerName": "Customer 31", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "WB-21850", + "ECommerce.customerName": "Customer 41", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-01-23T00:00:00.000", - "ECommerce.orderId": "CA-2017-145142", - "ECommerce.productName": "Balt Solid Wood Rectangular Table", - "ECommerce.profit": 21.098, - "ECommerce.quantity": 2, - "ECommerce.rowId": 523, - "ECommerce.sales": 210.98, - "ECommerce.subCategory": "Tables", - }, - Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "Lorain", - "ECommerce.customerId": "GA-14725", - "ECommerce.customerName": "Customer 19", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderId": "CA-2017-107503", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": 8.5568, + "ECommerce.orderDate": "2020-11-11T00:00:00.000", + "ECommerce.orderId": "CA-2017-120327", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.profit": 21.5824, "ECommerce.quantity": 4, - "ECommerce.rowId": 849, - "ECommerce.sales": 48.896, - "ECommerce.subCategory": "Furnishings", + "ECommerce.rowId": 4227, + "ECommerce.sales": 45.92, + "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Olympia", - "ECommerce.customerId": "PF-19165", - "ECommerce.customerName": "Customer 36", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "TB-21175", + "ECommerce.customerName": "Customer 39", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-118437", - "ECommerce.productName": "Project Tote Personal File", - "ECommerce.profit": 4.0687, - "ECommerce.quantity": 1, - "ECommerce.rowId": 1013, - "ECommerce.sales": 14.03, - "ECommerce.subCategory": "Storage", + "ECommerce.orderDate": "2020-11-02T00:00:00.000", + "ECommerce.orderId": "CA-2017-143567", + "ECommerce.productName": "Logitech di_Novo Edge Keyboard", + "ECommerce.profit": 517.4793, + "ECommerce.quantity": 9, + "ECommerce.rowId": 4882, + "ECommerce.sales": 2249.91, + "ECommerce.subCategory": "Accessories", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Vancouver", - "ECommerce.customerId": "JW-15220", - "ECommerce.customerName": "Customer 26", + "ECommerce.city": "Detroit", + "ECommerce.customerId": "CA-12775", + "ECommerce.customerName": "Customer 11", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-10-30T00:00:00.000", - "ECommerce.orderId": "CA-2017-139661", - "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", - "ECommerce.profit": 3.6632, - "ECommerce.quantity": 2, - "ECommerce.rowId": 1494, - "ECommerce.sales": 9.64, - "ECommerce.subCategory": "Furnishings", + "ECommerce.orderDate": "2020-09-01T00:00:00.000", + "ECommerce.orderId": "CA-2017-145653", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.profit": 134.5302, + "ECommerce.quantity": 7, + "ECommerce.rowId": 5220, + "ECommerce.sales": 498.26, + "ECommerce.subCategory": "Chairs", }, Object { - "ECommerce.category": "Office Supplies", + "ECommerce.category": "Technology", "ECommerce.city": "Columbus", - "ECommerce.customerId": "ML-17755", - "ECommerce.customerName": "Customer 33", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-06-25T00:00:00.000", - "ECommerce.orderId": "CA-2017-133648", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.profit": -2.1195, - "ECommerce.quantity": 3, - "ECommerce.rowId": 1995, - "ECommerce.sales": 11.304, - "ECommerce.subCategory": "Fasteners", - }, - Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "KN-16705", - "ECommerce.customerName": "Customer 28", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-09-23T00:00:00.000", - "ECommerce.orderId": "CA-2017-138422", - "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", - "ECommerce.profit": 5.2026, - "ECommerce.quantity": 3, - "ECommerce.rowId": 2329, - "ECommerce.sales": 14.352, - "ECommerce.subCategory": "Envelopes", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "New York City", - "ECommerce.customerId": "DB-13405", - "ECommerce.customerName": "Customer 15", + "ECommerce.customerId": "KL-16555", + "ECommerce.customerName": "Customer 27", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-03-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-140949", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", - "ECommerce.profit": 13.604, - "ECommerce.quantity": 8, - "ECommerce.rowId": 2455, - "ECommerce.sales": 71.6, + "ECommerce.orderDate": "2020-12-14T00:00:00.000", + "ECommerce.orderId": "CA-2017-147333", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", + "ECommerce.profit": 8.5025, + "ECommerce.quantity": 5, + "ECommerce.rowId": 5277, + "ECommerce.sales": 44.75, "ECommerce.subCategory": "Accessories", }, - Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "BM-11650", - "ECommerce.customerName": "Customer 8", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-13T00:00:00.000", - "ECommerce.orderId": "CA-2017-149048", - "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", - "ECommerce.profit": 81.432, - "ECommerce.quantity": 2, - "ECommerce.rowId": 2595, - "ECommerce.sales": 180.96, - "ECommerce.subCategory": "Envelopes", - }, - Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "Provo", - "ECommerce.customerId": "AS-10225", - "ECommerce.customerName": "Customer 3", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-112515", - "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "ECommerce.profit": 77.5764, - "ECommerce.quantity": 3, - "ECommerce.rowId": 2655, - "ECommerce.sales": 1292.94, - "ECommerce.subCategory": "Bookcases", - }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "DG-13300", - "ECommerce.customerName": "Customer 16", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-11-28T00:00:00.000", - "ECommerce.orderId": "CA-2017-123372", - "ECommerce.productName": "Google Nexus 5", - "ECommerce.profit": 494.9725, - "ECommerce.quantity": 11, - "ECommerce.rowId": 2661, - "ECommerce.sales": 1979.89, - "ECommerce.subCategory": "Phones", - }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + order 1`] = ` -Array [ - Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "Detroit", - "ECommerce.customerId": "MC-17605", - "ECommerce.customerName": "Customer 31", + "ECommerce.city": "Los Angeles", + "ECommerce.customerId": "SS-20140", + "ECommerce.customerName": "Customer 38", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-01-23T00:00:00.000", - "ECommerce.orderId": "CA-2017-145142", - "ECommerce.productName": "Balt Solid Wood Rectangular Table", - "ECommerce.profit": 21.098, - "ECommerce.quantity": 2, - "ECommerce.rowId": 523, - "ECommerce.sales": 210.98, - "ECommerce.subCategory": "Tables", + "ECommerce.orderDate": "2020-06-03T00:00:00.000", + "ECommerce.orderId": "CA-2017-145772", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", + "ECommerce.profit": 8.5025, + "ECommerce.quantity": 5, + "ECommerce.rowId": 6125, + "ECommerce.sales": 44.75, + "ECommerce.subCategory": "Accessories", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Lorain", - "ECommerce.customerId": "GA-14725", - "ECommerce.customerName": "Customer 19", + "ECommerce.city": "Marion", + "ECommerce.customerId": "MG-17650", + "ECommerce.customerName": "Customer 32", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderId": "CA-2017-107503", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": 8.5568, - "ECommerce.quantity": 4, - "ECommerce.rowId": 849, - "ECommerce.sales": 48.896, + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderId": "CA-2017-145660", + "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", + "ECommerce.profit": 1.7352, + "ECommerce.quantity": 2, + "ECommerce.rowId": 6205, + "ECommerce.sales": 7.712, "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Olympia", - "ECommerce.customerId": "PF-19165", - "ECommerce.customerName": "Customer 36", + "ECommerce.city": "Oakland", + "ECommerce.customerId": "BB-11545", + "ECommerce.customerName": "Customer 5", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-118437", - "ECommerce.productName": "Project Tote Personal File", - "ECommerce.profit": 4.0687, - "ECommerce.quantity": 1, - "ECommerce.rowId": 1013, - "ECommerce.sales": 14.03, - "ECommerce.subCategory": "Storage", + "ECommerce.orderDate": "2020-12-02T00:00:00.000", + "ECommerce.orderId": "CA-2017-102379", + "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "ECommerce.profit": 44.975, + "ECommerce.quantity": 5, + "ECommerce.rowId": 6272, + "ECommerce.sales": 179.9, + "ECommerce.subCategory": "Art", }, Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "Vancouver", - "ECommerce.customerId": "JW-15220", - "ECommerce.customerName": "Customer 26", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Baltimore", + "ECommerce.customerId": "AJ-10780", + "ECommerce.customerName": "Customer 2", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-10-30T00:00:00.000", - "ECommerce.orderId": "CA-2017-139661", - "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", - "ECommerce.profit": 3.6632, + "ECommerce.orderDate": "2020-05-14T00:00:00.000", + "ECommerce.orderId": "US-2017-133361", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.profit": 1.0904, "ECommerce.quantity": 2, - "ECommerce.rowId": 1494, - "ECommerce.sales": 9.64, - "ECommerce.subCategory": "Furnishings", + "ECommerce.rowId": 6459, + "ECommerce.sales": 3.76, + "ECommerce.subCategory": "Art", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "ML-17755", - "ECommerce.customerName": "Customer 33", + "ECommerce.city": "Arlington", + "ECommerce.customerId": "BF-11020", + "ECommerce.customerName": "Customer 6", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-06-25T00:00:00.000", - "ECommerce.orderId": "CA-2017-133648", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.profit": -2.1195, - "ECommerce.quantity": 3, - "ECommerce.rowId": 1995, - "ECommerce.sales": 11.304, + "ECommerce.orderDate": "2020-09-08T00:00:00.000", + "ECommerce.orderId": "US-2017-124779", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.profit": 15.498, + "ECommerce.quantity": 5, + "ECommerce.rowId": 6651, + "ECommerce.sales": 45.92, "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "KN-16705", - "ECommerce.customerName": "Customer 28", + "ECommerce.category": "Technology", + "ECommerce.city": "Houston", + "ECommerce.customerId": "HK-14890", + "ECommerce.customerName": "Customer 22", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-09-23T00:00:00.000", - "ECommerce.orderId": "CA-2017-138422", - "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", - "ECommerce.profit": 5.2026, - "ECommerce.quantity": 3, - "ECommerce.rowId": 2329, - "ECommerce.sales": 14.352, - "ECommerce.subCategory": "Envelopes", + "ECommerce.orderDate": "2020-03-26T00:00:00.000", + "ECommerce.orderId": "US-2017-141677", + "ECommerce.productName": "Canon PC1080F Personal Copier", + "ECommerce.profit": 569.9905, + "ECommerce.quantity": 5, + "ECommerce.rowId": 7174, + "ECommerce.sales": 2399.96, + "ECommerce.subCategory": "Copiers", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "New York City", - "ECommerce.customerId": "DB-13405", - "ECommerce.customerName": "Customer 15", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-03-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-140949", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", - "ECommerce.profit": 13.604, - "ECommerce.quantity": 8, - "ECommerce.rowId": 2455, - "ECommerce.sales": 71.6, - "ECommerce.subCategory": "Accessories", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "LR-16915", + "ECommerce.customerName": "Customer 30", + "ECommerce.discount": 0.5, + "ECommerce.orderDate": "2020-12-04T00:00:00.000", + "ECommerce.orderId": "CA-2017-109183", + "ECommerce.productName": "Okidata C610n Printer", + "ECommerce.profit": -272.58, + "ECommerce.quantity": 2, + "ECommerce.rowId": 7293, + "ECommerce.sales": 649, + "ECommerce.subCategory": "Machines", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "BM-11650", - "ECommerce.customerName": "Customer 8", + "ECommerce.city": "New York City", + "ECommerce.customerId": "MM-18280", + "ECommerce.customerName": "Customer 34", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-13T00:00:00.000", - "ECommerce.orderId": "CA-2017-149048", - "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", - "ECommerce.profit": 81.432, - "ECommerce.quantity": 2, - "ECommerce.rowId": 2595, - "ECommerce.sales": 180.96, - "ECommerce.subCategory": "Envelopes", + "ECommerce.orderDate": "2020-06-10T00:00:00.000", + "ECommerce.orderId": "CA-2017-112172", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.profit": 0.7065, + "ECommerce.quantity": 3, + "ECommerce.rowId": 7310, + "ECommerce.sales": 14.13, + "ECommerce.subCategory": "Fasteners", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Provo", - "ECommerce.customerId": "AS-10225", - "ECommerce.customerName": "Customer 3", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-112515", - "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "ECommerce.profit": 77.5764, + "ECommerce.city": "Philadelphia", + "ECommerce.customerId": "BS-11755", + "ECommerce.customerName": "Customer 10", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-04-10T00:00:00.000", + "ECommerce.orderId": "CA-2017-135069", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.profit": 6.4176, "ECommerce.quantity": 3, - "ECommerce.rowId": 2655, - "ECommerce.sales": 1292.94, - "ECommerce.subCategory": "Bookcases", + "ECommerce.rowId": 7425, + "ECommerce.sales": 36.672, + "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Technology", "ECommerce.city": "Columbus", - "ECommerce.customerId": "DG-13300", - "ECommerce.customerName": "Customer 16", + "ECommerce.customerId": "BF-11170", + "ECommerce.customerName": "Customer 7", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-11-28T00:00:00.000", - "ECommerce.orderId": "CA-2017-123372", - "ECommerce.productName": "Google Nexus 5", - "ECommerce.profit": 494.9725, - "ECommerce.quantity": 11, - "ECommerce.rowId": 2661, - "ECommerce.sales": 1979.89, - "ECommerce.subCategory": "Phones", + "ECommerce.orderDate": "2020-12-14T00:00:00.000", + "ECommerce.orderId": "CA-2017-151799", + "ECommerce.productName": "Canon PC1080F Personal Copier", + "ECommerce.profit": 467.9922, + "ECommerce.quantity": 2, + "ECommerce.rowId": 7698, + "ECommerce.sales": 1199.98, + "ECommerce.subCategory": "Copiers", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Glendale", - "ECommerce.customerId": "EM-14140", - "ECommerce.customerName": "Customer 18", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-11-12T00:00:00.000", - "ECommerce.orderId": "CA-2017-134915", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.profit": 9.9652, - "ECommerce.quantity": 2, - "ECommerce.rowId": 2952, - "ECommerce.sales": 113.888, - "ECommerce.subCategory": "Chairs", + "ECommerce.city": "Lakewood", + "ECommerce.customerId": "NP-18670", + "ECommerce.customerName": "Customer 35", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-10-12T00:00:00.000", + "ECommerce.orderId": "CA-2017-150091", + "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "ECommerce.profit": 129.294, + "ECommerce.quantity": 5, + "ECommerce.rowId": 8425, + "ECommerce.sales": 2154.9, + "ECommerce.subCategory": "Bookcases", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "San Francisco", - "ECommerce.customerId": "HH-15010", - "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-10-19T00:00:00.000", - "ECommerce.orderId": "CA-2017-131492", + "ECommerce.city": "Dallas", + "ECommerce.customerId": "LC-17050", + "ECommerce.customerName": "Customer 29", + "ECommerce.discount": 0.6, + "ECommerce.orderDate": "2020-11-06T00:00:00.000", + "ECommerce.orderId": "US-2017-119319", "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": 10.3904, - "ECommerce.quantity": 2, - "ECommerce.rowId": 3059, + "ECommerce.profit": -19.864, + "ECommerce.quantity": 5, + "ECommerce.rowId": 8621, "ECommerce.sales": 30.56, "ECommerce.subCategory": "Furnishings", }, Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "San Francisco", - "ECommerce.customerId": "HH-15010", - "ECommerce.customerName": "Customer 21", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Decatur", + "ECommerce.customerId": "JS-16030", + "ECommerce.customerName": "Customer 25", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-10-19T00:00:00.000", - "ECommerce.orderId": "CA-2017-131492", - "ECommerce.productName": "Anderson Hickey Conga Table Tops & Accessories", - "ECommerce.profit": -3.3506, + "ECommerce.orderDate": "2020-02-16T00:00:00.000", + "ECommerce.orderId": "CA-2017-163265", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.profit": 6.1992, "ECommerce.quantity": 2, - "ECommerce.rowId": 3060, - "ECommerce.sales": 24.368, - "ECommerce.subCategory": "Tables", + "ECommerce.rowId": 8673, + "ECommerce.sales": 18.368, + "ECommerce.subCategory": "Fasteners", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Louisville", - "ECommerce.customerId": "DW-13480", - "ECommerce.customerName": "Customer 17", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-27T00:00:00.000", - "ECommerce.orderId": "US-2017-132297", - "ECommerce.productName": "Google Nexus 6", - "ECommerce.profit": 134.9925, + "ECommerce.city": "Columbus", + "ECommerce.customerId": "TS-21205", + "ECommerce.customerName": "Customer 40", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-06-15T00:00:00.000", + "ECommerce.orderId": "CA-2017-119284", + "ECommerce.productName": "HTC One", + "ECommerce.profit": 26.9973, "ECommerce.quantity": 3, - "ECommerce.rowId": 3083, - "ECommerce.sales": 539.97, + "ECommerce.rowId": 8697, + "ECommerce.sales": 239.976, "ECommerce.subCategory": "Phones", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Auburn", - "ECommerce.customerId": "KN-16705", - "ECommerce.customerName": "Customer 28", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-11T00:00:00.000", - "ECommerce.orderId": "CA-2017-102554", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.profit": 1.0904, - "ECommerce.quantity": 2, - "ECommerce.rowId": 3448, - "ECommerce.sales": 3.76, - "ECommerce.subCategory": "Art", - }, - Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Omaha", - "ECommerce.customerId": "JO-15550", - "ECommerce.customerName": "Customer 24", + "ECommerce.category": "Technology", + "ECommerce.city": "Morristown", + "ECommerce.customerId": "GZ-14470", + "ECommerce.customerName": "Customer 20", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-29T00:00:00.000", - "ECommerce.orderId": "CA-2017-144568", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.profit": 1.1775, - "ECommerce.quantity": 5, - "ECommerce.rowId": 3717, - "ECommerce.sales": 23.55, - "ECommerce.subCategory": "Fasteners", + "ECommerce.orderDate": "2020-09-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-126928", + "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "ECommerce.profit": 225.6, + "ECommerce.quantity": 4, + "ECommerce.rowId": 8878, + "ECommerce.sales": 480, + "ECommerce.subCategory": "Machines", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Bakersfield", - "ECommerce.customerId": "AW-10840", - "ECommerce.customerName": "Customer 4", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-02T00:00:00.000", - "ECommerce.orderId": "CA-2017-123001", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.profit": 2.726, - "ECommerce.quantity": 5, - "ECommerce.rowId": 3934, - "ECommerce.sales": 9.4, - "ECommerce.subCategory": "Art", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "JH-15430", + "ECommerce.customerName": "Customer 23", + "ECommerce.discount": 0.5, + "ECommerce.orderDate": "2020-12-25T00:00:00.000", + "ECommerce.orderId": "CA-2017-105620", + "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "ECommerce.profit": -7.2, + "ECommerce.quantity": 2, + "ECommerce.rowId": 8958, + "ECommerce.sales": 120, + "ECommerce.subCategory": "Machines", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Philadelphia", - "ECommerce.customerId": "CC-12475", - "ECommerce.customerName": "Customer 12", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-11-21T00:00:00.000", - "ECommerce.orderId": "CA-2017-100811", - "ECommerce.productName": "Recycled Eldon Regeneration Jumbo File", - "ECommerce.profit": 3.9296, - "ECommerce.quantity": 4, - "ECommerce.rowId": 4012, - "ECommerce.sales": 39.296, - "ECommerce.subCategory": "Storage", + "ECommerce.category": "Furniture", + "ECommerce.city": "New York City", + "ECommerce.customerId": "CD-12280", + "ECommerce.customerName": "Customer 13", + "ECommerce.discount": 0.1, + "ECommerce.orderDate": "2020-11-05T00:00:00.000", + "ECommerce.orderId": "CA-2017-102925", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.profit": 24.2012, + "ECommerce.quantity": 2, + "ECommerce.rowId": 9473, + "ECommerce.sales": 128.124, + "ECommerce.subCategory": "Chairs", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Lafayette", - "ECommerce.customerId": "CS-12355", - "ECommerce.customerName": "Customer 14", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-24T00:00:00.000", - "ECommerce.orderId": "CA-2017-124296", - "ECommerce.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", - "ECommerce.profit": 60.5488, - "ECommerce.quantity": 4, - "ECommerce.rowId": 4031, - "ECommerce.sales": 232.88, - "ECommerce.subCategory": "Chairs", + "ECommerce.city": "New York City", + "ECommerce.customerId": "SB-20185", + "ECommerce.customerName": "Customer 37", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-06-25T00:00:00.000", + "ECommerce.orderId": "CA-2017-116127", + "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", + "ECommerce.profit": -5.0098, + "ECommerce.quantity": 1, + "ECommerce.rowId": 9584, + "ECommerce.sales": 400.784, + "ECommerce.subCategory": "Bookcases", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "New York City", - "ECommerce.customerId": "AH-10465", - "ECommerce.customerName": "Customer 1", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-14T00:00:00.000", - "ECommerce.orderId": "CA-2017-115546", - "ECommerce.productName": "Google Nexus 7", - "ECommerce.profit": 134.9925, + "ECommerce.city": "Columbus", + "ECommerce.customerId": "BS-11380", + "ECommerce.customerName": "Customer 9", + "ECommerce.discount": 0.4, + "ECommerce.orderDate": "2020-11-16T00:00:00.000", + "ECommerce.orderId": "CA-2017-160633", + "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", + "ECommerce.profit": 74.9985, "ECommerce.quantity": 3, - "ECommerce.rowId": 4161, - "ECommerce.sales": 539.97, - "ECommerce.subCategory": "Phones", + "ECommerce.rowId": 9618, + "ECommerce.sales": 899.982, + "ECommerce.subCategory": "Copiers", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "WB-21850", - "ECommerce.customerName": "Customer 41", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-11-11T00:00:00.000", - "ECommerce.orderId": "CA-2017-120327", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.profit": 21.5824, - "ECommerce.quantity": 4, - "ECommerce.rowId": 4227, - "ECommerce.sales": 45.92, - "ECommerce.subCategory": "Fasteners", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "TB-21175", - "ECommerce.customerName": "Customer 39", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-11-02T00:00:00.000", - "ECommerce.orderId": "CA-2017-143567", - "ECommerce.productName": "Logitech di_Novo Edge Keyboard", - "ECommerce.profit": 517.4793, - "ECommerce.quantity": 9, - "ECommerce.rowId": 4882, - "ECommerce.sales": 2249.91, - "ECommerce.subCategory": "Accessories", + "ECommerce.city": "Bowling", + "ECommerce.customerId": "BS-11380", + "ECommerce.customerName": "Customer 9", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-11-16T00:00:00.000", + "ECommerce.orderId": "CA-2017-160633", + "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "ECommerce.profit": 5.397, + "ECommerce.quantity": 3, + "ECommerce.rowId": 9619, + "ECommerce.sales": 86.352, + "ECommerce.subCategory": "Art", }, +] +`; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + total 1`] = ` +Array [ Object { "ECommerce.category": "Furniture", "ECommerce.city": "Detroit", - "ECommerce.customerId": "CA-12775", - "ECommerce.customerName": "Customer 11", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-01T00:00:00.000", - "ECommerce.orderId": "CA-2017-145653", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.profit": 134.5302, - "ECommerce.quantity": 7, - "ECommerce.rowId": 5220, - "ECommerce.sales": 498.26, - "ECommerce.subCategory": "Chairs", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "KL-16555", - "ECommerce.customerName": "Customer 27", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-14T00:00:00.000", - "ECommerce.orderId": "CA-2017-147333", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", - "ECommerce.profit": 8.5025, - "ECommerce.quantity": 5, - "ECommerce.rowId": 5277, - "ECommerce.sales": 44.75, - "ECommerce.subCategory": "Accessories", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Los Angeles", - "ECommerce.customerId": "SS-20140", - "ECommerce.customerName": "Customer 38", + "ECommerce.customerId": "MC-17605", + "ECommerce.customerName": "Customer 31", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-03T00:00:00.000", - "ECommerce.orderId": "CA-2017-145772", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", - "ECommerce.profit": 8.5025, - "ECommerce.quantity": 5, - "ECommerce.rowId": 6125, - "ECommerce.sales": 44.75, - "ECommerce.subCategory": "Accessories", + "ECommerce.orderDate": "2020-01-23T00:00:00.000", + "ECommerce.orderId": "CA-2017-145142", + "ECommerce.productName": "Balt Solid Wood Rectangular Table", + "ECommerce.profit": 21.098, + "ECommerce.quantity": 2, + "ECommerce.rowId": 523, + "ECommerce.sales": 210.98, + "ECommerce.subCategory": "Tables", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Marion", - "ECommerce.customerId": "MG-17650", - "ECommerce.customerName": "Customer 32", + "ECommerce.city": "Lorain", + "ECommerce.customerId": "GA-14725", + "ECommerce.customerName": "Customer 19", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderId": "CA-2017-145660", - "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", - "ECommerce.profit": 1.7352, - "ECommerce.quantity": 2, - "ECommerce.rowId": 6205, - "ECommerce.sales": 7.712, + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderId": "CA-2017-107503", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.profit": 8.5568, + "ECommerce.quantity": 4, + "ECommerce.rowId": 849, + "ECommerce.sales": 48.896, "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Oakland", - "ECommerce.customerId": "BB-11545", - "ECommerce.customerName": "Customer 5", + "ECommerce.city": "Olympia", + "ECommerce.customerId": "PF-19165", + "ECommerce.customerName": "Customer 36", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-02T00:00:00.000", - "ECommerce.orderId": "CA-2017-102379", - "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "ECommerce.profit": 44.975, - "ECommerce.quantity": 5, - "ECommerce.rowId": 6272, - "ECommerce.sales": 179.9, - "ECommerce.subCategory": "Art", + "ECommerce.orderDate": "2020-06-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-118437", + "ECommerce.productName": "Project Tote Personal File", + "ECommerce.profit": 4.0687, + "ECommerce.quantity": 1, + "ECommerce.rowId": 1013, + "ECommerce.sales": 14.03, + "ECommerce.subCategory": "Storage", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Baltimore", - "ECommerce.customerId": "AJ-10780", - "ECommerce.customerName": "Customer 2", + "ECommerce.category": "Furniture", + "ECommerce.city": "Vancouver", + "ECommerce.customerId": "JW-15220", + "ECommerce.customerName": "Customer 26", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-14T00:00:00.000", - "ECommerce.orderId": "US-2017-133361", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.profit": 1.0904, + "ECommerce.orderDate": "2020-10-30T00:00:00.000", + "ECommerce.orderId": "CA-2017-139661", + "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", + "ECommerce.profit": 3.6632, "ECommerce.quantity": 2, - "ECommerce.rowId": 6459, - "ECommerce.sales": 3.76, - "ECommerce.subCategory": "Art", + "ECommerce.rowId": 1494, + "ECommerce.sales": 9.64, + "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Arlington", - "ECommerce.customerId": "BF-11020", - "ECommerce.customerName": "Customer 6", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "ML-17755", + "ECommerce.customerName": "Customer 33", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-09-08T00:00:00.000", - "ECommerce.orderId": "US-2017-124779", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.profit": 15.498, - "ECommerce.quantity": 5, - "ECommerce.rowId": 6651, - "ECommerce.sales": 45.92, + "ECommerce.orderDate": "2020-06-25T00:00:00.000", + "ECommerce.orderId": "CA-2017-133648", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.profit": -2.1195, + "ECommerce.quantity": 3, + "ECommerce.rowId": 1995, + "ECommerce.sales": 11.304, "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Houston", - "ECommerce.customerId": "HK-14890", - "ECommerce.customerName": "Customer 22", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "KN-16705", + "ECommerce.customerName": "Customer 28", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-03-26T00:00:00.000", - "ECommerce.orderId": "US-2017-141677", - "ECommerce.productName": "Canon PC1080F Personal Copier", - "ECommerce.profit": 569.9905, - "ECommerce.quantity": 5, - "ECommerce.rowId": 7174, - "ECommerce.sales": 2399.96, - "ECommerce.subCategory": "Copiers", + "ECommerce.orderDate": "2020-09-23T00:00:00.000", + "ECommerce.orderId": "CA-2017-138422", + "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", + "ECommerce.profit": 5.2026, + "ECommerce.quantity": 3, + "ECommerce.rowId": 2329, + "ECommerce.sales": 14.352, + "ECommerce.subCategory": "Envelopes", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "LR-16915", - "ECommerce.customerName": "Customer 30", - "ECommerce.discount": 0.5, - "ECommerce.orderDate": "2020-12-04T00:00:00.000", - "ECommerce.orderId": "CA-2017-109183", - "ECommerce.productName": "Okidata C610n Printer", - "ECommerce.profit": -272.58, - "ECommerce.quantity": 2, - "ECommerce.rowId": 7293, - "ECommerce.sales": 649, - "ECommerce.subCategory": "Machines", + "ECommerce.city": "New York City", + "ECommerce.customerId": "DB-13405", + "ECommerce.customerName": "Customer 15", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-03-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-140949", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", + "ECommerce.profit": 13.604, + "ECommerce.quantity": 8, + "ECommerce.rowId": 2455, + "ECommerce.sales": 71.6, + "ECommerce.subCategory": "Accessories", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "New York City", - "ECommerce.customerId": "MM-18280", - "ECommerce.customerName": "Customer 34", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "BM-11650", + "ECommerce.customerName": "Customer 8", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-10T00:00:00.000", - "ECommerce.orderId": "CA-2017-112172", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.profit": 0.7065, - "ECommerce.quantity": 3, - "ECommerce.rowId": 7310, - "ECommerce.sales": 14.13, - "ECommerce.subCategory": "Fasteners", + "ECommerce.orderDate": "2020-05-13T00:00:00.000", + "ECommerce.orderId": "CA-2017-149048", + "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", + "ECommerce.profit": 81.432, + "ECommerce.quantity": 2, + "ECommerce.rowId": 2595, + "ECommerce.sales": 180.96, + "ECommerce.subCategory": "Envelopes", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Philadelphia", - "ECommerce.customerId": "BS-11755", - "ECommerce.customerName": "Customer 10", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-04-10T00:00:00.000", - "ECommerce.orderId": "CA-2017-135069", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": 6.4176, + "ECommerce.city": "Provo", + "ECommerce.customerId": "AS-10225", + "ECommerce.customerName": "Customer 3", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-09-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-112515", + "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "ECommerce.profit": 77.5764, "ECommerce.quantity": 3, - "ECommerce.rowId": 7425, - "ECommerce.sales": 36.672, - "ECommerce.subCategory": "Furnishings", + "ECommerce.rowId": 2655, + "ECommerce.sales": 1292.94, + "ECommerce.subCategory": "Bookcases", }, Object { "ECommerce.category": "Technology", "ECommerce.city": "Columbus", - "ECommerce.customerId": "BF-11170", - "ECommerce.customerName": "Customer 7", + "ECommerce.customerId": "DG-13300", + "ECommerce.customerName": "Customer 16", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-14T00:00:00.000", - "ECommerce.orderId": "CA-2017-151799", - "ECommerce.productName": "Canon PC1080F Personal Copier", - "ECommerce.profit": 467.9922, - "ECommerce.quantity": 2, - "ECommerce.rowId": 7698, - "ECommerce.sales": 1199.98, - "ECommerce.subCategory": "Copiers", + "ECommerce.orderDate": "2020-11-28T00:00:00.000", + "ECommerce.orderId": "CA-2017-123372", + "ECommerce.productName": "Google Nexus 5", + "ECommerce.profit": 494.9725, + "ECommerce.quantity": 11, + "ECommerce.rowId": 2661, + "ECommerce.sales": 1979.89, + "ECommerce.subCategory": "Phones", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Lakewood", - "ECommerce.customerId": "NP-18670", - "ECommerce.customerName": "Customer 35", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-10-12T00:00:00.000", - "ECommerce.orderId": "CA-2017-150091", - "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "ECommerce.profit": 129.294, - "ECommerce.quantity": 5, - "ECommerce.rowId": 8425, - "ECommerce.sales": 2154.9, - "ECommerce.subCategory": "Bookcases", + "ECommerce.city": "Glendale", + "ECommerce.customerId": "EM-14140", + "ECommerce.customerName": "Customer 18", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-11-12T00:00:00.000", + "ECommerce.orderId": "CA-2017-134915", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.profit": 9.9652, + "ECommerce.quantity": 2, + "ECommerce.rowId": 2952, + "ECommerce.sales": 113.888, + "ECommerce.subCategory": "Chairs", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Dallas", - "ECommerce.customerId": "LC-17050", - "ECommerce.customerName": "Customer 29", - "ECommerce.discount": 0.6, - "ECommerce.orderDate": "2020-11-06T00:00:00.000", - "ECommerce.orderId": "US-2017-119319", + "ECommerce.city": "San Francisco", + "ECommerce.customerId": "HH-15010", + "ECommerce.customerName": "Customer 21", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-10-19T00:00:00.000", + "ECommerce.orderId": "CA-2017-131492", "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": -19.864, - "ECommerce.quantity": 5, - "ECommerce.rowId": 8621, + "ECommerce.profit": 10.3904, + "ECommerce.quantity": 2, + "ECommerce.rowId": 3059, "ECommerce.sales": 30.56, "ECommerce.subCategory": "Furnishings", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Decatur", - "ECommerce.customerId": "JS-16030", - "ECommerce.customerName": "Customer 25", + "ECommerce.category": "Furniture", + "ECommerce.city": "San Francisco", + "ECommerce.customerId": "HH-15010", + "ECommerce.customerName": "Customer 21", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-02-16T00:00:00.000", - "ECommerce.orderId": "CA-2017-163265", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.profit": 6.1992, + "ECommerce.orderDate": "2020-10-19T00:00:00.000", + "ECommerce.orderId": "CA-2017-131492", + "ECommerce.productName": "Anderson Hickey Conga Table Tops & Accessories", + "ECommerce.profit": -3.3506, "ECommerce.quantity": 2, - "ECommerce.rowId": 8673, - "ECommerce.sales": 18.368, - "ECommerce.subCategory": "Fasteners", + "ECommerce.rowId": 3060, + "ECommerce.sales": 24.368, + "ECommerce.subCategory": "Tables", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "TS-21205", - "ECommerce.customerName": "Customer 40", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-06-15T00:00:00.000", - "ECommerce.orderId": "CA-2017-119284", - "ECommerce.productName": "HTC One", - "ECommerce.profit": 26.9973, + "ECommerce.city": "Louisville", + "ECommerce.customerId": "DW-13480", + "ECommerce.customerName": "Customer 17", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-05-27T00:00:00.000", + "ECommerce.orderId": "US-2017-132297", + "ECommerce.productName": "Google Nexus 6", + "ECommerce.profit": 134.9925, "ECommerce.quantity": 3, - "ECommerce.rowId": 8697, - "ECommerce.sales": 239.976, + "ECommerce.rowId": 3083, + "ECommerce.sales": 539.97, "ECommerce.subCategory": "Phones", }, Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Morristown", - "ECommerce.customerId": "GZ-14470", - "ECommerce.customerName": "Customer 20", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Auburn", + "ECommerce.customerId": "KN-16705", + "ECommerce.customerName": "Customer 28", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-126928", - "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "ECommerce.profit": 225.6, - "ECommerce.quantity": 4, - "ECommerce.rowId": 8878, - "ECommerce.sales": 480, - "ECommerce.subCategory": "Machines", + "ECommerce.orderDate": "2020-06-11T00:00:00.000", + "ECommerce.orderId": "CA-2017-102554", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.profit": 1.0904, + "ECommerce.quantity": 2, + "ECommerce.rowId": 3448, + "ECommerce.sales": 3.76, + "ECommerce.subCategory": "Art", }, Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "JH-15430", - "ECommerce.customerName": "Customer 23", - "ECommerce.discount": 0.5, - "ECommerce.orderDate": "2020-12-25T00:00:00.000", - "ECommerce.orderId": "CA-2017-105620", - "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "ECommerce.profit": -7.2, - "ECommerce.quantity": 2, - "ECommerce.rowId": 8958, - "ECommerce.sales": 120, - "ECommerce.subCategory": "Machines", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Omaha", + "ECommerce.customerId": "JO-15550", + "ECommerce.customerName": "Customer 24", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-05-29T00:00:00.000", + "ECommerce.orderId": "CA-2017-144568", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.profit": 1.1775, + "ECommerce.quantity": 5, + "ECommerce.rowId": 3717, + "ECommerce.sales": 23.55, + "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "New York City", - "ECommerce.customerId": "CD-12280", - "ECommerce.customerName": "Customer 13", - "ECommerce.discount": 0.1, - "ECommerce.orderDate": "2020-11-05T00:00:00.000", - "ECommerce.orderId": "CA-2017-102925", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.profit": 24.2012, - "ECommerce.quantity": 2, - "ECommerce.rowId": 9473, - "ECommerce.sales": 128.124, - "ECommerce.subCategory": "Chairs", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Bakersfield", + "ECommerce.customerId": "AW-10840", + "ECommerce.customerName": "Customer 4", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-09-02T00:00:00.000", + "ECommerce.orderId": "CA-2017-123001", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.profit": 2.726, + "ECommerce.quantity": 5, + "ECommerce.rowId": 3934, + "ECommerce.sales": 9.4, + "ECommerce.subCategory": "Art", }, Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "New York City", - "ECommerce.customerId": "SB-20185", - "ECommerce.customerName": "Customer 37", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Philadelphia", + "ECommerce.customerId": "CC-12475", + "ECommerce.customerName": "Customer 12", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-06-25T00:00:00.000", - "ECommerce.orderId": "CA-2017-116127", - "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", - "ECommerce.profit": -5.0098, - "ECommerce.quantity": 1, - "ECommerce.rowId": 9584, - "ECommerce.sales": 400.784, - "ECommerce.subCategory": "Bookcases", + "ECommerce.orderDate": "2020-11-21T00:00:00.000", + "ECommerce.orderId": "CA-2017-100811", + "ECommerce.productName": "Recycled Eldon Regeneration Jumbo File", + "ECommerce.profit": 3.9296, + "ECommerce.quantity": 4, + "ECommerce.rowId": 4012, + "ECommerce.sales": 39.296, + "ECommerce.subCategory": "Storage", + }, + Object { + "ECommerce.category": "Furniture", + "ECommerce.city": "Lafayette", + "ECommerce.customerId": "CS-12355", + "ECommerce.customerName": "Customer 14", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-12-24T00:00:00.000", + "ECommerce.orderId": "CA-2017-124296", + "ECommerce.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", + "ECommerce.profit": 60.5488, + "ECommerce.quantity": 4, + "ECommerce.rowId": 4031, + "ECommerce.sales": 232.88, + "ECommerce.subCategory": "Chairs", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "BS-11380", - "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.4, - "ECommerce.orderDate": "2020-11-16T00:00:00.000", - "ECommerce.orderId": "CA-2017-160633", - "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", - "ECommerce.profit": 74.9985, + "ECommerce.city": "New York City", + "ECommerce.customerId": "AH-10465", + "ECommerce.customerName": "Customer 1", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-05-14T00:00:00.000", + "ECommerce.orderId": "CA-2017-115546", + "ECommerce.productName": "Google Nexus 7", + "ECommerce.profit": 134.9925, "ECommerce.quantity": 3, - "ECommerce.rowId": 9618, - "ECommerce.sales": 899.982, - "ECommerce.subCategory": "Copiers", + "ECommerce.rowId": 4161, + "ECommerce.sales": 539.97, + "ECommerce.subCategory": "Phones", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Bowling", - "ECommerce.customerId": "BS-11380", - "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-11-16T00:00:00.000", - "ECommerce.orderId": "CA-2017-160633", - "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "ECommerce.profit": 5.397, - "ECommerce.quantity": 3, - "ECommerce.rowId": 9619, - "ECommerce.sales": 86.352, - "ECommerce.subCategory": "Art", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "WB-21850", + "ECommerce.customerName": "Customer 41", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-11-11T00:00:00.000", + "ECommerce.orderId": "CA-2017-120327", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.profit": 21.5824, + "ECommerce.quantity": 4, + "ECommerce.rowId": 4227, + "ECommerce.sales": 45.92, + "ECommerce.subCategory": "Fasteners", + }, + Object { + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "TB-21175", + "ECommerce.customerName": "Customer 39", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-11-02T00:00:00.000", + "ECommerce.orderId": "CA-2017-143567", + "ECommerce.productName": "Logitech di_Novo Edge Keyboard", + "ECommerce.profit": 517.4793, + "ECommerce.quantity": 9, + "ECommerce.rowId": 4882, + "ECommerce.sales": 2249.91, + "ECommerce.subCategory": "Accessories", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions + total 1`] = ` -Array [ Object { "ECommerce.category": "Furniture", "ECommerce.city": "Detroit", - "ECommerce.customerId": "MC-17605", - "ECommerce.customerName": "Customer 31", + "ECommerce.customerId": "CA-12775", + "ECommerce.customerName": "Customer 11", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-01-23T00:00:00.000", - "ECommerce.orderId": "CA-2017-145142", - "ECommerce.productName": "Balt Solid Wood Rectangular Table", - "ECommerce.profit": 21.098, - "ECommerce.quantity": 2, - "ECommerce.rowId": 523, - "ECommerce.sales": 210.98, - "ECommerce.subCategory": "Tables", + "ECommerce.orderDate": "2020-09-01T00:00:00.000", + "ECommerce.orderId": "CA-2017-145653", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.profit": 134.5302, + "ECommerce.quantity": 7, + "ECommerce.rowId": 5220, + "ECommerce.sales": 498.26, + "ECommerce.subCategory": "Chairs", + }, + Object { + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "KL-16555", + "ECommerce.customerName": "Customer 27", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-12-14T00:00:00.000", + "ECommerce.orderId": "CA-2017-147333", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", + "ECommerce.profit": 8.5025, + "ECommerce.quantity": 5, + "ECommerce.rowId": 5277, + "ECommerce.sales": 44.75, + "ECommerce.subCategory": "Accessories", + }, + Object { + "ECommerce.category": "Technology", + "ECommerce.city": "Los Angeles", + "ECommerce.customerId": "SS-20140", + "ECommerce.customerName": "Customer 38", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-06-03T00:00:00.000", + "ECommerce.orderId": "CA-2017-145772", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", + "ECommerce.profit": 8.5025, + "ECommerce.quantity": 5, + "ECommerce.rowId": 6125, + "ECommerce.sales": 44.75, + "ECommerce.subCategory": "Accessories", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Lorain", - "ECommerce.customerId": "GA-14725", - "ECommerce.customerName": "Customer 19", + "ECommerce.city": "Marion", + "ECommerce.customerId": "MG-17650", + "ECommerce.customerName": "Customer 32", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderId": "CA-2017-107503", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": 8.5568, - "ECommerce.quantity": 4, - "ECommerce.rowId": 849, - "ECommerce.sales": 48.896, + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderId": "CA-2017-145660", + "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", + "ECommerce.profit": 1.7352, + "ECommerce.quantity": 2, + "ECommerce.rowId": 6205, + "ECommerce.sales": 7.712, "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Olympia", - "ECommerce.customerId": "PF-19165", - "ECommerce.customerName": "Customer 36", + "ECommerce.city": "Oakland", + "ECommerce.customerId": "BB-11545", + "ECommerce.customerName": "Customer 5", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-118437", - "ECommerce.productName": "Project Tote Personal File", - "ECommerce.profit": 4.0687, - "ECommerce.quantity": 1, - "ECommerce.rowId": 1013, - "ECommerce.sales": 14.03, - "ECommerce.subCategory": "Storage", + "ECommerce.orderDate": "2020-12-02T00:00:00.000", + "ECommerce.orderId": "CA-2017-102379", + "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "ECommerce.profit": 44.975, + "ECommerce.quantity": 5, + "ECommerce.rowId": 6272, + "ECommerce.sales": 179.9, + "ECommerce.subCategory": "Art", }, Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "Vancouver", - "ECommerce.customerId": "JW-15220", - "ECommerce.customerName": "Customer 26", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Baltimore", + "ECommerce.customerId": "AJ-10780", + "ECommerce.customerName": "Customer 2", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-10-30T00:00:00.000", - "ECommerce.orderId": "CA-2017-139661", - "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", - "ECommerce.profit": 3.6632, + "ECommerce.orderDate": "2020-05-14T00:00:00.000", + "ECommerce.orderId": "US-2017-133361", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.profit": 1.0904, "ECommerce.quantity": 2, - "ECommerce.rowId": 1494, - "ECommerce.sales": 9.64, - "ECommerce.subCategory": "Furnishings", + "ECommerce.rowId": 6459, + "ECommerce.sales": 3.76, + "ECommerce.subCategory": "Art", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "ML-17755", - "ECommerce.customerName": "Customer 33", + "ECommerce.city": "Arlington", + "ECommerce.customerId": "BF-11020", + "ECommerce.customerName": "Customer 6", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-06-25T00:00:00.000", - "ECommerce.orderId": "CA-2017-133648", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.profit": -2.1195, - "ECommerce.quantity": 3, - "ECommerce.rowId": 1995, - "ECommerce.sales": 11.304, + "ECommerce.orderDate": "2020-09-08T00:00:00.000", + "ECommerce.orderId": "US-2017-124779", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.profit": 15.498, + "ECommerce.quantity": 5, + "ECommerce.rowId": 6651, + "ECommerce.sales": 45.92, "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "KN-16705", - "ECommerce.customerName": "Customer 28", + "ECommerce.category": "Technology", + "ECommerce.city": "Houston", + "ECommerce.customerId": "HK-14890", + "ECommerce.customerName": "Customer 22", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-09-23T00:00:00.000", - "ECommerce.orderId": "CA-2017-138422", - "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", - "ECommerce.profit": 5.2026, - "ECommerce.quantity": 3, - "ECommerce.rowId": 2329, - "ECommerce.sales": 14.352, - "ECommerce.subCategory": "Envelopes", + "ECommerce.orderDate": "2020-03-26T00:00:00.000", + "ECommerce.orderId": "US-2017-141677", + "ECommerce.productName": "Canon PC1080F Personal Copier", + "ECommerce.profit": 569.9905, + "ECommerce.quantity": 5, + "ECommerce.rowId": 7174, + "ECommerce.sales": 2399.96, + "ECommerce.subCategory": "Copiers", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "New York City", - "ECommerce.customerId": "DB-13405", - "ECommerce.customerName": "Customer 15", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-03-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-140949", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", - "ECommerce.profit": 13.604, - "ECommerce.quantity": 8, - "ECommerce.rowId": 2455, - "ECommerce.sales": 71.6, - "ECommerce.subCategory": "Accessories", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "LR-16915", + "ECommerce.customerName": "Customer 30", + "ECommerce.discount": 0.5, + "ECommerce.orderDate": "2020-12-04T00:00:00.000", + "ECommerce.orderId": "CA-2017-109183", + "ECommerce.productName": "Okidata C610n Printer", + "ECommerce.profit": -272.58, + "ECommerce.quantity": 2, + "ECommerce.rowId": 7293, + "ECommerce.sales": 649, + "ECommerce.subCategory": "Machines", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "BM-11650", - "ECommerce.customerName": "Customer 8", + "ECommerce.city": "New York City", + "ECommerce.customerId": "MM-18280", + "ECommerce.customerName": "Customer 34", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-13T00:00:00.000", - "ECommerce.orderId": "CA-2017-149048", - "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", - "ECommerce.profit": 81.432, - "ECommerce.quantity": 2, - "ECommerce.rowId": 2595, - "ECommerce.sales": 180.96, - "ECommerce.subCategory": "Envelopes", + "ECommerce.orderDate": "2020-06-10T00:00:00.000", + "ECommerce.orderId": "CA-2017-112172", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.profit": 0.7065, + "ECommerce.quantity": 3, + "ECommerce.rowId": 7310, + "ECommerce.sales": 14.13, + "ECommerce.subCategory": "Fasteners", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Provo", - "ECommerce.customerId": "AS-10225", - "ECommerce.customerName": "Customer 3", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-112515", - "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "ECommerce.profit": 77.5764, + "ECommerce.city": "Philadelphia", + "ECommerce.customerId": "BS-11755", + "ECommerce.customerName": "Customer 10", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-04-10T00:00:00.000", + "ECommerce.orderId": "CA-2017-135069", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.profit": 6.4176, "ECommerce.quantity": 3, - "ECommerce.rowId": 2655, - "ECommerce.sales": 1292.94, - "ECommerce.subCategory": "Bookcases", + "ECommerce.rowId": 7425, + "ECommerce.sales": 36.672, + "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Technology", "ECommerce.city": "Columbus", - "ECommerce.customerId": "DG-13300", - "ECommerce.customerName": "Customer 16", + "ECommerce.customerId": "BF-11170", + "ECommerce.customerName": "Customer 7", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-11-28T00:00:00.000", - "ECommerce.orderId": "CA-2017-123372", - "ECommerce.productName": "Google Nexus 5", - "ECommerce.profit": 494.9725, - "ECommerce.quantity": 11, - "ECommerce.rowId": 2661, - "ECommerce.sales": 1979.89, - "ECommerce.subCategory": "Phones", + "ECommerce.orderDate": "2020-12-14T00:00:00.000", + "ECommerce.orderId": "CA-2017-151799", + "ECommerce.productName": "Canon PC1080F Personal Copier", + "ECommerce.profit": 467.9922, + "ECommerce.quantity": 2, + "ECommerce.rowId": 7698, + "ECommerce.sales": 1199.98, + "ECommerce.subCategory": "Copiers", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Glendale", - "ECommerce.customerId": "EM-14140", - "ECommerce.customerName": "Customer 18", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-11-12T00:00:00.000", - "ECommerce.orderId": "CA-2017-134915", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.profit": 9.9652, - "ECommerce.quantity": 2, - "ECommerce.rowId": 2952, - "ECommerce.sales": 113.888, - "ECommerce.subCategory": "Chairs", + "ECommerce.city": "Lakewood", + "ECommerce.customerId": "NP-18670", + "ECommerce.customerName": "Customer 35", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-10-12T00:00:00.000", + "ECommerce.orderId": "CA-2017-150091", + "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "ECommerce.profit": 129.294, + "ECommerce.quantity": 5, + "ECommerce.rowId": 8425, + "ECommerce.sales": 2154.9, + "ECommerce.subCategory": "Bookcases", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "San Francisco", - "ECommerce.customerId": "HH-15010", - "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-10-19T00:00:00.000", - "ECommerce.orderId": "CA-2017-131492", + "ECommerce.city": "Dallas", + "ECommerce.customerId": "LC-17050", + "ECommerce.customerName": "Customer 29", + "ECommerce.discount": 0.6, + "ECommerce.orderDate": "2020-11-06T00:00:00.000", + "ECommerce.orderId": "US-2017-119319", "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": 10.3904, - "ECommerce.quantity": 2, - "ECommerce.rowId": 3059, + "ECommerce.profit": -19.864, + "ECommerce.quantity": 5, + "ECommerce.rowId": 8621, "ECommerce.sales": 30.56, "ECommerce.subCategory": "Furnishings", }, Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "San Francisco", - "ECommerce.customerId": "HH-15010", - "ECommerce.customerName": "Customer 21", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Decatur", + "ECommerce.customerId": "JS-16030", + "ECommerce.customerName": "Customer 25", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-10-19T00:00:00.000", - "ECommerce.orderId": "CA-2017-131492", - "ECommerce.productName": "Anderson Hickey Conga Table Tops & Accessories", - "ECommerce.profit": -3.3506, + "ECommerce.orderDate": "2020-02-16T00:00:00.000", + "ECommerce.orderId": "CA-2017-163265", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.profit": 6.1992, "ECommerce.quantity": 2, - "ECommerce.rowId": 3060, - "ECommerce.sales": 24.368, - "ECommerce.subCategory": "Tables", + "ECommerce.rowId": 8673, + "ECommerce.sales": 18.368, + "ECommerce.subCategory": "Fasteners", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Louisville", - "ECommerce.customerId": "DW-13480", - "ECommerce.customerName": "Customer 17", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-27T00:00:00.000", - "ECommerce.orderId": "US-2017-132297", - "ECommerce.productName": "Google Nexus 6", - "ECommerce.profit": 134.9925, + "ECommerce.city": "Columbus", + "ECommerce.customerId": "TS-21205", + "ECommerce.customerName": "Customer 40", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-06-15T00:00:00.000", + "ECommerce.orderId": "CA-2017-119284", + "ECommerce.productName": "HTC One", + "ECommerce.profit": 26.9973, "ECommerce.quantity": 3, - "ECommerce.rowId": 3083, - "ECommerce.sales": 539.97, + "ECommerce.rowId": 8697, + "ECommerce.sales": 239.976, "ECommerce.subCategory": "Phones", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Auburn", - "ECommerce.customerId": "KN-16705", - "ECommerce.customerName": "Customer 28", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-11T00:00:00.000", - "ECommerce.orderId": "CA-2017-102554", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.profit": 1.0904, - "ECommerce.quantity": 2, - "ECommerce.rowId": 3448, - "ECommerce.sales": 3.76, - "ECommerce.subCategory": "Art", - }, - Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Omaha", - "ECommerce.customerId": "JO-15550", - "ECommerce.customerName": "Customer 24", + "ECommerce.category": "Technology", + "ECommerce.city": "Morristown", + "ECommerce.customerId": "GZ-14470", + "ECommerce.customerName": "Customer 20", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-29T00:00:00.000", - "ECommerce.orderId": "CA-2017-144568", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.profit": 1.1775, - "ECommerce.quantity": 5, - "ECommerce.rowId": 3717, - "ECommerce.sales": 23.55, - "ECommerce.subCategory": "Fasteners", + "ECommerce.orderDate": "2020-09-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-126928", + "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "ECommerce.profit": 225.6, + "ECommerce.quantity": 4, + "ECommerce.rowId": 8878, + "ECommerce.sales": 480, + "ECommerce.subCategory": "Machines", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Bakersfield", - "ECommerce.customerId": "AW-10840", - "ECommerce.customerName": "Customer 4", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-02T00:00:00.000", - "ECommerce.orderId": "CA-2017-123001", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.profit": 2.726, - "ECommerce.quantity": 5, - "ECommerce.rowId": 3934, - "ECommerce.sales": 9.4, - "ECommerce.subCategory": "Art", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "JH-15430", + "ECommerce.customerName": "Customer 23", + "ECommerce.discount": 0.5, + "ECommerce.orderDate": "2020-12-25T00:00:00.000", + "ECommerce.orderId": "CA-2017-105620", + "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "ECommerce.profit": -7.2, + "ECommerce.quantity": 2, + "ECommerce.rowId": 8958, + "ECommerce.sales": 120, + "ECommerce.subCategory": "Machines", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Philadelphia", - "ECommerce.customerId": "CC-12475", - "ECommerce.customerName": "Customer 12", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-11-21T00:00:00.000", - "ECommerce.orderId": "CA-2017-100811", - "ECommerce.productName": "Recycled Eldon Regeneration Jumbo File", - "ECommerce.profit": 3.9296, - "ECommerce.quantity": 4, - "ECommerce.rowId": 4012, - "ECommerce.sales": 39.296, - "ECommerce.subCategory": "Storage", + "ECommerce.category": "Furniture", + "ECommerce.city": "New York City", + "ECommerce.customerId": "CD-12280", + "ECommerce.customerName": "Customer 13", + "ECommerce.discount": 0.1, + "ECommerce.orderDate": "2020-11-05T00:00:00.000", + "ECommerce.orderId": "CA-2017-102925", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.profit": 24.2012, + "ECommerce.quantity": 2, + "ECommerce.rowId": 9473, + "ECommerce.sales": 128.124, + "ECommerce.subCategory": "Chairs", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Lafayette", - "ECommerce.customerId": "CS-12355", - "ECommerce.customerName": "Customer 14", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-24T00:00:00.000", - "ECommerce.orderId": "CA-2017-124296", - "ECommerce.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", - "ECommerce.profit": 60.5488, - "ECommerce.quantity": 4, - "ECommerce.rowId": 4031, - "ECommerce.sales": 232.88, - "ECommerce.subCategory": "Chairs", + "ECommerce.city": "New York City", + "ECommerce.customerId": "SB-20185", + "ECommerce.customerName": "Customer 37", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-06-25T00:00:00.000", + "ECommerce.orderId": "CA-2017-116127", + "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", + "ECommerce.profit": -5.0098, + "ECommerce.quantity": 1, + "ECommerce.rowId": 9584, + "ECommerce.sales": 400.784, + "ECommerce.subCategory": "Bookcases", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "New York City", - "ECommerce.customerId": "AH-10465", - "ECommerce.customerName": "Customer 1", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-14T00:00:00.000", - "ECommerce.orderId": "CA-2017-115546", - "ECommerce.productName": "Google Nexus 7", - "ECommerce.profit": 134.9925, + "ECommerce.city": "Columbus", + "ECommerce.customerId": "BS-11380", + "ECommerce.customerName": "Customer 9", + "ECommerce.discount": 0.4, + "ECommerce.orderDate": "2020-11-16T00:00:00.000", + "ECommerce.orderId": "CA-2017-160633", + "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", + "ECommerce.profit": 74.9985, "ECommerce.quantity": 3, - "ECommerce.rowId": 4161, - "ECommerce.sales": 539.97, - "ECommerce.subCategory": "Phones", + "ECommerce.rowId": 9618, + "ECommerce.sales": 899.982, + "ECommerce.subCategory": "Copiers", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "WB-21850", - "ECommerce.customerName": "Customer 41", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-11-11T00:00:00.000", - "ECommerce.orderId": "CA-2017-120327", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.profit": 21.5824, - "ECommerce.quantity": 4, - "ECommerce.rowId": 4227, - "ECommerce.sales": 45.92, - "ECommerce.subCategory": "Fasteners", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "TB-21175", - "ECommerce.customerName": "Customer 39", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-11-02T00:00:00.000", - "ECommerce.orderId": "CA-2017-143567", - "ECommerce.productName": "Logitech di_Novo Edge Keyboard", - "ECommerce.profit": 517.4793, - "ECommerce.quantity": 9, - "ECommerce.rowId": 4882, - "ECommerce.sales": 2249.91, - "ECommerce.subCategory": "Accessories", + "ECommerce.city": "Bowling", + "ECommerce.customerId": "BS-11380", + "ECommerce.customerName": "Customer 9", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-11-16T00:00:00.000", + "ECommerce.orderId": "CA-2017-160633", + "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "ECommerce.profit": 5.397, + "ECommerce.quantity": 3, + "ECommerce.rowId": 9619, + "ECommerce.sales": 86.352, + "ECommerce.subCategory": "Art", }, +] +`; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: dimensions 1`] = ` +Array [ Object { "ECommerce.category": "Furniture", "ECommerce.city": "Detroit", - "ECommerce.customerId": "CA-12775", - "ECommerce.customerName": "Customer 11", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-01T00:00:00.000", - "ECommerce.orderId": "CA-2017-145653", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.profit": 134.5302, - "ECommerce.quantity": 7, - "ECommerce.rowId": 5220, - "ECommerce.sales": 498.26, - "ECommerce.subCategory": "Chairs", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "KL-16555", - "ECommerce.customerName": "Customer 27", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-14T00:00:00.000", - "ECommerce.orderId": "CA-2017-147333", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", - "ECommerce.profit": 8.5025, - "ECommerce.quantity": 5, - "ECommerce.rowId": 5277, - "ECommerce.sales": 44.75, - "ECommerce.subCategory": "Accessories", - }, - Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Los Angeles", - "ECommerce.customerId": "SS-20140", - "ECommerce.customerName": "Customer 38", + "ECommerce.customerId": "MC-17605", + "ECommerce.customerName": "Customer 31", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-03T00:00:00.000", - "ECommerce.orderId": "CA-2017-145772", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", - "ECommerce.profit": 8.5025, - "ECommerce.quantity": 5, - "ECommerce.rowId": 6125, - "ECommerce.sales": 44.75, - "ECommerce.subCategory": "Accessories", + "ECommerce.orderDate": "2020-01-23T00:00:00.000", + "ECommerce.orderId": "CA-2017-145142", + "ECommerce.productName": "Balt Solid Wood Rectangular Table", + "ECommerce.profit": 21.098, + "ECommerce.quantity": 2, + "ECommerce.rowId": 523, + "ECommerce.sales": 210.98, + "ECommerce.subCategory": "Tables", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Marion", - "ECommerce.customerId": "MG-17650", - "ECommerce.customerName": "Customer 32", + "ECommerce.city": "Lorain", + "ECommerce.customerId": "GA-14725", + "ECommerce.customerName": "Customer 19", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderId": "CA-2017-145660", - "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", - "ECommerce.profit": 1.7352, - "ECommerce.quantity": 2, - "ECommerce.rowId": 6205, - "ECommerce.sales": 7.712, + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderId": "CA-2017-107503", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.profit": 8.5568, + "ECommerce.quantity": 4, + "ECommerce.rowId": 849, + "ECommerce.sales": 48.896, "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Oakland", - "ECommerce.customerId": "BB-11545", - "ECommerce.customerName": "Customer 5", + "ECommerce.city": "Olympia", + "ECommerce.customerId": "PF-19165", + "ECommerce.customerName": "Customer 36", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-02T00:00:00.000", - "ECommerce.orderId": "CA-2017-102379", - "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "ECommerce.profit": 44.975, - "ECommerce.quantity": 5, - "ECommerce.rowId": 6272, - "ECommerce.sales": 179.9, - "ECommerce.subCategory": "Art", + "ECommerce.orderDate": "2020-06-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-118437", + "ECommerce.productName": "Project Tote Personal File", + "ECommerce.profit": 4.0687, + "ECommerce.quantity": 1, + "ECommerce.rowId": 1013, + "ECommerce.sales": 14.03, + "ECommerce.subCategory": "Storage", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Baltimore", - "ECommerce.customerId": "AJ-10780", - "ECommerce.customerName": "Customer 2", + "ECommerce.category": "Furniture", + "ECommerce.city": "Vancouver", + "ECommerce.customerId": "JW-15220", + "ECommerce.customerName": "Customer 26", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-05-14T00:00:00.000", - "ECommerce.orderId": "US-2017-133361", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.profit": 1.0904, + "ECommerce.orderDate": "2020-10-30T00:00:00.000", + "ECommerce.orderId": "CA-2017-139661", + "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", + "ECommerce.profit": 3.6632, "ECommerce.quantity": 2, - "ECommerce.rowId": 6459, - "ECommerce.sales": 3.76, - "ECommerce.subCategory": "Art", + "ECommerce.rowId": 1494, + "ECommerce.sales": 9.64, + "ECommerce.subCategory": "Furnishings", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Arlington", - "ECommerce.customerId": "BF-11020", - "ECommerce.customerName": "Customer 6", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "ML-17755", + "ECommerce.customerName": "Customer 33", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-09-08T00:00:00.000", - "ECommerce.orderId": "US-2017-124779", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.profit": 15.498, - "ECommerce.quantity": 5, - "ECommerce.rowId": 6651, - "ECommerce.sales": 45.92, + "ECommerce.orderDate": "2020-06-25T00:00:00.000", + "ECommerce.orderId": "CA-2017-133648", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.profit": -2.1195, + "ECommerce.quantity": 3, + "ECommerce.rowId": 1995, + "ECommerce.sales": 11.304, "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Houston", - "ECommerce.customerId": "HK-14890", - "ECommerce.customerName": "Customer 22", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "KN-16705", + "ECommerce.customerName": "Customer 28", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-03-26T00:00:00.000", - "ECommerce.orderId": "US-2017-141677", - "ECommerce.productName": "Canon PC1080F Personal Copier", - "ECommerce.profit": 569.9905, - "ECommerce.quantity": 5, - "ECommerce.rowId": 7174, - "ECommerce.sales": 2399.96, - "ECommerce.subCategory": "Copiers", + "ECommerce.orderDate": "2020-09-23T00:00:00.000", + "ECommerce.orderId": "CA-2017-138422", + "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", + "ECommerce.profit": 5.2026, + "ECommerce.quantity": 3, + "ECommerce.rowId": 2329, + "ECommerce.sales": 14.352, + "ECommerce.subCategory": "Envelopes", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "LR-16915", - "ECommerce.customerName": "Customer 30", - "ECommerce.discount": 0.5, - "ECommerce.orderDate": "2020-12-04T00:00:00.000", - "ECommerce.orderId": "CA-2017-109183", - "ECommerce.productName": "Okidata C610n Printer", - "ECommerce.profit": -272.58, - "ECommerce.quantity": 2, - "ECommerce.rowId": 7293, - "ECommerce.sales": 649, - "ECommerce.subCategory": "Machines", + "ECommerce.city": "New York City", + "ECommerce.customerId": "DB-13405", + "ECommerce.customerName": "Customer 15", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-03-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-140949", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", + "ECommerce.profit": 13.604, + "ECommerce.quantity": 8, + "ECommerce.rowId": 2455, + "ECommerce.sales": 71.6, + "ECommerce.subCategory": "Accessories", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "New York City", - "ECommerce.customerId": "MM-18280", - "ECommerce.customerName": "Customer 34", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "BM-11650", + "ECommerce.customerName": "Customer 8", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-06-10T00:00:00.000", - "ECommerce.orderId": "CA-2017-112172", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.profit": 0.7065, - "ECommerce.quantity": 3, - "ECommerce.rowId": 7310, - "ECommerce.sales": 14.13, - "ECommerce.subCategory": "Fasteners", + "ECommerce.orderDate": "2020-05-13T00:00:00.000", + "ECommerce.orderId": "CA-2017-149048", + "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", + "ECommerce.profit": 81.432, + "ECommerce.quantity": 2, + "ECommerce.rowId": 2595, + "ECommerce.sales": 180.96, + "ECommerce.subCategory": "Envelopes", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Philadelphia", - "ECommerce.customerId": "BS-11755", - "ECommerce.customerName": "Customer 10", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-04-10T00:00:00.000", - "ECommerce.orderId": "CA-2017-135069", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": 6.4176, + "ECommerce.city": "Provo", + "ECommerce.customerId": "AS-10225", + "ECommerce.customerName": "Customer 3", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-09-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-112515", + "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "ECommerce.profit": 77.5764, "ECommerce.quantity": 3, - "ECommerce.rowId": 7425, - "ECommerce.sales": 36.672, - "ECommerce.subCategory": "Furnishings", + "ECommerce.rowId": 2655, + "ECommerce.sales": 1292.94, + "ECommerce.subCategory": "Bookcases", }, Object { "ECommerce.category": "Technology", "ECommerce.city": "Columbus", - "ECommerce.customerId": "BF-11170", - "ECommerce.customerName": "Customer 7", + "ECommerce.customerId": "DG-13300", + "ECommerce.customerName": "Customer 16", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-12-14T00:00:00.000", - "ECommerce.orderId": "CA-2017-151799", - "ECommerce.productName": "Canon PC1080F Personal Copier", - "ECommerce.profit": 467.9922, - "ECommerce.quantity": 2, - "ECommerce.rowId": 7698, - "ECommerce.sales": 1199.98, - "ECommerce.subCategory": "Copiers", + "ECommerce.orderDate": "2020-11-28T00:00:00.000", + "ECommerce.orderId": "CA-2017-123372", + "ECommerce.productName": "Google Nexus 5", + "ECommerce.profit": 494.9725, + "ECommerce.quantity": 11, + "ECommerce.rowId": 2661, + "ECommerce.sales": 1979.89, + "ECommerce.subCategory": "Phones", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Lakewood", - "ECommerce.customerId": "NP-18670", - "ECommerce.customerName": "Customer 35", - "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-10-12T00:00:00.000", - "ECommerce.orderId": "CA-2017-150091", - "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "ECommerce.profit": 129.294, - "ECommerce.quantity": 5, - "ECommerce.rowId": 8425, - "ECommerce.sales": 2154.9, - "ECommerce.subCategory": "Bookcases", + "ECommerce.city": "Glendale", + "ECommerce.customerId": "EM-14140", + "ECommerce.customerName": "Customer 18", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-11-12T00:00:00.000", + "ECommerce.orderId": "CA-2017-134915", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.profit": 9.9652, + "ECommerce.quantity": 2, + "ECommerce.rowId": 2952, + "ECommerce.sales": 113.888, + "ECommerce.subCategory": "Chairs", }, Object { "ECommerce.category": "Furniture", - "ECommerce.city": "Dallas", - "ECommerce.customerId": "LC-17050", - "ECommerce.customerName": "Customer 29", - "ECommerce.discount": 0.6, - "ECommerce.orderDate": "2020-11-06T00:00:00.000", - "ECommerce.orderId": "US-2017-119319", + "ECommerce.city": "San Francisco", + "ECommerce.customerId": "HH-15010", + "ECommerce.customerName": "Customer 21", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-10-19T00:00:00.000", + "ECommerce.orderId": "CA-2017-131492", "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.profit": -19.864, - "ECommerce.quantity": 5, - "ECommerce.rowId": 8621, + "ECommerce.profit": 10.3904, + "ECommerce.quantity": 2, + "ECommerce.rowId": 3059, "ECommerce.sales": 30.56, "ECommerce.subCategory": "Furnishings", }, Object { - "ECommerce.category": "Office Supplies", - "ECommerce.city": "Decatur", - "ECommerce.customerId": "JS-16030", - "ECommerce.customerName": "Customer 25", + "ECommerce.category": "Furniture", + "ECommerce.city": "San Francisco", + "ECommerce.customerId": "HH-15010", + "ECommerce.customerName": "Customer 21", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-02-16T00:00:00.000", - "ECommerce.orderId": "CA-2017-163265", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.profit": 6.1992, + "ECommerce.orderDate": "2020-10-19T00:00:00.000", + "ECommerce.orderId": "CA-2017-131492", + "ECommerce.productName": "Anderson Hickey Conga Table Tops & Accessories", + "ECommerce.profit": -3.3506, "ECommerce.quantity": 2, - "ECommerce.rowId": 8673, - "ECommerce.sales": 18.368, - "ECommerce.subCategory": "Fasteners", + "ECommerce.rowId": 3060, + "ECommerce.sales": 24.368, + "ECommerce.subCategory": "Tables", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "TS-21205", - "ECommerce.customerName": "Customer 40", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-06-15T00:00:00.000", - "ECommerce.orderId": "CA-2017-119284", - "ECommerce.productName": "HTC One", - "ECommerce.profit": 26.9973, + "ECommerce.city": "Louisville", + "ECommerce.customerId": "DW-13480", + "ECommerce.customerName": "Customer 17", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-05-27T00:00:00.000", + "ECommerce.orderId": "US-2017-132297", + "ECommerce.productName": "Google Nexus 6", + "ECommerce.profit": 134.9925, "ECommerce.quantity": 3, - "ECommerce.rowId": 8697, - "ECommerce.sales": 239.976, + "ECommerce.rowId": 3083, + "ECommerce.sales": 539.97, "ECommerce.subCategory": "Phones", }, Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Morristown", - "ECommerce.customerId": "GZ-14470", - "ECommerce.customerName": "Customer 20", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Auburn", + "ECommerce.customerId": "KN-16705", + "ECommerce.customerName": "Customer 28", "ECommerce.discount": 0, - "ECommerce.orderDate": "2020-09-17T00:00:00.000", - "ECommerce.orderId": "CA-2017-126928", - "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "ECommerce.profit": 225.6, - "ECommerce.quantity": 4, - "ECommerce.rowId": 8878, - "ECommerce.sales": 480, - "ECommerce.subCategory": "Machines", + "ECommerce.orderDate": "2020-06-11T00:00:00.000", + "ECommerce.orderId": "CA-2017-102554", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.profit": 1.0904, + "ECommerce.quantity": 2, + "ECommerce.rowId": 3448, + "ECommerce.sales": 3.76, + "ECommerce.subCategory": "Art", }, Object { - "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "JH-15430", - "ECommerce.customerName": "Customer 23", - "ECommerce.discount": 0.5, - "ECommerce.orderDate": "2020-12-25T00:00:00.000", - "ECommerce.orderId": "CA-2017-105620", - "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "ECommerce.profit": -7.2, - "ECommerce.quantity": 2, - "ECommerce.rowId": 8958, - "ECommerce.sales": 120, - "ECommerce.subCategory": "Machines", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Omaha", + "ECommerce.customerId": "JO-15550", + "ECommerce.customerName": "Customer 24", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-05-29T00:00:00.000", + "ECommerce.orderId": "CA-2017-144568", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.profit": 1.1775, + "ECommerce.quantity": 5, + "ECommerce.rowId": 3717, + "ECommerce.sales": 23.55, + "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "New York City", - "ECommerce.customerId": "CD-12280", - "ECommerce.customerName": "Customer 13", - "ECommerce.discount": 0.1, - "ECommerce.orderDate": "2020-11-05T00:00:00.000", - "ECommerce.orderId": "CA-2017-102925", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.profit": 24.2012, - "ECommerce.quantity": 2, - "ECommerce.rowId": 9473, - "ECommerce.sales": 128.124, - "ECommerce.subCategory": "Chairs", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Bakersfield", + "ECommerce.customerId": "AW-10840", + "ECommerce.customerName": "Customer 4", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-09-02T00:00:00.000", + "ECommerce.orderId": "CA-2017-123001", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.profit": 2.726, + "ECommerce.quantity": 5, + "ECommerce.rowId": 3934, + "ECommerce.sales": 9.4, + "ECommerce.subCategory": "Art", }, Object { - "ECommerce.category": "Furniture", - "ECommerce.city": "New York City", - "ECommerce.customerId": "SB-20185", - "ECommerce.customerName": "Customer 37", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Philadelphia", + "ECommerce.customerId": "CC-12475", + "ECommerce.customerName": "Customer 12", "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-06-25T00:00:00.000", - "ECommerce.orderId": "CA-2017-116127", - "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", - "ECommerce.profit": -5.0098, - "ECommerce.quantity": 1, - "ECommerce.rowId": 9584, - "ECommerce.sales": 400.784, - "ECommerce.subCategory": "Bookcases", + "ECommerce.orderDate": "2020-11-21T00:00:00.000", + "ECommerce.orderId": "CA-2017-100811", + "ECommerce.productName": "Recycled Eldon Regeneration Jumbo File", + "ECommerce.profit": 3.9296, + "ECommerce.quantity": 4, + "ECommerce.rowId": 4012, + "ECommerce.sales": 39.296, + "ECommerce.subCategory": "Storage", + }, + Object { + "ECommerce.category": "Furniture", + "ECommerce.city": "Lafayette", + "ECommerce.customerId": "CS-12355", + "ECommerce.customerName": "Customer 14", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-12-24T00:00:00.000", + "ECommerce.orderId": "CA-2017-124296", + "ECommerce.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", + "ECommerce.profit": 60.5488, + "ECommerce.quantity": 4, + "ECommerce.rowId": 4031, + "ECommerce.sales": 232.88, + "ECommerce.subCategory": "Chairs", }, Object { "ECommerce.category": "Technology", - "ECommerce.city": "Columbus", - "ECommerce.customerId": "BS-11380", - "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.4, - "ECommerce.orderDate": "2020-11-16T00:00:00.000", - "ECommerce.orderId": "CA-2017-160633", - "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", - "ECommerce.profit": 74.9985, + "ECommerce.city": "New York City", + "ECommerce.customerId": "AH-10465", + "ECommerce.customerName": "Customer 1", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-05-14T00:00:00.000", + "ECommerce.orderId": "CA-2017-115546", + "ECommerce.productName": "Google Nexus 7", + "ECommerce.profit": 134.9925, "ECommerce.quantity": 3, - "ECommerce.rowId": 9618, - "ECommerce.sales": 899.982, - "ECommerce.subCategory": "Copiers", + "ECommerce.rowId": 4161, + "ECommerce.sales": 539.97, + "ECommerce.subCategory": "Phones", }, Object { "ECommerce.category": "Office Supplies", - "ECommerce.city": "Bowling", - "ECommerce.customerId": "BS-11380", - "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.2, - "ECommerce.orderDate": "2020-11-16T00:00:00.000", - "ECommerce.orderId": "CA-2017-160633", - "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "ECommerce.profit": 5.397, - "ECommerce.quantity": 3, - "ECommerce.rowId": 9619, - "ECommerce.sales": 86.352, - "ECommerce.subCategory": "Art", - }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: partitioned pre-agg 1`] = ` -Array [ - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Balt Solid Wood Rectangular Table", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.totalQuantity": "4", - }, - Object { - "ECommerce.orderDate": "2020-02-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-02-01T00:00:00.000", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "WB-21850", + "ECommerce.customerName": "Customer 41", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-11-11T00:00:00.000", + "ECommerce.orderId": "CA-2017-120327", "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-03-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-03-01T00:00:00.000", - "ECommerce.productName": "Canon PC1080F Personal Copier", - "ECommerce.totalQuantity": "5", - }, - Object { - "ECommerce.orderDate": "2020-03-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-03-01T00:00:00.000", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", - "ECommerce.totalQuantity": "8", - }, - Object { - "ECommerce.orderDate": "2020-04-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-04-01T00:00:00.000", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.totalQuantity": "3", + "ECommerce.profit": 21.5824, + "ECommerce.quantity": 4, + "ECommerce.rowId": 4227, + "ECommerce.sales": 45.92, + "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.orderDate": "2020-05-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", - "ECommerce.productName": "Google Nexus 6", - "ECommerce.totalQuantity": "3", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "TB-21175", + "ECommerce.customerName": "Customer 39", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-11-02T00:00:00.000", + "ECommerce.orderId": "CA-2017-143567", + "ECommerce.productName": "Logitech di_Novo Edge Keyboard", + "ECommerce.profit": 517.4793, + "ECommerce.quantity": 9, + "ECommerce.rowId": 4882, + "ECommerce.sales": 2249.91, + "ECommerce.subCategory": "Accessories", }, Object { - "ECommerce.orderDate": "2020-05-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", - "ECommerce.productName": "Google Nexus 7", - "ECommerce.totalQuantity": "3", + "ECommerce.category": "Furniture", + "ECommerce.city": "Detroit", + "ECommerce.customerId": "CA-12775", + "ECommerce.customerName": "Customer 11", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-09-01T00:00:00.000", + "ECommerce.orderId": "CA-2017-145653", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.profit": 134.5302, + "ECommerce.quantity": 7, + "ECommerce.rowId": 5220, + "ECommerce.sales": 498.26, + "ECommerce.subCategory": "Chairs", }, Object { - "ECommerce.orderDate": "2020-05-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.totalQuantity": "2", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "KL-16555", + "ECommerce.customerName": "Customer 27", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-12-14T00:00:00.000", + "ECommerce.orderId": "CA-2017-147333", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", + "ECommerce.profit": 8.5025, + "ECommerce.quantity": 5, + "ECommerce.rowId": 5277, + "ECommerce.sales": 44.75, + "ECommerce.subCategory": "Accessories", }, Object { - "ECommerce.orderDate": "2020-05-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.totalQuantity": "5", + "ECommerce.category": "Technology", + "ECommerce.city": "Los Angeles", + "ECommerce.customerId": "SS-20140", + "ECommerce.customerName": "Customer 38", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-06-03T00:00:00.000", + "ECommerce.orderId": "CA-2017-145772", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", + "ECommerce.profit": 8.5025, + "ECommerce.quantity": 5, + "ECommerce.rowId": 6125, + "ECommerce.sales": 44.75, + "ECommerce.subCategory": "Accessories", }, Object { - "ECommerce.orderDate": "2020-05-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", - "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", - "ECommerce.totalQuantity": "2", + "ECommerce.category": "Furniture", + "ECommerce.city": "Marion", + "ECommerce.customerId": "MG-17650", + "ECommerce.customerName": "Customer 32", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderId": "CA-2017-145660", + "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", + "ECommerce.profit": 1.7352, + "ECommerce.quantity": 2, + "ECommerce.rowId": 6205, + "ECommerce.sales": 7.712, + "ECommerce.subCategory": "Furnishings", }, Object { - "ECommerce.orderDate": "2020-06-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", - "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", - "ECommerce.totalQuantity": "1", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Oakland", + "ECommerce.customerId": "BB-11545", + "ECommerce.customerName": "Customer 5", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-12-02T00:00:00.000", + "ECommerce.orderId": "CA-2017-102379", + "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "ECommerce.profit": 44.975, + "ECommerce.quantity": 5, + "ECommerce.rowId": 6272, + "ECommerce.sales": 179.9, + "ECommerce.subCategory": "Art", }, Object { - "ECommerce.orderDate": "2020-06-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", - "ECommerce.productName": "HTC One", - "ECommerce.totalQuantity": "3", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Baltimore", + "ECommerce.customerId": "AJ-10780", + "ECommerce.customerName": "Customer 2", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-05-14T00:00:00.000", + "ECommerce.orderId": "US-2017-133361", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.profit": 1.0904, + "ECommerce.quantity": 2, + "ECommerce.rowId": 6459, + "ECommerce.sales": 3.76, + "ECommerce.subCategory": "Art", }, Object { - "ECommerce.orderDate": "2020-06-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", - "ECommerce.totalQuantity": "5", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Arlington", + "ECommerce.customerId": "BF-11020", + "ECommerce.customerName": "Customer 6", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-09-08T00:00:00.000", + "ECommerce.orderId": "US-2017-124779", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.profit": 15.498, + "ECommerce.quantity": 5, + "ECommerce.rowId": 6651, + "ECommerce.sales": 45.92, + "ECommerce.subCategory": "Fasteners", }, Object { - "ECommerce.orderDate": "2020-06-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.totalQuantity": "2", + "ECommerce.category": "Technology", + "ECommerce.city": "Houston", + "ECommerce.customerId": "HK-14890", + "ECommerce.customerName": "Customer 22", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-03-26T00:00:00.000", + "ECommerce.orderId": "US-2017-141677", + "ECommerce.productName": "Canon PC1080F Personal Copier", + "ECommerce.profit": 569.9905, + "ECommerce.quantity": 5, + "ECommerce.rowId": 7174, + "ECommerce.sales": 2399.96, + "ECommerce.subCategory": "Copiers", }, Object { - "ECommerce.orderDate": "2020-06-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.totalQuantity": "6", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "LR-16915", + "ECommerce.customerName": "Customer 30", + "ECommerce.discount": 0.5, + "ECommerce.orderDate": "2020-12-04T00:00:00.000", + "ECommerce.orderId": "CA-2017-109183", + "ECommerce.productName": "Okidata C610n Printer", + "ECommerce.profit": -272.58, + "ECommerce.quantity": 2, + "ECommerce.rowId": 7293, + "ECommerce.sales": 649, + "ECommerce.subCategory": "Machines", }, Object { - "ECommerce.orderDate": "2020-06-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", - "ECommerce.productName": "Project Tote Personal File", - "ECommerce.totalQuantity": "1", - }, - Object { - "ECommerce.orderDate": "2020-09-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", - "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "ECommerce.totalQuantity": "3", - }, - Object { - "ECommerce.orderDate": "2020-09-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.totalQuantity": "7", - }, - Object { - "ECommerce.orderDate": "2020-09-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", - "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "ECommerce.totalQuantity": "4", - }, - Object { - "ECommerce.orderDate": "2020-09-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.totalQuantity": "5", - }, - Object { - "ECommerce.orderDate": "2020-09-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.totalQuantity": "5", - }, - Object { - "ECommerce.orderDate": "2020-09-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", - "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", - "ECommerce.totalQuantity": "3", - }, - Object { - "ECommerce.orderDate": "2020-10-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-10-01T00:00:00.000", - "ECommerce.productName": "Anderson Hickey Conga Table Tops & Accessories", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-10-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-10-01T00:00:00.000", - "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "ECommerce.totalQuantity": "5", - }, - Object { - "ECommerce.orderDate": "2020-10-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-10-01T00:00:00.000", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-10-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-10-01T00:00:00.000", - "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-11-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "ECommerce.productName": "Google Nexus 5", - "ECommerce.totalQuantity": "11", - }, - Object { - "ECommerce.orderDate": "2020-11-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.totalQuantity": "4", - }, - Object { - "ECommerce.orderDate": "2020-11-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", - "ECommerce.totalQuantity": "3", - }, - Object { - "ECommerce.orderDate": "2020-11-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.totalQuantity": "5", - }, - Object { - "ECommerce.orderDate": "2020-11-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "ECommerce.productName": "Logitech di_Novo Edge Keyboard", - "ECommerce.totalQuantity": "9", - }, - Object { - "ECommerce.orderDate": "2020-11-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "ECommerce.totalQuantity": "3", - }, - Object { - "ECommerce.orderDate": "2020-11-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "ECommerce.productName": "Recycled Eldon Regeneration Jumbo File", - "ECommerce.totalQuantity": "4", - }, - Object { - "ECommerce.orderDate": "2020-11-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.totalQuantity": "4", - }, - Object { - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", - "ECommerce.productName": "Canon PC1080F Personal Copier", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", - "ECommerce.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", - "ECommerce.totalQuantity": "4", - }, - Object { - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", - "ECommerce.totalQuantity": "5", - }, - Object { - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", - "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", - "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", - "ECommerce.productName": "Okidata C610n Printer", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-12-01T00:00:00.000", - "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", - "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "ECommerce.totalQuantity": "5", - }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: partitioned pre-agg higher granularity 1`] = ` -Array [ - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Anderson Hickey Conga Table Tops & Accessories", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Balt Solid Wood Rectangular Table", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Canon PC1080F Personal Copier", - "ECommerce.totalQuantity": "7", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", - "ECommerce.totalQuantity": "1", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "ECommerce.totalQuantity": "8", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Google Nexus 5", - "ECommerce.totalQuantity": "11", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Google Nexus 6", - "ECommerce.totalQuantity": "3", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Google Nexus 7", - "ECommerce.totalQuantity": "3", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "HTC One", - "ECommerce.totalQuantity": "3", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", - "ECommerce.totalQuantity": "11", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", - "ECommerce.totalQuantity": "3", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", - "ECommerce.totalQuantity": "4", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", - "ECommerce.totalQuantity": "5", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", - "ECommerce.totalQuantity": "5", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", - "ECommerce.totalQuantity": "8", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "ECommerce.totalQuantity": "6", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Linden 10 Round Wall Clock, Black", - "ECommerce.totalQuantity": "14", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Logitech di_Novo Edge Keyboard", - "ECommerce.totalQuantity": "9", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", - "ECommerce.totalQuantity": "4", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "OIC #2 Pencils, Medium Soft", - "ECommerce.totalQuantity": "9", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Okidata C610n Printer", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "ECommerce.totalQuantity": "8", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "ECommerce.totalQuantity": "11", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Project Tote Personal File", - "ECommerce.totalQuantity": "1", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Recycled Eldon Regeneration Jumbo File", - "ECommerce.totalQuantity": "4", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", - "ECommerce.totalQuantity": "2", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "ECommerce.totalQuantity": "11", - }, - Object { - "ECommerce.orderDate": "2020-01-01T00:00:00.000", - "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", - "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", - "ECommerce.totalQuantity": "3", - }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying Products: dimensions + order + limit + total 1`] = ` -Array [ - Object { - "Products.category": "Furniture", - "Products.productName": "DMI Eclipse Executive Suite Bookcases", - "Products.subCategory": "Bookcases", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "Products.subCategory": "Bookcases", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Harbour Creations 67200 Series Stacking Chairs", - "Products.subCategory": "Chairs", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", - "Products.subCategory": "Chairs", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Linden 10 Round Wall Clock, Black", - "Products.subCategory": "Furnishings", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Magna Visual Magnetic Picture Hangers", - "Products.subCategory": "Furnishings", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Anderson Hickey Conga Table Tops & Accessories", - "Products.subCategory": "Tables", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Balt Solid Wood Rectangular Table", - "Products.subCategory": "Tables", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "OIC #2 Pencils, Medium Soft", - "Products.subCategory": "Art", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "Products.subCategory": "Art", - }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying Products: dimensions + order + limit 1`] = ` -Array [ - Object { - "Products.category": "Furniture", - "Products.productName": "DMI Eclipse Executive Suite Bookcases", - "Products.subCategory": "Bookcases", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "Products.subCategory": "Bookcases", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Harbour Creations 67200 Series Stacking Chairs", - "Products.subCategory": "Chairs", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", - "Products.subCategory": "Chairs", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Linden 10 Round Wall Clock, Black", - "Products.subCategory": "Furnishings", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Magna Visual Magnetic Picture Hangers", - "Products.subCategory": "Furnishings", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Anderson Hickey Conga Table Tops & Accessories", - "Products.subCategory": "Tables", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Balt Solid Wood Rectangular Table", - "Products.subCategory": "Tables", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "OIC #2 Pencils, Medium Soft", - "Products.subCategory": "Art", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "Products.subCategory": "Art", - }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying Products: dimensions + order + total 1`] = ` -Array [ - Object { - "Products.category": "Furniture", - "Products.productName": "DMI Eclipse Executive Suite Bookcases", - "Products.subCategory": "Bookcases", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "Products.subCategory": "Bookcases", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Harbour Creations 67200 Series Stacking Chairs", - "Products.subCategory": "Chairs", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", - "Products.subCategory": "Chairs", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Linden 10 Round Wall Clock, Black", - "Products.subCategory": "Furnishings", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Magna Visual Magnetic Picture Hangers", - "Products.subCategory": "Furnishings", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Anderson Hickey Conga Table Tops & Accessories", - "Products.subCategory": "Tables", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Balt Solid Wood Rectangular Table", - "Products.subCategory": "Tables", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "OIC #2 Pencils, Medium Soft", - "Products.subCategory": "Art", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "Products.subCategory": "Art", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", - "Products.subCategory": "Envelopes", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "Wausau Papers Astrobrights Colored Envelopes", - "Products.subCategory": "Envelopes", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "Products.subCategory": "Fasteners", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "Products.subCategory": "Fasteners", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "Project Tote Personal File", - "Products.subCategory": "Storage", - }, - Object { - "Products.category": "Office Supplies", - "Products.productName": "Recycled Eldon Regeneration Jumbo File", - "Products.subCategory": "Storage", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.0", - "Products.subCategory": "Accessories", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.1", - "Products.subCategory": "Accessories", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.2", - "Products.subCategory": "Accessories", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Logitech di_Novo Edge Keyboard", - "Products.subCategory": "Accessories", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Canon PC1080F Personal Copier", - "Products.subCategory": "Copiers", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Hewlett Packard 610 Color Digital Copier / Printer", - "Products.subCategory": "Copiers", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "Products.subCategory": "Machines", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Okidata C610n Printer", - "Products.subCategory": "Machines", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Google Nexus 5", - "Products.subCategory": "Phones", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Google Nexus 6", - "Products.subCategory": "Phones", - }, - Object { - "Products.category": "Technology", - "Products.productName": "Google Nexus 7", - "Products.subCategory": "Phones", - }, - Object { - "Products.category": "Technology", - "Products.productName": "HTC One", - "Products.subCategory": "Phones", - }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying Products: dimensions + order 1`] = ` -Array [ - Object { - "Products.category": "Furniture", - "Products.productName": "DMI Eclipse Executive Suite Bookcases", - "Products.subCategory": "Bookcases", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", - "Products.subCategory": "Bookcases", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Harbour Creations 67200 Series Stacking Chairs", - "Products.subCategory": "Chairs", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", - "Products.subCategory": "Chairs", - }, - Object { - "Products.category": "Furniture", - "Products.productName": "Linden 10 Round Wall Clock, Black", - "Products.subCategory": "Furnishings", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "New York City", + "ECommerce.customerId": "MM-18280", + "ECommerce.customerName": "Customer 34", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-06-10T00:00:00.000", + "ECommerce.orderId": "CA-2017-112172", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.profit": 0.7065, + "ECommerce.quantity": 3, + "ECommerce.rowId": 7310, + "ECommerce.sales": 14.13, + "ECommerce.subCategory": "Fasteners", }, Object { - "Products.category": "Furniture", - "Products.productName": "Magna Visual Magnetic Picture Hangers", - "Products.subCategory": "Furnishings", + "ECommerce.category": "Furniture", + "ECommerce.city": "Philadelphia", + "ECommerce.customerId": "BS-11755", + "ECommerce.customerName": "Customer 10", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-04-10T00:00:00.000", + "ECommerce.orderId": "CA-2017-135069", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.profit": 6.4176, + "ECommerce.quantity": 3, + "ECommerce.rowId": 7425, + "ECommerce.sales": 36.672, + "ECommerce.subCategory": "Furnishings", }, Object { - "Products.category": "Furniture", - "Products.productName": "Anderson Hickey Conga Table Tops & Accessories", - "Products.subCategory": "Tables", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "BF-11170", + "ECommerce.customerName": "Customer 7", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-12-14T00:00:00.000", + "ECommerce.orderId": "CA-2017-151799", + "ECommerce.productName": "Canon PC1080F Personal Copier", + "ECommerce.profit": 467.9922, + "ECommerce.quantity": 2, + "ECommerce.rowId": 7698, + "ECommerce.sales": 1199.98, + "ECommerce.subCategory": "Copiers", }, Object { - "Products.category": "Furniture", - "Products.productName": "Balt Solid Wood Rectangular Table", - "Products.subCategory": "Tables", + "ECommerce.category": "Furniture", + "ECommerce.city": "Lakewood", + "ECommerce.customerId": "NP-18670", + "ECommerce.customerName": "Customer 35", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-10-12T00:00:00.000", + "ECommerce.orderId": "CA-2017-150091", + "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "ECommerce.profit": 129.294, + "ECommerce.quantity": 5, + "ECommerce.rowId": 8425, + "ECommerce.sales": 2154.9, + "ECommerce.subCategory": "Bookcases", }, Object { - "Products.category": "Office Supplies", - "Products.productName": "OIC #2 Pencils, Medium Soft", - "Products.subCategory": "Art", + "ECommerce.category": "Furniture", + "ECommerce.city": "Dallas", + "ECommerce.customerId": "LC-17050", + "ECommerce.customerName": "Customer 29", + "ECommerce.discount": 0.6, + "ECommerce.orderDate": "2020-11-06T00:00:00.000", + "ECommerce.orderId": "US-2017-119319", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.profit": -19.864, + "ECommerce.quantity": 5, + "ECommerce.rowId": 8621, + "ECommerce.sales": 30.56, + "ECommerce.subCategory": "Furnishings", }, Object { - "Products.category": "Office Supplies", - "Products.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", - "Products.subCategory": "Art", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Decatur", + "ECommerce.customerId": "JS-16030", + "ECommerce.customerName": "Customer 25", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-02-16T00:00:00.000", + "ECommerce.orderId": "CA-2017-163265", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.profit": 6.1992, + "ECommerce.quantity": 2, + "ECommerce.rowId": 8673, + "ECommerce.sales": 18.368, + "ECommerce.subCategory": "Fasteners", }, Object { - "Products.category": "Office Supplies", - "Products.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", - "Products.subCategory": "Envelopes", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "TS-21205", + "ECommerce.customerName": "Customer 40", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-06-15T00:00:00.000", + "ECommerce.orderId": "CA-2017-119284", + "ECommerce.productName": "HTC One", + "ECommerce.profit": 26.9973, + "ECommerce.quantity": 3, + "ECommerce.rowId": 8697, + "ECommerce.sales": 239.976, + "ECommerce.subCategory": "Phones", }, Object { - "Products.category": "Office Supplies", - "Products.productName": "Wausau Papers Astrobrights Colored Envelopes", - "Products.subCategory": "Envelopes", + "ECommerce.category": "Technology", + "ECommerce.city": "Morristown", + "ECommerce.customerId": "GZ-14470", + "ECommerce.customerName": "Customer 20", + "ECommerce.discount": 0, + "ECommerce.orderDate": "2020-09-17T00:00:00.000", + "ECommerce.orderId": "CA-2017-126928", + "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "ECommerce.profit": 225.6, + "ECommerce.quantity": 4, + "ECommerce.rowId": 8878, + "ECommerce.sales": 480, + "ECommerce.subCategory": "Machines", }, Object { - "Products.category": "Office Supplies", - "Products.productName": "Plymouth Boxed Rubber Bands by Plymouth", - "Products.subCategory": "Fasteners", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "JH-15430", + "ECommerce.customerName": "Customer 23", + "ECommerce.discount": 0.5, + "ECommerce.orderDate": "2020-12-25T00:00:00.000", + "ECommerce.orderId": "CA-2017-105620", + "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "ECommerce.profit": -7.2, + "ECommerce.quantity": 2, + "ECommerce.rowId": 8958, + "ECommerce.sales": 120, + "ECommerce.subCategory": "Machines", }, Object { - "Products.category": "Office Supplies", - "Products.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", - "Products.subCategory": "Fasteners", + "ECommerce.category": "Furniture", + "ECommerce.city": "New York City", + "ECommerce.customerId": "CD-12280", + "ECommerce.customerName": "Customer 13", + "ECommerce.discount": 0.1, + "ECommerce.orderDate": "2020-11-05T00:00:00.000", + "ECommerce.orderId": "CA-2017-102925", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.profit": 24.2012, + "ECommerce.quantity": 2, + "ECommerce.rowId": 9473, + "ECommerce.sales": 128.124, + "ECommerce.subCategory": "Chairs", }, Object { - "Products.category": "Office Supplies", - "Products.productName": "Project Tote Personal File", - "Products.subCategory": "Storage", + "ECommerce.category": "Furniture", + "ECommerce.city": "New York City", + "ECommerce.customerId": "SB-20185", + "ECommerce.customerName": "Customer 37", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-06-25T00:00:00.000", + "ECommerce.orderId": "CA-2017-116127", + "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", + "ECommerce.profit": -5.0098, + "ECommerce.quantity": 1, + "ECommerce.rowId": 9584, + "ECommerce.sales": 400.784, + "ECommerce.subCategory": "Bookcases", }, Object { - "Products.category": "Office Supplies", - "Products.productName": "Recycled Eldon Regeneration Jumbo File", - "Products.subCategory": "Storage", + "ECommerce.category": "Technology", + "ECommerce.city": "Columbus", + "ECommerce.customerId": "BS-11380", + "ECommerce.customerName": "Customer 9", + "ECommerce.discount": 0.4, + "ECommerce.orderDate": "2020-11-16T00:00:00.000", + "ECommerce.orderId": "CA-2017-160633", + "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", + "ECommerce.profit": 74.9985, + "ECommerce.quantity": 3, + "ECommerce.rowId": 9618, + "ECommerce.sales": 899.982, + "ECommerce.subCategory": "Copiers", }, Object { - "Products.category": "Technology", - "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.0", - "Products.subCategory": "Accessories", + "ECommerce.category": "Office Supplies", + "ECommerce.city": "Bowling", + "ECommerce.customerId": "BS-11380", + "ECommerce.customerName": "Customer 9", + "ECommerce.discount": 0.2, + "ECommerce.orderDate": "2020-11-16T00:00:00.000", + "ECommerce.orderId": "CA-2017-160633", + "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "ECommerce.profit": 5.397, + "ECommerce.quantity": 3, + "ECommerce.rowId": 9619, + "ECommerce.sales": 86.352, + "ECommerce.subCategory": "Art", }, +] +`; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: partitioned pre-agg 1`] = ` +Array [ Object { - "Products.category": "Technology", - "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.1", - "Products.subCategory": "Accessories", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Balt Solid Wood Rectangular Table", + "ECommerce.totalQuantity": "2", }, Object { - "Products.category": "Technology", - "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.2", - "Products.subCategory": "Accessories", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.totalQuantity": "4", }, Object { - "Products.category": "Technology", - "Products.productName": "Logitech di_Novo Edge Keyboard", - "Products.subCategory": "Accessories", + "ECommerce.orderDate": "2020-02-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-02-01T00:00:00.000", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.totalQuantity": "2", }, Object { - "Products.category": "Technology", - "Products.productName": "Canon PC1080F Personal Copier", - "Products.subCategory": "Copiers", + "ECommerce.orderDate": "2020-03-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-03-01T00:00:00.000", + "ECommerce.productName": "Canon PC1080F Personal Copier", + "ECommerce.totalQuantity": "5", }, Object { - "Products.category": "Technology", - "Products.productName": "Hewlett Packard 610 Color Digital Copier / Printer", - "Products.subCategory": "Copiers", + "ECommerce.orderDate": "2020-03-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-03-01T00:00:00.000", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", + "ECommerce.totalQuantity": "8", }, Object { - "Products.category": "Technology", - "Products.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", - "Products.subCategory": "Machines", + "ECommerce.orderDate": "2020-04-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-04-01T00:00:00.000", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.totalQuantity": "3", }, Object { - "Products.category": "Technology", - "Products.productName": "Okidata C610n Printer", - "Products.subCategory": "Machines", + "ECommerce.orderDate": "2020-05-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", + "ECommerce.productName": "Google Nexus 6", + "ECommerce.totalQuantity": "3", }, Object { - "Products.category": "Technology", - "Products.productName": "Google Nexus 5", - "Products.subCategory": "Phones", + "ECommerce.orderDate": "2020-05-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", + "ECommerce.productName": "Google Nexus 7", + "ECommerce.totalQuantity": "3", }, Object { - "Products.category": "Technology", - "Products.productName": "Google Nexus 6", - "Products.subCategory": "Phones", + "ECommerce.orderDate": "2020-05-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.totalQuantity": "2", }, Object { - "Products.category": "Technology", - "Products.productName": "Google Nexus 7", - "Products.subCategory": "Phones", + "ECommerce.orderDate": "2020-05-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.totalQuantity": "5", }, Object { - "Products.category": "Technology", - "Products.productName": "HTC One", - "Products.subCategory": "Phones", + "ECommerce.orderDate": "2020-05-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-05-01T00:00:00.000", + "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", + "ECommerce.totalQuantity": "2", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying custom granularities ECommerce: count by half_year + dimension 1`] = ` -Array [ Object { - "ECommerce.city": "Lorain", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2019-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-06-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", + "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", + "ECommerce.totalQuantity": "1", }, Object { - "ECommerce.city": "Auburn", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-06-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", + "ECommerce.productName": "HTC One", + "ECommerce.totalQuantity": "3", }, Object { - "ECommerce.city": "Baltimore", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-06-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", + "ECommerce.totalQuantity": "5", }, Object { - "ECommerce.city": "Columbus", - "ECommerce.count": 3, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-06-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.city": "Decatur", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-06-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.totalQuantity": "6", }, Object { - "ECommerce.city": "Detroit", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-06-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-06-01T00:00:00.000", + "ECommerce.productName": "Project Tote Personal File", + "ECommerce.totalQuantity": "1", }, Object { - "ECommerce.city": "Houston", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-09-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", + "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "ECommerce.totalQuantity": "3", }, Object { - "ECommerce.city": "Los Angeles", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-09-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.totalQuantity": "7", }, Object { - "ECommerce.city": "Louisville", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-09-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", + "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "ECommerce.totalQuantity": "4", }, Object { - "ECommerce.city": "New York City", - "ECommerce.count": 4, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-09-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.totalQuantity": "5", }, Object { - "ECommerce.city": "Olympia", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-09-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.totalQuantity": "5", }, Object { - "ECommerce.city": "Omaha", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-09-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-09-01T00:00:00.000", + "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", + "ECommerce.totalQuantity": "3", }, Object { - "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-10-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-10-01T00:00:00.000", + "ECommerce.productName": "Anderson Hickey Conga Table Tops & Accessories", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.city": "Arlington", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-10-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-10-01T00:00:00.000", + "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "ECommerce.totalQuantity": "5", }, Object { - "ECommerce.city": "Bakersfield", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-10-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-10-01T00:00:00.000", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.city": "Bowling", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-10-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-10-01T00:00:00.000", + "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.city": "Columbus", - "ECommerce.count": 9, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-11-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", + "ECommerce.productName": "Google Nexus 5", + "ECommerce.totalQuantity": "11", }, Object { - "ECommerce.city": "Dallas", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-11-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.totalQuantity": "4", }, Object { - "ECommerce.city": "Detroit", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-11-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", + "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", + "ECommerce.totalQuantity": "3", }, Object { - "ECommerce.city": "Glendale", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-11-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.totalQuantity": "5", }, Object { - "ECommerce.city": "Lafayette", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-11-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", + "ECommerce.productName": "Logitech di_Novo Edge Keyboard", + "ECommerce.totalQuantity": "9", }, Object { - "ECommerce.city": "Lakewood", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-11-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", + "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "ECommerce.totalQuantity": "3", }, Object { - "ECommerce.city": "Marion", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-11-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", + "ECommerce.productName": "Recycled Eldon Regeneration Jumbo File", + "ECommerce.totalQuantity": "4", }, Object { - "ECommerce.city": "Morristown", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-11-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-11-01T00:00:00.000", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.totalQuantity": "4", }, Object { - "ECommerce.city": "New York City", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", + "ECommerce.productName": "Canon PC1080F Personal Copier", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.city": "Oakland", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", + "ECommerce.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", + "ECommerce.totalQuantity": "4", }, Object { - "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", + "ECommerce.totalQuantity": "5", }, Object { - "ECommerce.city": "Provo", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", + "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.city": "San Francisco", - "ECommerce.count": 2, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", + "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.city": "Vancouver", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", + "ECommerce.productName": "Okidata C610n Printer", + "ECommerce.totalQuantity": "2", + }, + Object { + "ECommerce.orderDate": "2020-12-01T00:00:00.000", + "ECommerce.orderDate.month": "2020-12-01T00:00:00.000", + "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "ECommerce.totalQuantity": "5", }, ] `; -exports[`Queries with the @cubejs-backend/bigquery-driver querying custom granularities ECommerce: count by half_year + no dimension 1`] = ` +exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: partitioned pre-agg higher granularity 1`] = ` Array [ Object { - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2019-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Anderson Hickey Conga Table Tops & Accessories", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.count": 17, - "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Balt Solid Wood Rectangular Table", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.count": 26, - "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Canon PC1080F Personal Copier", + "ECommerce.totalQuantity": "7", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying custom granularities ECommerce: count by half_year_by_1st_april + dimension 1`] = ` -Array [ Object { - "ECommerce.city": "Decatur", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "DMI Eclipse Executive Suite Bookcases", + "ECommerce.totalQuantity": "1", }, Object { - "ECommerce.city": "Detroit", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "ECommerce.totalQuantity": "8", }, Object { - "ECommerce.city": "Houston", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Google Nexus 5", + "ECommerce.totalQuantity": "11", }, Object { - "ECommerce.city": "Lorain", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Google Nexus 6", + "ECommerce.totalQuantity": "3", }, Object { - "ECommerce.city": "New York City", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Google Nexus 7", + "ECommerce.totalQuantity": "3", }, Object { - "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "HTC One", + "ECommerce.totalQuantity": "3", }, Object { - "ECommerce.city": "Arlington", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Harbour Creations 67200 Series Stacking Chairs", + "ECommerce.totalQuantity": "11", }, Object { - "ECommerce.city": "Auburn", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Hewlett Packard 610 Color Digital Copier / Printer", + "ECommerce.totalQuantity": "3", }, Object { - "ECommerce.city": "Bakersfield", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", + "ECommerce.totalQuantity": "4", }, Object { - "ECommerce.city": "Baltimore", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.0", + "ECommerce.totalQuantity": "5", }, Object { - "ECommerce.city": "Columbus", - "ECommerce.count": 4, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.1", + "ECommerce.totalQuantity": "5", }, Object { - "ECommerce.city": "Detroit", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Kingston Digital DataTraveler 16GB USB 2.2", + "ECommerce.totalQuantity": "8", }, Object { - "ECommerce.city": "Los Angeles", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "ECommerce.totalQuantity": "6", }, Object { - "ECommerce.city": "Louisville", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Linden 10 Round Wall Clock, Black", + "ECommerce.totalQuantity": "14", }, Object { - "ECommerce.city": "Morristown", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Logitech di_Novo Edge Keyboard", + "ECommerce.totalQuantity": "9", }, Object { - "ECommerce.city": "New York City", - "ECommerce.count": 3, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Magna Visual Magnetic Picture Hangers", + "ECommerce.totalQuantity": "4", }, Object { - "ECommerce.city": "Olympia", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "OIC #2 Pencils, Medium Soft", + "ECommerce.totalQuantity": "9", }, Object { - "ECommerce.city": "Omaha", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Okidata C610n Printer", + "ECommerce.totalQuantity": "2", }, Object { - "ECommerce.city": "Provo", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "ECommerce.totalQuantity": "8", }, Object { - "ECommerce.city": "Bowling", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "ECommerce.totalQuantity": "11", }, Object { - "ECommerce.city": "Columbus", - "ECommerce.count": 8, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Project Tote Personal File", + "ECommerce.totalQuantity": "1", }, Object { - "ECommerce.city": "Dallas", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Recycled Eldon Regeneration Jumbo File", + "ECommerce.totalQuantity": "4", }, Object { - "ECommerce.city": "Glendale", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", + "ECommerce.totalQuantity": "2", + }, + Object { + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "ECommerce.totalQuantity": "11", + }, + Object { + "ECommerce.orderDate": "2020-01-01T00:00:00.000", + "ECommerce.orderDate.year": "2020-01-01T00:00:00.000", + "ECommerce.productName": "Wausau Papers Astrobrights Colored Envelopes", + "ECommerce.totalQuantity": "3", + }, +] +`; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying Products: dimensions + order + limit + total 1`] = ` +Array [ + Object { + "Products.category": "Furniture", + "Products.productName": "DMI Eclipse Executive Suite Bookcases", + "Products.subCategory": "Bookcases", + }, + Object { + "Products.category": "Furniture", + "Products.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "Products.subCategory": "Bookcases", }, Object { - "ECommerce.city": "Lafayette", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Harbour Creations 67200 Series Stacking Chairs", + "Products.subCategory": "Chairs", }, Object { - "ECommerce.city": "Lakewood", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", + "Products.subCategory": "Chairs", }, Object { - "ECommerce.city": "Marion", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Linden 10 Round Wall Clock, Black", + "Products.subCategory": "Furnishings", }, Object { - "ECommerce.city": "New York City", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Magna Visual Magnetic Picture Hangers", + "Products.subCategory": "Furnishings", }, Object { - "ECommerce.city": "Oakland", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Anderson Hickey Conga Table Tops & Accessories", + "Products.subCategory": "Tables", }, Object { - "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Balt Solid Wood Rectangular Table", + "Products.subCategory": "Tables", }, Object { - "ECommerce.city": "San Francisco", - "ECommerce.count": 2, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "OIC #2 Pencils, Medium Soft", + "Products.subCategory": "Art", }, Object { - "ECommerce.city": "Vancouver", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "Products.subCategory": "Art", }, ] `; -exports[`Queries with the @cubejs-backend/bigquery-driver querying custom granularities ECommerce: count by half_year_by_1st_april + no dimension 1`] = ` +exports[`Queries with the @cubejs-backend/bigquery-driver querying Products: dimensions + order + limit 1`] = ` Array [ Object { - "ECommerce.count": 6, - "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "DMI Eclipse Executive Suite Bookcases", + "Products.subCategory": "Bookcases", }, Object { - "ECommerce.count": 18, - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "Products.subCategory": "Bookcases", }, Object { - "ECommerce.count": 20, - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Harbour Creations 67200 Series Stacking Chairs", + "Products.subCategory": "Chairs", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying custom granularities ECommerce: count by three_months_by_march + dimension 1`] = ` -Array [ Object { - "ECommerce.city": "Decatur", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-12-11T21:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2019-12-11T21:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", + "Products.subCategory": "Chairs", }, Object { - "ECommerce.city": "Detroit", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-12-11T21:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2019-12-11T21:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Linden 10 Round Wall Clock, Black", + "Products.subCategory": "Furnishings", }, Object { - "ECommerce.city": "Lorain", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2019-12-11T21:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2019-12-11T21:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Magna Visual Magnetic Picture Hangers", + "Products.subCategory": "Furnishings", }, Object { - "ECommerce.city": "Auburn", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Anderson Hickey Conga Table Tops & Accessories", + "Products.subCategory": "Tables", }, Object { - "ECommerce.city": "Baltimore", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Balt Solid Wood Rectangular Table", + "Products.subCategory": "Tables", }, Object { - "ECommerce.city": "Columbus", - "ECommerce.count": 2, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "OIC #2 Pencils, Medium Soft", + "Products.subCategory": "Art", }, Object { - "ECommerce.city": "Houston", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "Products.subCategory": "Art", }, +] +`; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying Products: dimensions + order + total 1`] = ` +Array [ Object { - "ECommerce.city": "Los Angeles", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "DMI Eclipse Executive Suite Bookcases", + "Products.subCategory": "Bookcases", }, Object { - "ECommerce.city": "Louisville", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "Products.subCategory": "Bookcases", }, Object { - "ECommerce.city": "New York City", - "ECommerce.count": 3, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Harbour Creations 67200 Series Stacking Chairs", + "Products.subCategory": "Chairs", }, Object { - "ECommerce.city": "Omaha", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", + "Products.subCategory": "Chairs", }, Object { - "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Linden 10 Round Wall Clock, Black", + "Products.subCategory": "Furnishings", }, Object { - "ECommerce.city": "Arlington", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-06-18T03:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-18T03:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Magna Visual Magnetic Picture Hangers", + "Products.subCategory": "Furnishings", }, Object { - "ECommerce.city": "Bakersfield", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-06-18T03:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-18T03:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Anderson Hickey Conga Table Tops & Accessories", + "Products.subCategory": "Tables", }, Object { - "ECommerce.city": "Columbus", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-06-18T03:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-18T03:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Balt Solid Wood Rectangular Table", + "Products.subCategory": "Tables", }, Object { - "ECommerce.city": "Detroit", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-06-18T03:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-18T03:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "OIC #2 Pencils, Medium Soft", + "Products.subCategory": "Art", }, Object { - "ECommerce.city": "Morristown", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-06-18T03:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-18T03:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "Products.subCategory": "Art", }, Object { - "ECommerce.city": "New York City", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-06-18T03:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-18T03:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", + "Products.subCategory": "Envelopes", }, Object { - "ECommerce.city": "Olympia", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-06-18T03:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-18T03:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "Wausau Papers Astrobrights Colored Envelopes", + "Products.subCategory": "Envelopes", }, Object { - "ECommerce.city": "Provo", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-06-18T03:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-18T03:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "Products.subCategory": "Fasteners", }, Object { - "ECommerce.city": "Bowling", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "Products.subCategory": "Fasteners", }, Object { - "ECommerce.city": "Columbus", - "ECommerce.count": 8, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "Project Tote Personal File", + "Products.subCategory": "Storage", }, Object { - "ECommerce.city": "Dallas", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Office Supplies", + "Products.productName": "Recycled Eldon Regeneration Jumbo File", + "Products.subCategory": "Storage", + }, + Object { + "Products.category": "Technology", + "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.0", + "Products.subCategory": "Accessories", + }, + Object { + "Products.category": "Technology", + "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.1", + "Products.subCategory": "Accessories", }, Object { - "ECommerce.city": "Glendale", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Technology", + "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.2", + "Products.subCategory": "Accessories", }, Object { - "ECommerce.city": "Lakewood", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Technology", + "Products.productName": "Logitech di_Novo Edge Keyboard", + "Products.subCategory": "Accessories", }, Object { - "ECommerce.city": "Marion", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Technology", + "Products.productName": "Canon PC1080F Personal Copier", + "Products.subCategory": "Copiers", }, Object { - "ECommerce.city": "New York City", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Technology", + "Products.productName": "Hewlett Packard 610 Color Digital Copier / Printer", + "Products.subCategory": "Copiers", }, Object { - "ECommerce.city": "Oakland", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Technology", + "Products.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "Products.subCategory": "Machines", }, Object { - "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Technology", + "Products.productName": "Okidata C610n Printer", + "Products.subCategory": "Machines", }, Object { - "ECommerce.city": "San Francisco", - "ECommerce.count": 2, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Technology", + "Products.productName": "Google Nexus 5", + "Products.subCategory": "Phones", }, Object { - "ECommerce.city": "Vancouver", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Technology", + "Products.productName": "Google Nexus 6", + "Products.subCategory": "Phones", }, Object { - "ECommerce.city": "Columbus", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-12-24T09:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-12-24T09:00:00.000", + "Products.category": "Technology", + "Products.productName": "Google Nexus 7", + "Products.subCategory": "Phones", }, Object { - "ECommerce.city": "Lafayette", - "ECommerce.count": 1, - "ECommerce.customOrderDateNoPreAgg": "2020-12-24T09:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-12-24T09:00:00.000", + "Products.category": "Technology", + "Products.productName": "HTC One", + "Products.subCategory": "Phones", }, ] `; -exports[`Queries with the @cubejs-backend/bigquery-driver querying custom granularities ECommerce: count by three_months_by_march + no dimension 1`] = ` +exports[`Queries with the @cubejs-backend/bigquery-driver querying Products: dimensions + order 1`] = ` Array [ Object { - "ECommerce.count": 3, - "ECommerce.customOrderDateNoPreAgg": "2019-12-11T21:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2019-12-11T21:00:00.000", + "Products.category": "Furniture", + "Products.productName": "DMI Eclipse Executive Suite Bookcases", + "Products.subCategory": "Bookcases", }, Object { - "ECommerce.count": 12, - "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Global Adaptabilites Bookcase, Cherry/Storm Gray Finish", + "Products.subCategory": "Bookcases", }, Object { - "ECommerce.count": 8, - "ECommerce.customOrderDateNoPreAgg": "2020-06-18T03:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-18T03:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Harbour Creations 67200 Series Stacking Chairs", + "Products.subCategory": "Chairs", }, Object { - "ECommerce.count": 19, - "ECommerce.customOrderDateNoPreAgg": "2020-09-21T06:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-21T06:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Iceberg Nesting Folding Chair, 19w x 6d x 43h", + "Products.subCategory": "Chairs", }, Object { - "ECommerce.count": 2, - "ECommerce.customOrderDateNoPreAgg": "2020-12-24T09:00:00.000", - "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-12-24T09:00:00.000", + "Products.category": "Furniture", + "Products.productName": "Linden 10 Round Wall Clock, Black", + "Products.subCategory": "Furnishings", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByLeading 1`] = ` -Array [ Object { - "ECommerce.customOrderDateNoPreAgg": "2019-12-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2019-12-01T10:00:00.000", - "ECommerce.rollingCountByLeading": 8, + "Products.category": "Furniture", + "Products.productName": "Magna Visual Magnetic Picture Hangers", + "Products.subCategory": "Furnishings", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-02-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-02-01T10:00:00.000", - "ECommerce.rollingCountByLeading": 12, + "Products.category": "Furniture", + "Products.productName": "Anderson Hickey Conga Table Tops & Accessories", + "Products.subCategory": "Tables", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-04-01T10:00:00.000", - "ECommerce.rollingCountByLeading": 6, + "Products.category": "Furniture", + "Products.productName": "Balt Solid Wood Rectangular Table", + "Products.subCategory": "Tables", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-06-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-06-01T10:00:00.000", - "ECommerce.rollingCountByLeading": 19, + "Products.category": "Office Supplies", + "Products.productName": "OIC #2 Pencils, Medium Soft", + "Products.subCategory": "Art", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-08-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-08-01T10:00:00.000", - "ECommerce.rollingCountByLeading": 16, + "Products.category": "Office Supplies", + "Products.productName": "Panasonic KP-380BK Classic Electric Pencil Sharpener", + "Products.subCategory": "Art", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-10-01T10:00:00.000", - "ECommerce.rollingCountByLeading": null, + "Products.category": "Office Supplies", + "Products.productName": "Tyvek Side-Opening Peel & Seel Expanding Envelopes", + "Products.subCategory": "Envelopes", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-12-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-12-01T10:00:00.000", - "ECommerce.rollingCountByLeading": null, + "Products.category": "Office Supplies", + "Products.productName": "Wausau Papers Astrobrights Colored Envelopes", + "Products.subCategory": "Envelopes", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByTrailing 1`] = ` -Array [ Object { - "ECommerce.customOrderDateNoPreAgg": "2019-12-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2019-12-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": 3, + "Products.category": "Office Supplies", + "Products.productName": "Plymouth Boxed Rubber Bands by Plymouth", + "Products.subCategory": "Fasteners", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-02-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-02-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": 3, + "Products.category": "Office Supplies", + "Products.productName": "Vinyl Coated Wire Paper Clips in Organizer Box, 800/Box", + "Products.subCategory": "Fasteners", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-04-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": 12, + "Products.category": "Office Supplies", + "Products.productName": "Project Tote Personal File", + "Products.subCategory": "Storage", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-06-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-06-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": null, + "Products.category": "Office Supplies", + "Products.productName": "Recycled Eldon Regeneration Jumbo File", + "Products.subCategory": "Storage", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-08-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-08-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": 10, + "Products.category": "Technology", + "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.0", + "Products.subCategory": "Accessories", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-10-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": 16, + "Products.category": "Technology", + "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.1", + "Products.subCategory": "Accessories", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-12-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-12-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": null, + "Products.category": "Technology", + "Products.productName": "Kingston Digital DataTraveler 16GB USB 2.2", + "Products.subCategory": "Accessories", }, -] -`; - -exports[`Queries with the @cubejs-backend/bigquery-driver querying custom granularities ECommerce: count by two_mo_by_feb + no dimension + rollingCountByUnbounded 1`] = ` -Array [ Object { - "ECommerce.customOrderDateNoPreAgg": "2019-12-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2019-12-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 3, + "Products.category": "Technology", + "Products.productName": "Logitech di_Novo Edge Keyboard", + "Products.subCategory": "Accessories", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-02-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-02-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 6, + "Products.category": "Technology", + "Products.productName": "Canon PC1080F Personal Copier", + "Products.subCategory": "Copiers", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-04-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-04-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 18, + "Products.category": "Technology", + "Products.productName": "Hewlett Packard 610 Color Digital Copier / Printer", + "Products.subCategory": "Copiers", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-06-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-06-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 18, + "Products.category": "Technology", + "Products.productName": "Lexmark 20R1285 X6650 Wireless All-in-One Printer", + "Products.subCategory": "Machines", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-08-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-08-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 28, + "Products.category": "Technology", + "Products.productName": "Okidata C610n Printer", + "Products.subCategory": "Machines", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-10-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-10-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 44, + "Products.category": "Technology", + "Products.productName": "Google Nexus 5", + "Products.subCategory": "Phones", }, Object { - "ECommerce.customOrderDateNoPreAgg": "2020-12-01T10:00:00.000", - "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-12-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 44, + "Products.category": "Technology", + "Products.productName": "Google Nexus 6", + "Products.subCategory": "Phones", + }, + Object { + "Products.category": "Technology", + "Products.productName": "Google Nexus 7", + "Products.subCategory": "Phones", + }, + Object { + "Products.category": "Technology", + "Products.productName": "HTC One", + "Products.subCategory": "Phones", }, ] `; diff --git a/packages/cubejs-testing/birdbox-fixtures/postgresql/schema/Orders.js b/packages/cubejs-testing/birdbox-fixtures/postgresql/schema/Orders.js index 52ebd16fb39d7..71d2dee68968a 100644 --- a/packages/cubejs-testing/birdbox-fixtures/postgresql/schema/Orders.js +++ b/packages/cubejs-testing/birdbox-fixtures/postgresql/schema/Orders.js @@ -26,7 +26,7 @@ cube(`Orders`, { type: `number` }, amountRank: { - post_aggregate: true, + multi_stage: true, type: `rank`, order_by: [{ sql: `${totalAmount}`, @@ -35,23 +35,23 @@ cube(`Orders`, { reduce_by: [status], }, amountReducedByStatus: { - post_aggregate: true, + multi_stage: true, type: `sum`, sql: `${totalAmount}`, reduce_by: [status], }, statusPercentageOfTotal: { - post_aggregate: true, + multi_stage: true, sql: `${totalAmount} / NULLIF(${amountReducedByStatus}, 0)`, type: `number`, }, amountRankView: { - post_aggregate: true, + multi_stage: true, type: `number`, sql: `${amountRank}`, }, amountRankDateMax: { - post_aggregate: true, + multi_stage: true, sql: `${createdAt}`, type: `max`, filters: [{ @@ -59,7 +59,7 @@ cube(`Orders`, { }] }, amountRankDate: { - post_aggregate: true, + multi_stage: true, sql: `${amountRankDateMax}`, type: `time`, }, @@ -102,4 +102,4 @@ view(`OrdersView`, { includes: `*`, excludes: [`toRemove`] }] -}); \ No newline at end of file +}); diff --git a/packages/cubejs-testing/test/smoke-cubesql.test.ts b/packages/cubejs-testing/test/smoke-cubesql.test.ts index d4a1e38673d78..f444e16f61e71 100644 --- a/packages/cubejs-testing/test/smoke-cubesql.test.ts +++ b/packages/cubejs-testing/test/smoke-cubesql.test.ts @@ -328,7 +328,7 @@ describe('SQL API', () => { expect(res.rows).toMatchSnapshot('metabase max number'); }); - test('power bi post aggregate measure wrap', async () => { + test('power bi multi stage measure wrap', async () => { const res = await connection.query(` select "_"."createdAt", @@ -361,7 +361,7 @@ describe('SQL API', () => { limit 1000001 `); - expect(res.rows).toMatchSnapshot('power bi post aggregate measure wrap'); + expect(res.rows).toMatchSnapshot('power bi multi stage measure wrap'); }); test('percentage of total sum', async () => { @@ -414,9 +414,9 @@ describe('SQL API', () => { test('select null in subquery with streaming', async () => { const query = ` SELECT * FROM ( - SELECT NULL AS "usr", - value AS val - FROM "SegmentTest" WHERE segment_eq_1 IS FALSE + SELECT NULL AS "usr", + value AS val + FROM "SegmentTest" WHERE segment_eq_1 IS FALSE ORDER BY value ) "y";`; const res = await connection.query(query); @@ -425,7 +425,7 @@ describe('SQL API', () => { test('tableau bi fiscal year query', async () => { const query = ` - SELECT + SELECT CAST("orders"."status" AS TEXT) AS "status", CAST(TRUNC(EXTRACT(YEAR FROM ("orders"."createdAt" + 11 * INTERVAL '1 MONTH'))) AS INT) AS "yr:created_at:ok" FROM @@ -438,7 +438,7 @@ describe('SQL API', () => { test('query with intervals', async () => { const query = ` - SELECT + SELECT "orders"."createdAt" AS "timestamp", "orders"."createdAt" + 11 * INTERVAL '1 YEAR' AS "c0", "orders"."createdAt" + 11 * INTERVAL '2 MONTH' AS "c1", @@ -454,7 +454,7 @@ describe('SQL API', () => { test('query with intervals (SQL PUSH DOWN)', async () => { const query = ` - SELECT + SELECT CONCAT(DATE(createdAt), ' :') AS d, "orders"."createdAt" + 11 * INTERVAL '1 YEAR' AS "c0", "orders"."createdAt" + 11 * INTERVAL '2 MONTH' AS "c1",