From 2ccbb62fba19fc092e4314d79f244d7ce0139a84 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Thu, 17 Apr 2025 14:18:33 +0300 Subject: [PATCH 01/11] code hygiene --- packages/cubejs-postgres-driver/src/PostgresDriver.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cubejs-postgres-driver/src/PostgresDriver.ts b/packages/cubejs-postgres-driver/src/PostgresDriver.ts index e9a5a0dacb162..0a625bcf4e9a1 100644 --- a/packages/cubejs-postgres-driver/src/PostgresDriver.ts +++ b/packages/cubejs-postgres-driver/src/PostgresDriver.ts @@ -310,7 +310,7 @@ export class PostgresDriver Date: Thu, 17 Apr 2025 15:50:29 +0300 Subject: [PATCH 02/11] upgrade mssql pkg --- packages/cubejs-mssql-driver/package.json | 4 +- yarn.lock | 93 ++++++++++++++--------- 2 files changed, 60 insertions(+), 37 deletions(-) diff --git a/packages/cubejs-mssql-driver/package.json b/packages/cubejs-mssql-driver/package.json index 36769fd4f8a1a..d0eb410921766 100644 --- a/packages/cubejs-mssql-driver/package.json +++ b/packages/cubejs-mssql-driver/package.json @@ -14,10 +14,10 @@ "main": "driver/MSSqlDriver.js", "dependencies": { "@cubejs-backend/base-driver": "1.3.5", - "mssql": "^10.0.2" + "mssql": "^11.0.1" }, "devDependencies": { - "@types/mssql": "^9.1.5", + "@types/mssql": "^9.1.7", "@types/node": "^20" }, "jest": { diff --git a/yarn.lock b/yarn.lock index 3aea5a52362b2..c414be1bfacde 100644 --- a/yarn.lock +++ b/yarn.lock @@ -970,7 +970,7 @@ dependencies: tslib "^2.6.2" -"@azure/core-auth@^1.3.0", "@azure/core-auth@^1.4.0", "@azure/core-auth@^1.5.0", "@azure/core-auth@^1.8.0", "@azure/core-auth@^1.9.0": +"@azure/core-auth@^1.3.0", "@azure/core-auth@^1.4.0", "@azure/core-auth@^1.5.0", "@azure/core-auth@^1.7.2", "@azure/core-auth@^1.8.0", "@azure/core-auth@^1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@azure/core-auth/-/core-auth-1.9.0.tgz#ac725b03fabe3c892371065ee9e2041bee0fd1ac" integrity sha512-FPwHpZywuyasDSLMqJ6fhbOK3TqUdviZNF8OqRGA4W5Ewib2lEEZ+pBsYcBa88B2NGO/SEnYPGhyBqNlE8ilSw== @@ -1075,10 +1075,10 @@ stoppable "^1.1.0" tslib "^2.2.0" -"@azure/identity@^4.4.1": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@azure/identity/-/identity-4.8.0.tgz#686682683a470ccf4dbb2597ee234f9c5c483a40" - integrity sha512-l9ALUGHtFB/JfsqmA+9iYAp2a+cCwdNO/cyIr2y7nJLJsz1aae6qVP8XxT7Kbudg0IQRSIMXj0+iivFdbD1xPA== +"@azure/identity@^4.2.1", "@azure/identity@^4.4.1": + version "4.9.0" + resolved "https://registry.yarnpkg.com/@azure/identity/-/identity-4.9.0.tgz#226c21bcb706401d1e2425834158e448f8d01209" + integrity sha512-dz2ZvKxDFoTUmJgmkCBVcyuKckgqE1qVxrRPzUhyKN7FyvUbtNPUrGzqSllOAf1OL9TMGgYqZWbIyD0b/AE15g== dependencies: "@azure/abort-controller" "^2.0.0" "@azure/core-auth" "^1.9.0" @@ -1088,11 +1088,8 @@ "@azure/core-util" "^1.11.0" "@azure/logger" "^1.0.0" "@azure/msal-browser" "^4.2.0" - "@azure/msal-node" "^3.2.3" - events "^3.0.0" - jws "^4.0.0" + "@azure/msal-node" "^3.5.0" open "^10.1.0" - stoppable "^1.1.0" tslib "^2.2.0" "@azure/keyvault-keys@^4.4.0": @@ -1143,6 +1140,11 @@ resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-15.2.1.tgz#5e05627d038b6a1193ee9c7786c58c69031eb8eb" integrity sha512-eZHtYE5OHDN0o2NahCENkczQ6ffGc0MoUSAI3hpwGpZBHJXaEQMMZPWtIx86da2L9w7uT+Tr/xgJbGwIkvTZTQ== +"@azure/msal-common@15.5.1": + version "15.5.1" + resolved "https://registry.yarnpkg.com/@azure/msal-common/-/msal-common-15.5.1.tgz#3b34c81013530e1425a1fad40f3ac1238e1780f8" + integrity sha512-oxK0khbc4Bg1bKQnqDr7ikULhVL2OHgSrIq0Vlh4b6+hm4r0lr6zPMQE8ZvmacJuh+ZZGKBM5iIObhF1q1QimQ== + "@azure/msal-node@^2.5.1": version "2.16.2" resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-2.16.2.tgz#3eb768d36883ea6f9a939c0b5b467b518e78fffc" @@ -1152,12 +1154,12 @@ jsonwebtoken "^9.0.0" uuid "^8.3.0" -"@azure/msal-node@^3.2.3": - version "3.3.0" - resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-3.3.0.tgz#996fee52ad277ae0558f7482ac2657f5164fc9f1" - integrity sha512-ulsT3EHF1RQ29X55cxBLgKsIKWni9JdbUqG7sipGVP4uhWcBpmm/vhKOMH340+27Acm9+kHGnN/5XmQ5LrIDgA== +"@azure/msal-node@^3.2.3", "@azure/msal-node@^3.5.0": + version "3.5.1" + resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-3.5.1.tgz#8bb233cbeeda83f64af4cc29569f1b5312c9b9ad" + integrity sha512-dkgMYM5B6tI88r/oqf5bYd93WkenQpaWwiszJDk7avVjso8cmuKRTW97dA1RMi6RhihZFLtY1VtWxU9+sW2T5g== dependencies: - "@azure/msal-common" "15.2.1" + "@azure/msal-common" "15.5.1" jsonwebtoken "^9.0.0" uuid "^8.3.0" @@ -6605,10 +6607,10 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@js-joda/core@^5.5.3": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-5.6.2.tgz#1885d10daa404cea2bd55575f910ab3bbe6c33d7" - integrity sha512-ow4R+7C24xeTjiMTTZ4k6lvxj7MRBqvqLCQjThQff3RjOmIMokMP20LNYVFhGafJtUx/Xo2Qp4qU8eNoTVH0SA== +"@js-joda/core@^5.5.3", "@js-joda/core@^5.6.1": + version "5.6.5" + resolved "https://registry.yarnpkg.com/@js-joda/core/-/core-5.6.5.tgz#c766894b49eb8044480b91625fb7dc370e8182ef" + integrity sha512-3zwefSMwHpu8iVUW8YYz227sIv6UFqO31p1Bf1ZH/Vom7CmNyUsXjDBlnNzcuhmOL1XfxZ3nvND42kR23XlbcQ== "@jsonjoy.com/base64@^1.1.1": version "1.1.2" @@ -10274,14 +10276,14 @@ dependencies: moment-range "*" -"@types/mssql@^9.1.5": - version "9.1.5" - resolved "https://registry.yarnpkg.com/@types/mssql/-/mssql-9.1.5.tgz#1574a5870aeb029c6d787861af101161b9b8d3b6" - integrity sha512-Q9EsgXwuRoX5wvUSu24YfbKMbFChv7pZ/jeCzPkj47ehcuXYsBcfogwrtVFosSjinD4Q/MY2YPGk9Yy1cM2Ywg== +"@types/mssql@^9.1.7": + version "9.1.7" + resolved "https://registry.yarnpkg.com/@types/mssql/-/mssql-9.1.7.tgz#401763192abceea8b62fab886ba59e08b55be627" + integrity sha512-eIOEe78nuSW5KctDHImDhLZ9a+jV/z/Xs5RBhcG/jrk+YWqhdNmzBmHVWV7aWQ5fW+jbIGtX6Ph+bbVqfhzafg== dependencies: "@types/node" "*" - "@types/tedious" "*" tarn "^3.0.1" + tedious "*" "@types/mute-stream@^0.0.4": version "0.0.4" @@ -10312,7 +10314,7 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^18", "@types/node@^20", "@types/node@^22.5.5": +"@types/node@*", "@types/node@>=18", "@types/node@^18", "@types/node@^20", "@types/node@^22.5.5": version "20.17.28" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.17.28.tgz#c10436f3a3c996f535919a9b082e2c47f19c40a1" integrity sha512-DHlH/fNL6Mho38jTy7/JT7sn2wnXI+wULR6PV4gy4VHLVvnrV/d3pHAMQHhc4gjdLmK2ZiPoMxzp6B3yRajLSQ== @@ -10610,13 +10612,6 @@ dependencies: "@types/acorn" "*" -"@types/tedious@*": - version "4.0.14" - resolved "https://registry.yarnpkg.com/@types/tedious/-/tedious-4.0.14.tgz#868118e7a67808258c05158e9cad89ca58a2aec1" - integrity sha512-KHPsfX/FoVbUGbyYvk1q9MMQHLPeRZhRJZdO45Q4YjvFkv4hMNghCWTvy7rdKessBsmtz4euWCWAB6/tVpI1Iw== - dependencies: - "@types/node" "*" - "@types/throttle-debounce@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz#1c3df624bfc4b62f992d3012b84c56d41eab3776" @@ -12707,10 +12702,10 @@ bl@^4.0.3, bl@^4.1.0: inherits "^2.0.4" readable-stream "^3.4.0" -bl@^6.0.3: - version "6.0.12" - resolved "https://registry.yarnpkg.com/bl/-/bl-6.0.12.tgz#77c35b96e13aeff028496c798b75389ddee9c7f8" - integrity sha512-EnEYHilP93oaOa2MnmNEjAcovPS3JlQZOyzGXi3EyEpPhm9qWvdDp7BmAVEVusGzp8LlwQK56Av+OkDoRjzE0w== +bl@^6.0.11, bl@^6.0.3: + version "6.1.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-6.1.0.tgz#cc35ce7a2e8458caa8c8fb5deeed6537b73e4504" + integrity sha512-ClDyJGQkc8ZtzdAAbAwBmhMSpwN/sC9HA8jxdYm6nVUbCfZbe2mgza4qh7AuEYyEPB/c4Kznf9s66bnsKMQDjw== dependencies: "@types/readable-stream" "^4.0.0" buffer "^6.0.3" @@ -21255,6 +21250,18 @@ mssql@^10.0.2: tarn "^3.0.2" tedious "^16.4.0" +mssql@^11.0.1: + version "11.0.1" + resolved "https://registry.yarnpkg.com/mssql/-/mssql-11.0.1.tgz#a32ab7763bfbb3f5d970e47563df3911fc04e21d" + integrity sha512-KlGNsugoT90enKlR8/G36H0kTxPthDhmtNUCwEHvgRza5Cjpjoj+P2X6eMpFUDN7pFrJZsKadL4x990G8RBE1w== + dependencies: + "@tediousjs/connection-string" "^0.5.0" + commander "^11.0.0" + debug "^4.3.3" + rfdc "^1.3.0" + tarn "^3.0.2" + tedious "^18.2.1" + multicast-dns@^7.2.5: version "7.2.5" resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-7.2.5.tgz#77eb46057f4d7adbd16d9290fa7299f6fa64cced" @@ -26702,6 +26709,22 @@ tarn@^3.0.1, tarn@^3.0.2: resolved "https://registry.yarnpkg.com/tarn/-/tarn-3.0.2.tgz#73b6140fbb881b71559c4f8bfde3d9a4b3d27693" integrity sha512-51LAVKUSZSVfI05vjPESNc5vwqqZpbXCsU+/+wxlOrUjk2SnFTt97v9ZgQrD4YmxYW1Px6w2KjaDitCfkvgxMQ== +tedious@*, tedious@^18.2.1: + version "18.6.1" + resolved "https://registry.yarnpkg.com/tedious/-/tedious-18.6.1.tgz#1c4a3f06c891be67a032117e2e25193286d44496" + integrity sha512-9AvErXXQTd6l7TDd5EmM+nxbOGyhnmdbp/8c3pw+tjaiSXW9usME90ET/CRG1LN1Y9tPMtz/p83z4Q97B4DDpw== + dependencies: + "@azure/core-auth" "^1.7.2" + "@azure/identity" "^4.2.1" + "@azure/keyvault-keys" "^4.4.0" + "@js-joda/core" "^5.6.1" + "@types/node" ">=18" + bl "^6.0.11" + iconv-lite "^0.6.3" + js-md4 "^0.3.2" + native-duplexpair "^1.0.0" + sprintf-js "^1.1.3" + tedious@^16.4.0: version "16.7.1" resolved "https://registry.yarnpkg.com/tedious/-/tedious-16.7.1.tgz#1190f30fd99a413f1dc9250dee4835cf0788b650" From e29e659283a5837db19ad1f6db08d3b80036b3fc Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Thu, 17 Apr 2025 19:33:48 +0300 Subject: [PATCH 03/11] Switch to ts --- packages/cubejs-base-driver/src/BaseDriver.ts | 2 +- packages/cubejs-mssql-driver/.gitignore | 1 + .../cubejs-mssql-driver/driver/index.d.ts | 9 -- packages/cubejs-mssql-driver/index.js | 11 ++ packages/cubejs-mssql-driver/package.json | 2 +- .../MSSqlDriver.js => src/MSSqlDriver.ts} | 123 +++++++++++------- .../QueryStream.js => src/QueryStream.ts} | 31 ++--- packages/cubejs-mssql-driver/src/index.ts | 5 + packages/cubejs-mssql-driver/tsconfig.json | 12 ++ tsconfig.json | 3 + 10 files changed, 128 insertions(+), 71 deletions(-) create mode 100644 packages/cubejs-mssql-driver/.gitignore delete mode 100644 packages/cubejs-mssql-driver/driver/index.d.ts create mode 100644 packages/cubejs-mssql-driver/index.js rename packages/cubejs-mssql-driver/{driver/MSSqlDriver.js => src/MSSqlDriver.ts} (68%) rename packages/cubejs-mssql-driver/{driver/QueryStream.js => src/QueryStream.ts} (59%) create mode 100644 packages/cubejs-mssql-driver/src/index.ts create mode 100644 packages/cubejs-mssql-driver/tsconfig.json diff --git a/packages/cubejs-base-driver/src/BaseDriver.ts b/packages/cubejs-base-driver/src/BaseDriver.ts index fc2890b1ae4e7..d9b5123604c8d 100644 --- a/packages/cubejs-base-driver/src/BaseDriver.ts +++ b/packages/cubejs-base-driver/src/BaseDriver.ts @@ -408,7 +408,7 @@ export abstract class BaseDriver implements DriverInterface { }; } - public readOnly() { + public readOnly(): boolean { return false; } diff --git a/packages/cubejs-mssql-driver/.gitignore b/packages/cubejs-mssql-driver/.gitignore new file mode 100644 index 0000000000000..1521c8b7652b1 --- /dev/null +++ b/packages/cubejs-mssql-driver/.gitignore @@ -0,0 +1 @@ +dist diff --git a/packages/cubejs-mssql-driver/driver/index.d.ts b/packages/cubejs-mssql-driver/driver/index.d.ts deleted file mode 100644 index e403e7dc6f9ae..0000000000000 --- a/packages/cubejs-mssql-driver/driver/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { BaseDriver } from "@cubejs-backend/query-orchestrator"; -import { config } from "mssql"; - -declare module "@cubejs-backend/mssql-driver" { - export default class MSSqlDriver extends BaseDriver { - constructor(options?: config); - release(): Promise - } -} diff --git a/packages/cubejs-mssql-driver/index.js b/packages/cubejs-mssql-driver/index.js new file mode 100644 index 0000000000000..b925f7fdcf294 --- /dev/null +++ b/packages/cubejs-mssql-driver/index.js @@ -0,0 +1,11 @@ +const fromExports = require('./dist/src'); +const { MSSqlDriver } = require('./dist/src/MSSqlDriver'); + +const toExport = MSSqlDriver; + +// eslint-disable-next-line no-restricted-syntax +for (const [key, module] of Object.entries(fromExports)) { + toExport[key] = module; +} + +module.exports = toExport; diff --git a/packages/cubejs-mssql-driver/package.json b/packages/cubejs-mssql-driver/package.json index d0eb410921766..4d25cd81cb1de 100644 --- a/packages/cubejs-mssql-driver/package.json +++ b/packages/cubejs-mssql-driver/package.json @@ -11,7 +11,7 @@ "engines": { "node": "^14.0.0 || ^16.0.0 || >=17.0.0" }, - "main": "driver/MSSqlDriver.js", + "main": "index.js", "dependencies": { "@cubejs-backend/base-driver": "1.3.5", "mssql": "^11.0.1" diff --git a/packages/cubejs-mssql-driver/driver/MSSqlDriver.js b/packages/cubejs-mssql-driver/src/MSSqlDriver.ts similarity index 68% rename from packages/cubejs-mssql-driver/driver/MSSqlDriver.js rename to packages/cubejs-mssql-driver/src/MSSqlDriver.ts index 00bd431b4c4e5..0b2b4bbc6f563 100644 --- a/packages/cubejs-mssql-driver/driver/MSSqlDriver.js +++ b/packages/cubejs-mssql-driver/src/MSSqlDriver.ts @@ -4,16 +4,31 @@ * @fileoverview The `MSSqlDriver` and related types declaration. */ -const { +import sql, { ConnectionPool, config as MsSQLConfig } from 'mssql'; +import { getEnv, assertDataSource, -} = require('@cubejs-backend/shared'); -const sql = require('mssql'); -const { BaseDriver } = require('@cubejs-backend/base-driver'); -const QueryStream = require('./QueryStream'); - +} from '@cubejs-backend/shared'; +import { + BaseDriver, + DriverInterface, + StreamOptions, + DownloadQueryResultsOptions, + TableStructure, + DriverCapabilities, + DownloadQueryResultsResult, TableColumnQueryResult, +} from '@cubejs-backend/base-driver'; +import { QueryStream } from './QueryStream'; + +// ********* Value converters ***************** // +// sql.valueHandler.set(sql.TYPES.Int, (value) => value + 1); + +export type MSSqlDriverConfiguration = Omit & { + readOnly?: boolean; + server?: string; +} -const GenericTypeToMSSql = { +const GenericTypeToMSSql: Record = { boolean: 'bit', string: 'nvarchar(max)', text: 'nvarchar(max)', @@ -21,7 +36,7 @@ const GenericTypeToMSSql = { uuid: 'uniqueidentifier' }; -const MSSqlToGenericType = { +const MSSqlToGenericType: Record = { bit: 'boolean', uniqueidentifier: 'uuid', datetime2: 'timestamp' @@ -30,7 +45,12 @@ const MSSqlToGenericType = { /** * MS SQL driver class. */ -class MSSqlDriver extends BaseDriver { +export class MSSqlDriver extends BaseDriver implements DriverInterface { + + private readonly connectionPool: ConnectionPool; + private readonly initialConnectPromise: Promise; + private readonly config: MSSqlDriverConfiguration; + /** * Returns default concurrency value. */ @@ -41,7 +61,25 @@ class MSSqlDriver extends BaseDriver { /** * Class constructor. */ - constructor(config = {}) { + constructor(config: MSSqlDriverConfiguration & { + /** + * Data source name. + */ + dataSource?: string, + + /** + * Max pool size value for the [cube]<-->[db] pool. + */ + maxPoolSize?: number, + + /** + * Time to wait for a response from a connection after validation + * request before determining it as not valid. Default - 10000 ms. + */ + testConnectionTimeout?: number, + server?: string, + } = {} + ) { super({ testConnectionTimeout: config.testConnectionTimeout, }); @@ -78,14 +116,14 @@ class MSSqlDriver extends BaseDriver { ...config }; const { readOnly, ...poolConfig } = this.config; - this.connectionPool = new sql.ConnectionPool(poolConfig); + this.connectionPool = new ConnectionPool(poolConfig as MsSQLConfig); this.initialConnectPromise = this.connectionPool.connect(); } /** * Returns the configurable driver options * Note: It returns the unprefixed option names. - * In case of using multisources options need to be prefixed manually. + * In case of using multi sources options need to be prefixed manually. */ static driverEnvVariables() { return [ @@ -98,8 +136,9 @@ class MSSqlDriver extends BaseDriver { ]; } - testConnection() { - return this.initialConnectPromise.then((pool) => pool.request().query('SELECT 1 as number')); + public async testConnection() { + const conn = await this.initialConnectPromise.then((pool: ConnectionPool) => pool.request()); + await conn.query('SELECT 1 as number'); } /** @@ -110,11 +149,7 @@ class MSSqlDriver extends BaseDriver { * @param {{ highWaterMark: number? }} options * @return {Promise} */ - async stream( - query, - values, - options, - ) { + public async stream(query: string, values: unknown[], { highWaterMark }: StreamOptions) { const pool = await this.initialConnectPromise; const request = pool.request(); @@ -124,15 +159,15 @@ class MSSqlDriver extends BaseDriver { }); request.query(query); - const stream = new QueryStream(request, options?.highWaterMark); - const fields = await new Promise((resolve, reject) => { + const stream = new QueryStream(request, highWaterMark); + const fields: TableStructure = await new Promise((resolve, reject) => { request.on('recordset', (columns) => { resolve(this.mapFields(columns)); }); - request.on('error', (err) => { + request.on('error', (err: Error) => { reject(err); }); - stream.on('error', (err) => { + stream.on('error', (err: Error) => { reject(err); }) }); @@ -161,7 +196,7 @@ class MSSqlDriver extends BaseDriver { * } * }} fields */ - mapFields(fields) { + mapFields(fields: Record) { return Object.keys(fields).map((field) => { let type; switch (fields[field].type) { @@ -231,9 +266,9 @@ class MSSqlDriver extends BaseDriver { }); } - query(query, values) { - let cancelFn = null; - const promise = this.initialConnectPromise.then((pool) => { + public async query(query: string, values: unknown[]) { + let cancelFn: (() => void) | null = null; + const promise: any = this.initialConnectPromise.then((pool) => { const request = pool.request(); (values || []).forEach((v, i) => request.input(`_${i + 1}`, v)); @@ -246,14 +281,14 @@ class MSSqlDriver extends BaseDriver { return promise; } - param(paramIndex) { + public param(paramIndex: number): string { return `@_${paramIndex + 1}`; } - async tableColumnTypes(table) { + public async tableColumnTypes(table: string): Promise { const [schema, name] = table.split('.'); - const columns = await this.query( + const columns: TableColumnQueryResult[] = await this.query( `SELECT column_name as ${this.quoteIdentifier('column_name')}, table_name as ${this.quoteIdentifier('table_name')}, table_schema as ${this.quoteIdentifier('table_schema')}, @@ -266,27 +301,27 @@ class MSSqlDriver extends BaseDriver { return columns.map(c => ({ name: c.column_name, type: this.toGenericType(c.data_type) })); } - getTablesQuery(schemaName) { + public getTablesQuery(schemaName: string) { return this.query( `SELECT table_name FROM INFORMATION_SCHEMA.TABLES WHERE table_schema = ${this.param(0)}`, [schemaName] ); } - createSchemaIfNotExists(schemaName) { + public async createSchemaIfNotExists(schemaName: string): Promise { return this.query( `SELECT schema_name FROM INFORMATION_SCHEMA.SCHEMATA WHERE schema_name = ${this.param(0)}`, [schemaName] - ).then((schemas) => { + ).then((schemas: string[]) => { if (schemas.length === 0) { - return this.query(`CREATE SCHEMA ${schemaName}`); + return this.query(`CREATE SCHEMA ${schemaName}`, []); } return null; }); } - informationSchemaQuery() { - // fix The multi-part identifier "columns.data_type" could not be bound + public informationSchemaQuery(): string { + // fix The multipart identifier "columns.data_type" could not be bound return ` SELECT column_name as ${this.quoteIdentifier('column_name')}, table_name as ${this.quoteIdentifier('table_name')}, @@ -297,8 +332,8 @@ class MSSqlDriver extends BaseDriver { `; } - async downloadQueryResults(query, values, options) { - if ((options || {}).streamImport) { + public async downloadQueryResults(query: string, values: unknown[], options: DownloadQueryResultsOptions): Promise { + if (options?.streamImport) { return this.stream(query, values, options); } @@ -314,27 +349,25 @@ class MSSqlDriver extends BaseDriver { }; } - fromGenericType(columnType) { + protected fromGenericType(columnType: string): string { return GenericTypeToMSSql[columnType] || super.fromGenericType(columnType); } - toGenericType(columnType){ + protected toGenericType(columnType: string): string{ return MSSqlToGenericType[columnType] || super.toGenericType(columnType); } - readOnly() { + public readOnly(): boolean { return !!this.config.readOnly; } - wrapQueryWithLimit(query) { + public wrapQueryWithLimit(query: { query: string, limit: number}) { query.query = `SELECT TOP ${query.limit} * FROM (${query.query}) AS t`; } - capabilities() { + public capabilities(): DriverCapabilities { return { incrementalSchemaLoading: true, }; } } - -module.exports = MSSqlDriver; diff --git a/packages/cubejs-mssql-driver/driver/QueryStream.js b/packages/cubejs-mssql-driver/src/QueryStream.ts similarity index 59% rename from packages/cubejs-mssql-driver/driver/QueryStream.js rename to packages/cubejs-mssql-driver/src/QueryStream.ts index 239832982f8ba..768aabd67559d 100644 --- a/packages/cubejs-mssql-driver/driver/QueryStream.js +++ b/packages/cubejs-mssql-driver/src/QueryStream.ts @@ -1,17 +1,20 @@ -const { Readable } = require('stream'); -const { getEnv } = require('@cubejs-backend/shared'); +import { Readable } from 'stream'; +import sql from 'mssql'; +import { + getEnv, +} from '@cubejs-backend/shared'; /** * MS-SQL query stream class. */ -class QueryStream extends Readable { - request = null; - toRead = 0; +export class QueryStream extends Readable { + private request: sql.Request | null; + private toRead: number = 0; /** * @constructor */ - constructor(request, highWaterMark) { + constructor(request: sql.Request, highWaterMark: number) { super({ objectMode: true, highWaterMark: @@ -22,13 +25,13 @@ class QueryStream extends Readable { this.transformRow(row); const canAdd = this.push(row); if (this.toRead-- <= 0 || !canAdd) { - this.request.pause(); + this.request?.pause(); } }) this.request.on('done', () => { this.push(null); }) - this.request.on('error', (err) => { + this.request.on('error', (err: Error) => { this.destroy(err); }); } @@ -36,12 +39,12 @@ class QueryStream extends Readable { /** * @override */ - _read(toRead) { + _read(toRead: number) { this.toRead += toRead; - this.request.resume(); + this.request?.resume(); } - transformRow(row) { + transformRow(row: Record) { for (const key in row) { if (row.hasOwnProperty(key) && row[key] && row[key] instanceof Date) { row[key] = row[key].toJSON(); @@ -52,11 +55,9 @@ class QueryStream extends Readable { /** * @override */ - _destroy(error, callback) { - this.request.cancel(); + _destroy(error: any, callback: CallableFunction) { + this.request?.cancel(); this.request = null; callback(error); } } - -module.exports = QueryStream; diff --git a/packages/cubejs-mssql-driver/src/index.ts b/packages/cubejs-mssql-driver/src/index.ts new file mode 100644 index 0000000000000..fd696adf3c2c5 --- /dev/null +++ b/packages/cubejs-mssql-driver/src/index.ts @@ -0,0 +1,5 @@ +import { MSSqlDriver } from './MSSqlDriver'; + +export * from './MSSqlDriver'; + +export default MSSqlDriver; diff --git a/packages/cubejs-mssql-driver/tsconfig.json b/packages/cubejs-mssql-driver/tsconfig.json new file mode 100644 index 0000000000000..4ca28b45e1100 --- /dev/null +++ b/packages/cubejs-mssql-driver/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.base.json", + "include": [ + "src", + "test" + ], + "compilerOptions": { + "outDir": "dist", + "rootDir": ".", + "baseUrl": ".", + } +} diff --git a/tsconfig.json b/tsconfig.json index 8fb24316e942b..4b46b670d4639 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -46,6 +46,9 @@ { "path": "packages/cubejs-firebolt-driver" }, + { + "path": "packages/cubejs-mssql-driver" + }, { "path": "packages/cubejs-mysql-driver" }, From ea32395eda49cfdf613658d6ec32d79ca0869787 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Thu, 17 Apr 2025 19:52:39 +0300 Subject: [PATCH 04/11] workaround for mssql types missed types --- packages/cubejs-mssql-driver/src/types/mssql.d.ts | 13 +++++++++++++ packages/cubejs-mssql-driver/tsconfig.json | 1 + 2 files changed, 14 insertions(+) create mode 100644 packages/cubejs-mssql-driver/src/types/mssql.d.ts diff --git a/packages/cubejs-mssql-driver/src/types/mssql.d.ts b/packages/cubejs-mssql-driver/src/types/mssql.d.ts new file mode 100644 index 0000000000000..cecadcb197e4c --- /dev/null +++ b/packages/cubejs-mssql-driver/src/types/mssql.d.ts @@ -0,0 +1,13 @@ +import 'mssql'; + +// Because "@types/mssql": "^9.1.7" (latest as of Apr 2025) still doesn't have info about valueHandler +declare module 'mssql' { + namespace valueHandler { + function set( + type: any, + handler: (value: unknown) => unknown + ): void; + } + + export const valueHandler: typeof valueHandler; +} diff --git a/packages/cubejs-mssql-driver/tsconfig.json b/packages/cubejs-mssql-driver/tsconfig.json index 4ca28b45e1100..014fba0433cbb 100644 --- a/packages/cubejs-mssql-driver/tsconfig.json +++ b/packages/cubejs-mssql-driver/tsconfig.json @@ -8,5 +8,6 @@ "outDir": "dist", "rootDir": ".", "baseUrl": ".", + "typeRoots": ["./node_modules/@types", "./src/types"] } } From fc6526b1fd886289b897f1e55470af93d348913c Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Thu, 17 Apr 2025 19:52:51 +0300 Subject: [PATCH 05/11] add value transformators --- packages/cubejs-mssql-driver/src/MSSqlDriver.ts | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/packages/cubejs-mssql-driver/src/MSSqlDriver.ts b/packages/cubejs-mssql-driver/src/MSSqlDriver.ts index 0b2b4bbc6f563..402c8314faa46 100644 --- a/packages/cubejs-mssql-driver/src/MSSqlDriver.ts +++ b/packages/cubejs-mssql-driver/src/MSSqlDriver.ts @@ -21,7 +21,22 @@ import { import { QueryStream } from './QueryStream'; // ********* Value converters ***************** // -// sql.valueHandler.set(sql.TYPES.Int, (value) => value + 1); +const numericTypes = [ + sql.TYPES.Int, + sql.TYPES.BigInt, + sql.TYPES.SmallInt, + sql.TYPES.TinyInt, + sql.TYPES.Decimal, + sql.TYPES.Numeric, + sql.TYPES.Float, + sql.TYPES.Real, + sql.TYPES.Money, + sql.TYPES.SmallMoney +]; + +for (const type of numericTypes) { + sql.valueHandler.set(type, (value) => value != null ? String(value) : value); +} export type MSSqlDriverConfiguration = Omit & { readOnly?: boolean; From 696114caf1ce0a821bfdbc5efb69e0e010ff1060 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Thu, 17 Apr 2025 19:58:37 +0300 Subject: [PATCH 06/11] update snapshots --- .../__snapshots__/mssql-full.test.ts.snap | 1706 ++++++++--------- 1 file changed, 853 insertions(+), 853 deletions(-) diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/mssql-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/mssql-full.test.ts.snap index 141c0c7799373..3f7ed23acc4da 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/mssql-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/mssql-full.test.ts.snap @@ -1390,14 +1390,14 @@ Array [ "ECommerce.city": "Detroit", "ECommerce.customerId": "MC-17605", "ECommerce.customerName": "Customer 31", - "ECommerce.discount": 0, + "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.profit": "21.098", + "ECommerce.quantity": "2", + "ECommerce.rowId": "523", + "ECommerce.sales": "210.98", "ECommerce.subCategory": "Tables", }, Object { @@ -1405,14 +1405,14 @@ Array [ "ECommerce.city": "San Francisco", "ECommerce.customerId": "HH-15010", "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0.2, + "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.quantity": 2, - "ECommerce.rowId": 3060, - "ECommerce.sales": 24.368, + "ECommerce.profit": "-3.3506", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3060", + "ECommerce.sales": "24.368", "ECommerce.subCategory": "Tables", }, ] @@ -1425,14 +1425,14 @@ Array [ "ECommerce.city": "Detroit", "ECommerce.customerId": "MC-17605", "ECommerce.customerName": "Customer 31", - "ECommerce.discount": 0, + "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.profit": "21.098", + "ECommerce.quantity": "2", + "ECommerce.rowId": "523", + "ECommerce.sales": "210.98", "ECommerce.subCategory": "Tables", }, Object { @@ -1440,14 +1440,14 @@ Array [ "ECommerce.city": "Lorain", "ECommerce.customerId": "GA-14725", "ECommerce.customerName": "Customer 19", - "ECommerce.discount": 0.2, + "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.profit": "8.5568", + "ECommerce.quantity": "4", + "ECommerce.rowId": "849", + "ECommerce.sales": "48.896", "ECommerce.subCategory": "Furnishings", }, Object { @@ -1455,14 +1455,14 @@ Array [ "ECommerce.city": "Vancouver", "ECommerce.customerId": "JW-15220", "ECommerce.customerName": "Customer 26", - "ECommerce.discount": 0, + "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.profit": "3.6632", + "ECommerce.quantity": "2", + "ECommerce.rowId": "1494", + "ECommerce.sales": "9.64", "ECommerce.subCategory": "Furnishings", }, Object { @@ -1470,14 +1470,14 @@ Array [ "ECommerce.city": "San Francisco", "ECommerce.customerId": "HH-15010", "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0, + "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": 10.3904, - "ECommerce.quantity": 2, - "ECommerce.rowId": 3059, - "ECommerce.sales": 30.56, + "ECommerce.profit": "10.3904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3059", + "ECommerce.sales": "30.56", "ECommerce.subCategory": "Furnishings", }, Object { @@ -1485,14 +1485,14 @@ Array [ "ECommerce.city": "San Francisco", "ECommerce.customerId": "HH-15010", "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0.2, + "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.quantity": 2, - "ECommerce.rowId": 3060, - "ECommerce.sales": 24.368, + "ECommerce.profit": "-3.3506", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3060", + "ECommerce.sales": "24.368", "ECommerce.subCategory": "Tables", }, Object { @@ -1500,14 +1500,14 @@ Array [ "ECommerce.city": "Marion", "ECommerce.customerId": "MG-17650", "ECommerce.customerName": "Customer 32", - "ECommerce.discount": 0.2, + "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.profit": "1.7352", + "ECommerce.quantity": "2", + "ECommerce.rowId": "6205", + "ECommerce.sales": "7.712", "ECommerce.subCategory": "Furnishings", }, Object { @@ -1515,14 +1515,14 @@ Array [ "ECommerce.city": "Philadelphia", "ECommerce.customerId": "BS-11755", "ECommerce.customerName": "Customer 10", - "ECommerce.discount": 0.2, + "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.profit": "6.4176", + "ECommerce.quantity": "3", + "ECommerce.rowId": "7425", + "ECommerce.sales": "36.672", "ECommerce.subCategory": "Furnishings", }, Object { @@ -1530,14 +1530,14 @@ Array [ "ECommerce.city": "Dallas", "ECommerce.customerId": "LC-17050", "ECommerce.customerName": "Customer 29", - "ECommerce.discount": 0.6, + "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.profit": "-19.864", + "ECommerce.quantity": "5", + "ECommerce.rowId": "8621", + "ECommerce.sales": "30.56", "ECommerce.subCategory": "Furnishings", }, ] @@ -1552,14 +1552,14 @@ Array [ "ECommerce.city": "Marion", "ECommerce.customerId": "MG-17650", "ECommerce.customerName": "Customer 32", - "ECommerce.discount": 0.2, + "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.profit": "1.7352", + "ECommerce.quantity": "2", + "ECommerce.rowId": "6205", + "ECommerce.sales": "7.712", "ECommerce.subCategory": "Furnishings", }, Object { @@ -1567,14 +1567,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "JH-15430", "ECommerce.customerName": "Customer 23", - "ECommerce.discount": 0.5, + "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.profit": "-7.2", + "ECommerce.quantity": "2", + "ECommerce.rowId": "8958", + "ECommerce.sales": "120", "ECommerce.subCategory": "Machines", }, ] @@ -1587,14 +1587,14 @@ Array [ "ECommerce.city": "Detroit", "ECommerce.customerId": "MC-17605", "ECommerce.customerName": "Customer 31", - "ECommerce.discount": 0, + "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.profit": "21.098", + "ECommerce.quantity": "2", + "ECommerce.rowId": "523", + "ECommerce.sales": "210.98", "ECommerce.subCategory": "Tables", }, Object { @@ -1602,14 +1602,14 @@ Array [ "ECommerce.city": "Vancouver", "ECommerce.customerId": "JW-15220", "ECommerce.customerName": "Customer 26", - "ECommerce.discount": 0, + "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.profit": "3.6632", + "ECommerce.quantity": "2", + "ECommerce.rowId": "1494", + "ECommerce.sales": "9.64", "ECommerce.subCategory": "Furnishings", }, Object { @@ -1617,14 +1617,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "KN-16705", "ECommerce.customerName": "Customer 28", - "ECommerce.discount": 0.2, + "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.profit": "5.2026", + "ECommerce.quantity": "3", + "ECommerce.rowId": "2329", + "ECommerce.sales": "14.352", "ECommerce.subCategory": "Envelopes", }, Object { @@ -1632,14 +1632,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "DG-13300", "ECommerce.customerName": "Customer 16", - "ECommerce.discount": 0, + "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.profit": "494.9725", + "ECommerce.quantity": "11", + "ECommerce.rowId": "2661", + "ECommerce.sales": "1979.89", "ECommerce.subCategory": "Phones", }, Object { @@ -1647,14 +1647,14 @@ Array [ "ECommerce.city": "San Francisco", "ECommerce.customerId": "HH-15010", "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0, + "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": 10.3904, - "ECommerce.quantity": 2, - "ECommerce.rowId": 3059, - "ECommerce.sales": 30.56, + "ECommerce.profit": "10.3904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3059", + "ECommerce.sales": "30.56", "ECommerce.subCategory": "Furnishings", }, Object { @@ -1662,14 +1662,14 @@ Array [ "ECommerce.city": "San Francisco", "ECommerce.customerId": "HH-15010", "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0.2, + "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.quantity": 2, - "ECommerce.rowId": 3060, - "ECommerce.sales": 24.368, + "ECommerce.profit": "-3.3506", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3060", + "ECommerce.sales": "24.368", "ECommerce.subCategory": "Tables", }, Object { @@ -1677,14 +1677,14 @@ Array [ "ECommerce.city": "Bakersfield", "ECommerce.customerId": "AW-10840", "ECommerce.customerName": "Customer 4", - "ECommerce.discount": 0, + "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.profit": "2.726", + "ECommerce.quantity": "5", + "ECommerce.rowId": "3934", + "ECommerce.sales": "9.4", "ECommerce.subCategory": "Art", }, Object { @@ -1692,14 +1692,14 @@ Array [ "ECommerce.city": "Philadelphia", "ECommerce.customerId": "CC-12475", "ECommerce.customerName": "Customer 12", - "ECommerce.discount": 0.2, + "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.profit": "3.9296", + "ECommerce.quantity": "4", + "ECommerce.rowId": "4012", + "ECommerce.sales": "39.296", "ECommerce.subCategory": "Storage", }, Object { @@ -1707,14 +1707,14 @@ Array [ "ECommerce.city": "Los Angeles", "ECommerce.customerId": "SS-20140", "ECommerce.customerName": "Customer 38", - "ECommerce.discount": 0, + "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.profit": "8.5025", + "ECommerce.quantity": "5", + "ECommerce.rowId": "6125", + "ECommerce.sales": "44.75", "ECommerce.subCategory": "Accessories", }, Object { @@ -1722,14 +1722,14 @@ Array [ "ECommerce.city": "Baltimore", "ECommerce.customerId": "AJ-10780", "ECommerce.customerName": "Customer 2", - "ECommerce.discount": 0, + "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.profit": "1.0904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "6459", + "ECommerce.sales": "3.76", "ECommerce.subCategory": "Art", }, Object { @@ -1737,14 +1737,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "MM-18280", "ECommerce.customerName": "Customer 34", - "ECommerce.discount": 0, + "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.profit": "0.7065", + "ECommerce.quantity": "3", + "ECommerce.rowId": "7310", + "ECommerce.sales": "14.13", "ECommerce.subCategory": "Fasteners", }, Object { @@ -1752,14 +1752,14 @@ Array [ "ECommerce.city": "Lakewood", "ECommerce.customerId": "NP-18670", "ECommerce.customerName": "Customer 35", - "ECommerce.discount": 0, + "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.profit": "129.294", + "ECommerce.quantity": "5", + "ECommerce.rowId": "8425", + "ECommerce.sales": "2154.9", "ECommerce.subCategory": "Bookcases", }, ] @@ -1774,14 +1774,14 @@ Array [ "ECommerce.city": "Provo", "ECommerce.customerId": "AS-10225", "ECommerce.customerName": "Customer 3", - "ECommerce.discount": 0, + "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.profit": "77.5764", + "ECommerce.quantity": "3", + "ECommerce.rowId": "2655", + "ECommerce.sales": "1292.94", "ECommerce.subCategory": "Bookcases", }, Object { @@ -1789,14 +1789,14 @@ Array [ "ECommerce.city": "Bakersfield", "ECommerce.customerId": "AW-10840", "ECommerce.customerName": "Customer 4", - "ECommerce.discount": 0, + "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.profit": "2.726", + "ECommerce.quantity": "5", + "ECommerce.rowId": "3934", + "ECommerce.sales": "9.4", "ECommerce.subCategory": "Art", }, Object { @@ -1804,14 +1804,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "AH-10465", "ECommerce.customerName": "Customer 1", - "ECommerce.discount": 0, + "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": 4161, - "ECommerce.sales": 539.97, + "ECommerce.profit": "134.9925", + "ECommerce.quantity": "3", + "ECommerce.rowId": "4161", + "ECommerce.sales": "539.97", "ECommerce.subCategory": "Phones", }, Object { @@ -1819,14 +1819,14 @@ Array [ "ECommerce.city": "Baltimore", "ECommerce.customerId": "AJ-10780", "ECommerce.customerName": "Customer 2", - "ECommerce.discount": 0, + "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.profit": "1.0904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "6459", + "ECommerce.sales": "3.76", "ECommerce.subCategory": "Art", }, ] @@ -1839,14 +1839,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BM-11650", "ECommerce.customerName": "Customer 8", - "ECommerce.discount": 0, + "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.profit": "81.432", + "ECommerce.quantity": "2", + "ECommerce.rowId": "2595", + "ECommerce.sales": "180.96", "ECommerce.subCategory": "Envelopes", }, Object { @@ -1854,14 +1854,14 @@ Array [ "ECommerce.city": "Provo", "ECommerce.customerId": "AS-10225", "ECommerce.customerName": "Customer 3", - "ECommerce.discount": 0, + "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.profit": "77.5764", + "ECommerce.quantity": "3", + "ECommerce.rowId": "2655", + "ECommerce.sales": "1292.94", "ECommerce.subCategory": "Bookcases", }, Object { @@ -1869,14 +1869,14 @@ Array [ "ECommerce.city": "Bakersfield", "ECommerce.customerId": "AW-10840", "ECommerce.customerName": "Customer 4", - "ECommerce.discount": 0, + "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.profit": "2.726", + "ECommerce.quantity": "5", + "ECommerce.rowId": "3934", + "ECommerce.sales": "9.4", "ECommerce.subCategory": "Art", }, Object { @@ -1884,14 +1884,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "AH-10465", "ECommerce.customerName": "Customer 1", - "ECommerce.discount": 0, + "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": 4161, - "ECommerce.sales": 539.97, + "ECommerce.profit": "134.9925", + "ECommerce.quantity": "3", + "ECommerce.rowId": "4161", + "ECommerce.sales": "539.97", "ECommerce.subCategory": "Phones", }, Object { @@ -1899,14 +1899,14 @@ Array [ "ECommerce.city": "Oakland", "ECommerce.customerId": "BB-11545", "ECommerce.customerName": "Customer 5", - "ECommerce.discount": 0, + "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.profit": "44.975", + "ECommerce.quantity": "5", + "ECommerce.rowId": "6272", + "ECommerce.sales": "179.9", "ECommerce.subCategory": "Art", }, Object { @@ -1914,14 +1914,14 @@ Array [ "ECommerce.city": "Baltimore", "ECommerce.customerId": "AJ-10780", "ECommerce.customerName": "Customer 2", - "ECommerce.discount": 0, + "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.profit": "1.0904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "6459", + "ECommerce.sales": "3.76", "ECommerce.subCategory": "Art", }, Object { @@ -1929,14 +1929,14 @@ Array [ "ECommerce.city": "Arlington", "ECommerce.customerId": "BF-11020", "ECommerce.customerName": "Customer 6", - "ECommerce.discount": 0.2, + "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.profit": "15.498", + "ECommerce.quantity": "5", + "ECommerce.rowId": "6651", + "ECommerce.sales": "45.92", "ECommerce.subCategory": "Fasteners", }, Object { @@ -1944,14 +1944,14 @@ Array [ "ECommerce.city": "Philadelphia", "ECommerce.customerId": "BS-11755", "ECommerce.customerName": "Customer 10", - "ECommerce.discount": 0.2, + "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.profit": "6.4176", + "ECommerce.quantity": "3", + "ECommerce.rowId": "7425", + "ECommerce.sales": "36.672", "ECommerce.subCategory": "Furnishings", }, Object { @@ -1959,14 +1959,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BF-11170", "ECommerce.customerName": "Customer 7", - "ECommerce.discount": 0, + "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.profit": "467.9922", + "ECommerce.quantity": "2", + "ECommerce.rowId": "7698", + "ECommerce.sales": "1199.98", "ECommerce.subCategory": "Copiers", }, Object { @@ -1974,14 +1974,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BS-11380", "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.4, + "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.profit": "74.9985", + "ECommerce.quantity": "3", + "ECommerce.rowId": "9618", + "ECommerce.sales": "899.982", "ECommerce.subCategory": "Copiers", }, Object { @@ -1989,14 +1989,14 @@ Array [ "ECommerce.city": "Bowling", "ECommerce.customerId": "BS-11380", "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.2, + "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.profit": "5.397", + "ECommerce.quantity": "3", + "ECommerce.rowId": "9619", + "ECommerce.sales": "86.352", "ECommerce.subCategory": "Art", }, ] @@ -2869,7 +2869,7 @@ Array [ Object { "BigECommerce.orderDate": "2020-10-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-10-01T00:00:00.000", - "BigECommerce.rollingCountBy2Day": 10000, + "BigECommerce.rollingCountBy2Day": "10000", }, Object { "BigECommerce.orderDate": "2020-11-01T00:00:00.000", @@ -2889,37 +2889,37 @@ Array [ Object { "BigECommerce.orderDate": "2020-01-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-01-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 20000, + "BigECommerce.rollingCountBy2Month": "20000", }, Object { "BigECommerce.orderDate": "2020-02-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-02-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 30000, + "BigECommerce.rollingCountBy2Month": "30000", }, Object { "BigECommerce.orderDate": "2020-03-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-03-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 30000, + "BigECommerce.rollingCountBy2Month": "30000", }, Object { "BigECommerce.orderDate": "2020-04-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-04-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 30000, + "BigECommerce.rollingCountBy2Month": "30000", }, Object { "BigECommerce.orderDate": "2020-05-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-05-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 60000, + "BigECommerce.rollingCountBy2Month": "60000", }, Object { "BigECommerce.orderDate": "2020-06-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-06-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 120000, + "BigECommerce.rollingCountBy2Month": "120000", }, Object { "BigECommerce.orderDate": "2020-07-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-07-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 70000, + "BigECommerce.rollingCountBy2Month": "70000", }, Object { "BigECommerce.orderDate": "2020-08-01T00:00:00.000", @@ -2929,22 +2929,22 @@ Array [ Object { "BigECommerce.orderDate": "2020-09-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-09-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 60000, + "BigECommerce.rollingCountBy2Month": "60000", }, Object { "BigECommerce.orderDate": "2020-10-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-10-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 100000, + "BigECommerce.rollingCountBy2Month": "100000", }, Object { "BigECommerce.orderDate": "2020-11-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 130000, + "BigECommerce.rollingCountBy2Month": "130000", }, Object { "BigECommerce.orderDate": "2020-12-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-12-01T00:00:00.000", - "BigECommerce.rollingCountBy2Month": 160000, + "BigECommerce.rollingCountBy2Month": "160000", }, ] `; @@ -2954,17 +2954,17 @@ Array [ Object { "BigECommerce.orderDate": "2020-01-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-01-01T00:00:00.000", - "BigECommerce.rollingCountBy2Week": 10000, + "BigECommerce.rollingCountBy2Week": "10000", }, Object { "BigECommerce.orderDate": "2020-02-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-02-01T00:00:00.000", - "BigECommerce.rollingCountBy2Week": 10000, + "BigECommerce.rollingCountBy2Week": "10000", }, Object { "BigECommerce.orderDate": "2020-03-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-03-01T00:00:00.000", - "BigECommerce.rollingCountBy2Week": 10000, + "BigECommerce.rollingCountBy2Week": "10000", }, Object { "BigECommerce.orderDate": "2020-04-01T00:00:00.000", @@ -2974,12 +2974,12 @@ Array [ Object { "BigECommerce.orderDate": "2020-05-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-05-01T00:00:00.000", - "BigECommerce.rollingCountBy2Week": 20000, + "BigECommerce.rollingCountBy2Week": "20000", }, Object { "BigECommerce.orderDate": "2020-06-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-06-01T00:00:00.000", - "BigECommerce.rollingCountBy2Week": 30000, + "BigECommerce.rollingCountBy2Week": "30000", }, Object { "BigECommerce.orderDate": "2020-07-01T00:00:00.000", @@ -2994,22 +2994,22 @@ Array [ Object { "BigECommerce.orderDate": "2020-09-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-09-01T00:00:00.000", - "BigECommerce.rollingCountBy2Week": 30000, + "BigECommerce.rollingCountBy2Week": "30000", }, Object { "BigECommerce.orderDate": "2020-10-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-10-01T00:00:00.000", - "BigECommerce.rollingCountBy2Week": 30000, + "BigECommerce.rollingCountBy2Week": "30000", }, Object { "BigECommerce.orderDate": "2020-11-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-11-01T00:00:00.000", - "BigECommerce.rollingCountBy2Week": 20000, + "BigECommerce.rollingCountBy2Week": "20000", }, Object { "BigECommerce.orderDate": "2020-12-01T00:00:00.000", "BigECommerce.orderDate.month": "2020-12-01T00:00:00.000", - "BigECommerce.rollingCountBy2Week": 20000, + "BigECommerce.rollingCountBy2Week": "20000", }, ] `; @@ -3403,107 +3403,107 @@ exports[`Queries with the @cubejs-backend/mssql-driver querying ECommerce: count Array [ Object { "ECommerce.city": "Columbus", - "ECommerce.count": 12, + "ECommerce.count": "12", }, Object { "ECommerce.city": "New York City", - "ECommerce.count": 5, + "ECommerce.count": "5", }, Object { "ECommerce.city": "Detroit", - "ECommerce.count": 2, + "ECommerce.count": "2", }, Object { "ECommerce.city": "Philadelphia", - "ECommerce.count": 2, + "ECommerce.count": "2", }, Object { "ECommerce.city": "San Francisco", - "ECommerce.count": 2, + "ECommerce.count": "2", }, Object { "ECommerce.city": "Arlington", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Auburn", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Bakersfield", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Baltimore", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Bowling", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Dallas", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Decatur", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Glendale", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Houston", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Lafayette", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Lakewood", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Lorain", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Los Angeles", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Louisville", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Marion", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Morristown", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Oakland", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Olympia", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Omaha", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Provo", - "ECommerce.count": 1, + "ECommerce.count": "1", }, Object { "ECommerce.city": "Vancouver", - "ECommerce.count": 1, + "ECommerce.count": "1", }, ] `; @@ -3515,14 +3515,14 @@ Array [ "ECommerce.city": "Detroit", "ECommerce.customerId": "MC-17605", "ECommerce.customerName": "Customer 31", - "ECommerce.discount": 0, + "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.profit": "21.098", + "ECommerce.quantity": "2", + "ECommerce.rowId": "523", + "ECommerce.sales": "210.98", "ECommerce.subCategory": "Tables", }, Object { @@ -3530,14 +3530,14 @@ Array [ "ECommerce.city": "Lorain", "ECommerce.customerId": "GA-14725", "ECommerce.customerName": "Customer 19", - "ECommerce.discount": 0.2, + "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.profit": "8.5568", + "ECommerce.quantity": "4", + "ECommerce.rowId": "849", + "ECommerce.sales": "48.896", "ECommerce.subCategory": "Furnishings", }, Object { @@ -3545,14 +3545,14 @@ Array [ "ECommerce.city": "Olympia", "ECommerce.customerId": "PF-19165", "ECommerce.customerName": "Customer 36", - "ECommerce.discount": 0, + "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.profit": "4.0687", + "ECommerce.quantity": "1", + "ECommerce.rowId": "1013", + "ECommerce.sales": "14.03", "ECommerce.subCategory": "Storage", }, Object { @@ -3560,14 +3560,14 @@ Array [ "ECommerce.city": "Vancouver", "ECommerce.customerId": "JW-15220", "ECommerce.customerName": "Customer 26", - "ECommerce.discount": 0, + "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.profit": "3.6632", + "ECommerce.quantity": "2", + "ECommerce.rowId": "1494", + "ECommerce.sales": "9.64", "ECommerce.subCategory": "Furnishings", }, Object { @@ -3575,14 +3575,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "ML-17755", "ECommerce.customerName": "Customer 33", - "ECommerce.discount": 0.2, + "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.profit": "-2.1195", + "ECommerce.quantity": "3", + "ECommerce.rowId": "1995", + "ECommerce.sales": "11.304", "ECommerce.subCategory": "Fasteners", }, Object { @@ -3590,14 +3590,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "KN-16705", "ECommerce.customerName": "Customer 28", - "ECommerce.discount": 0.2, + "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.profit": "5.2026", + "ECommerce.quantity": "3", + "ECommerce.rowId": "2329", + "ECommerce.sales": "14.352", "ECommerce.subCategory": "Envelopes", }, Object { @@ -3605,14 +3605,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "DB-13405", "ECommerce.customerName": "Customer 15", - "ECommerce.discount": 0, + "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.profit": "13.604", + "ECommerce.quantity": "8", + "ECommerce.rowId": "2455", + "ECommerce.sales": "71.6", "ECommerce.subCategory": "Accessories", }, Object { @@ -3620,14 +3620,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BM-11650", "ECommerce.customerName": "Customer 8", - "ECommerce.discount": 0, + "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.profit": "81.432", + "ECommerce.quantity": "2", + "ECommerce.rowId": "2595", + "ECommerce.sales": "180.96", "ECommerce.subCategory": "Envelopes", }, Object { @@ -3635,14 +3635,14 @@ Array [ "ECommerce.city": "Provo", "ECommerce.customerId": "AS-10225", "ECommerce.customerName": "Customer 3", - "ECommerce.discount": 0, + "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.profit": "77.5764", + "ECommerce.quantity": "3", + "ECommerce.rowId": "2655", + "ECommerce.sales": "1292.94", "ECommerce.subCategory": "Bookcases", }, Object { @@ -3650,14 +3650,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "DG-13300", "ECommerce.customerName": "Customer 16", - "ECommerce.discount": 0, + "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.profit": "494.9725", + "ECommerce.quantity": "11", + "ECommerce.rowId": "2661", + "ECommerce.sales": "1979.89", "ECommerce.subCategory": "Phones", }, ] @@ -3670,14 +3670,14 @@ Array [ "ECommerce.city": "Detroit", "ECommerce.customerId": "MC-17605", "ECommerce.customerName": "Customer 31", - "ECommerce.discount": 0, + "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.profit": "21.098", + "ECommerce.quantity": "2", + "ECommerce.rowId": "523", + "ECommerce.sales": "210.98", "ECommerce.subCategory": "Tables", }, Object { @@ -3685,14 +3685,14 @@ Array [ "ECommerce.city": "Lorain", "ECommerce.customerId": "GA-14725", "ECommerce.customerName": "Customer 19", - "ECommerce.discount": 0.2, + "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.profit": "8.5568", + "ECommerce.quantity": "4", + "ECommerce.rowId": "849", + "ECommerce.sales": "48.896", "ECommerce.subCategory": "Furnishings", }, Object { @@ -3700,14 +3700,14 @@ Array [ "ECommerce.city": "Olympia", "ECommerce.customerId": "PF-19165", "ECommerce.customerName": "Customer 36", - "ECommerce.discount": 0, + "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.profit": "4.0687", + "ECommerce.quantity": "1", + "ECommerce.rowId": "1013", + "ECommerce.sales": "14.03", "ECommerce.subCategory": "Storage", }, Object { @@ -3715,14 +3715,14 @@ Array [ "ECommerce.city": "Vancouver", "ECommerce.customerId": "JW-15220", "ECommerce.customerName": "Customer 26", - "ECommerce.discount": 0, + "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.profit": "3.6632", + "ECommerce.quantity": "2", + "ECommerce.rowId": "1494", + "ECommerce.sales": "9.64", "ECommerce.subCategory": "Furnishings", }, Object { @@ -3730,14 +3730,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "ML-17755", "ECommerce.customerName": "Customer 33", - "ECommerce.discount": 0.2, + "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.profit": "-2.1195", + "ECommerce.quantity": "3", + "ECommerce.rowId": "1995", + "ECommerce.sales": "11.304", "ECommerce.subCategory": "Fasteners", }, Object { @@ -3745,14 +3745,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "KN-16705", "ECommerce.customerName": "Customer 28", - "ECommerce.discount": 0.2, + "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.profit": "5.2026", + "ECommerce.quantity": "3", + "ECommerce.rowId": "2329", + "ECommerce.sales": "14.352", "ECommerce.subCategory": "Envelopes", }, Object { @@ -3760,14 +3760,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "DB-13405", "ECommerce.customerName": "Customer 15", - "ECommerce.discount": 0, + "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.profit": "13.604", + "ECommerce.quantity": "8", + "ECommerce.rowId": "2455", + "ECommerce.sales": "71.6", "ECommerce.subCategory": "Accessories", }, Object { @@ -3775,14 +3775,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BM-11650", "ECommerce.customerName": "Customer 8", - "ECommerce.discount": 0, + "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.profit": "81.432", + "ECommerce.quantity": "2", + "ECommerce.rowId": "2595", + "ECommerce.sales": "180.96", "ECommerce.subCategory": "Envelopes", }, Object { @@ -3790,14 +3790,14 @@ Array [ "ECommerce.city": "Provo", "ECommerce.customerId": "AS-10225", "ECommerce.customerName": "Customer 3", - "ECommerce.discount": 0, + "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.profit": "77.5764", + "ECommerce.quantity": "3", + "ECommerce.rowId": "2655", + "ECommerce.sales": "1292.94", "ECommerce.subCategory": "Bookcases", }, Object { @@ -3805,14 +3805,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "DG-13300", "ECommerce.customerName": "Customer 16", - "ECommerce.discount": 0, + "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.profit": "494.9725", + "ECommerce.quantity": "11", + "ECommerce.rowId": "2661", + "ECommerce.sales": "1979.89", "ECommerce.subCategory": "Phones", }, Object { @@ -3820,14 +3820,14 @@ Array [ "ECommerce.city": "Glendale", "ECommerce.customerId": "EM-14140", "ECommerce.customerName": "Customer 18", - "ECommerce.discount": 0.2, + "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.profit": "9.9652", + "ECommerce.quantity": "2", + "ECommerce.rowId": "2952", + "ECommerce.sales": "113.888", "ECommerce.subCategory": "Chairs", }, Object { @@ -3835,14 +3835,14 @@ Array [ "ECommerce.city": "San Francisco", "ECommerce.customerId": "HH-15010", "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0, + "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": 10.3904, - "ECommerce.quantity": 2, - "ECommerce.rowId": 3059, - "ECommerce.sales": 30.56, + "ECommerce.profit": "10.3904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3059", + "ECommerce.sales": "30.56", "ECommerce.subCategory": "Furnishings", }, Object { @@ -3850,14 +3850,14 @@ Array [ "ECommerce.city": "San Francisco", "ECommerce.customerId": "HH-15010", "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0.2, + "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.quantity": 2, - "ECommerce.rowId": 3060, - "ECommerce.sales": 24.368, + "ECommerce.profit": "-3.3506", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3060", + "ECommerce.sales": "24.368", "ECommerce.subCategory": "Tables", }, Object { @@ -3865,14 +3865,14 @@ Array [ "ECommerce.city": "Louisville", "ECommerce.customerId": "DW-13480", "ECommerce.customerName": "Customer 17", - "ECommerce.discount": 0, + "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": 3083, - "ECommerce.sales": 539.97, + "ECommerce.profit": "134.9925", + "ECommerce.quantity": "3", + "ECommerce.rowId": "3083", + "ECommerce.sales": "539.97", "ECommerce.subCategory": "Phones", }, Object { @@ -3880,14 +3880,14 @@ Array [ "ECommerce.city": "Auburn", "ECommerce.customerId": "KN-16705", "ECommerce.customerName": "Customer 28", - "ECommerce.discount": 0, + "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.profit": "1.0904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3448", + "ECommerce.sales": "3.76", "ECommerce.subCategory": "Art", }, Object { @@ -3895,14 +3895,14 @@ Array [ "ECommerce.city": "Omaha", "ECommerce.customerId": "JO-15550", "ECommerce.customerName": "Customer 24", - "ECommerce.discount": 0, + "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.profit": "1.1775", + "ECommerce.quantity": "5", + "ECommerce.rowId": "3717", + "ECommerce.sales": "23.55", "ECommerce.subCategory": "Fasteners", }, Object { @@ -3910,14 +3910,14 @@ Array [ "ECommerce.city": "Bakersfield", "ECommerce.customerId": "AW-10840", "ECommerce.customerName": "Customer 4", - "ECommerce.discount": 0, + "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.profit": "2.726", + "ECommerce.quantity": "5", + "ECommerce.rowId": "3934", + "ECommerce.sales": "9.4", "ECommerce.subCategory": "Art", }, Object { @@ -3925,14 +3925,14 @@ Array [ "ECommerce.city": "Philadelphia", "ECommerce.customerId": "CC-12475", "ECommerce.customerName": "Customer 12", - "ECommerce.discount": 0.2, + "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.profit": "3.9296", + "ECommerce.quantity": "4", + "ECommerce.rowId": "4012", + "ECommerce.sales": "39.296", "ECommerce.subCategory": "Storage", }, Object { @@ -3940,14 +3940,14 @@ Array [ "ECommerce.city": "Lafayette", "ECommerce.customerId": "CS-12355", "ECommerce.customerName": "Customer 14", - "ECommerce.discount": 0, + "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.profit": "60.5488", + "ECommerce.quantity": "4", + "ECommerce.rowId": "4031", + "ECommerce.sales": "232.88", "ECommerce.subCategory": "Chairs", }, Object { @@ -3955,14 +3955,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "AH-10465", "ECommerce.customerName": "Customer 1", - "ECommerce.discount": 0, + "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": 4161, - "ECommerce.sales": 539.97, + "ECommerce.profit": "134.9925", + "ECommerce.quantity": "3", + "ECommerce.rowId": "4161", + "ECommerce.sales": "539.97", "ECommerce.subCategory": "Phones", }, Object { @@ -3970,14 +3970,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "WB-21850", "ECommerce.customerName": "Customer 41", - "ECommerce.discount": 0, + "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.profit": "21.5824", + "ECommerce.quantity": "4", + "ECommerce.rowId": "4227", + "ECommerce.sales": "45.92", "ECommerce.subCategory": "Fasteners", }, Object { @@ -3985,14 +3985,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "TB-21175", "ECommerce.customerName": "Customer 39", - "ECommerce.discount": 0, + "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.profit": "517.4793", + "ECommerce.quantity": "9", + "ECommerce.rowId": "4882", + "ECommerce.sales": "2249.91", "ECommerce.subCategory": "Accessories", }, Object { @@ -4000,14 +4000,14 @@ Array [ "ECommerce.city": "Detroit", "ECommerce.customerId": "CA-12775", "ECommerce.customerName": "Customer 11", - "ECommerce.discount": 0, + "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.profit": "134.5302", + "ECommerce.quantity": "7", + "ECommerce.rowId": "5220", + "ECommerce.sales": "498.26", "ECommerce.subCategory": "Chairs", }, Object { @@ -4015,14 +4015,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "KL-16555", "ECommerce.customerName": "Customer 27", - "ECommerce.discount": 0, + "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.profit": "8.5025", + "ECommerce.quantity": "5", + "ECommerce.rowId": "5277", + "ECommerce.sales": "44.75", "ECommerce.subCategory": "Accessories", }, Object { @@ -4030,14 +4030,14 @@ Array [ "ECommerce.city": "Los Angeles", "ECommerce.customerId": "SS-20140", "ECommerce.customerName": "Customer 38", - "ECommerce.discount": 0, + "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.profit": "8.5025", + "ECommerce.quantity": "5", + "ECommerce.rowId": "6125", + "ECommerce.sales": "44.75", "ECommerce.subCategory": "Accessories", }, Object { @@ -4045,14 +4045,14 @@ Array [ "ECommerce.city": "Marion", "ECommerce.customerId": "MG-17650", "ECommerce.customerName": "Customer 32", - "ECommerce.discount": 0.2, + "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.profit": "1.7352", + "ECommerce.quantity": "2", + "ECommerce.rowId": "6205", + "ECommerce.sales": "7.712", "ECommerce.subCategory": "Furnishings", }, Object { @@ -4060,14 +4060,14 @@ Array [ "ECommerce.city": "Oakland", "ECommerce.customerId": "BB-11545", "ECommerce.customerName": "Customer 5", - "ECommerce.discount": 0, + "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.profit": "44.975", + "ECommerce.quantity": "5", + "ECommerce.rowId": "6272", + "ECommerce.sales": "179.9", "ECommerce.subCategory": "Art", }, Object { @@ -4075,14 +4075,14 @@ Array [ "ECommerce.city": "Baltimore", "ECommerce.customerId": "AJ-10780", "ECommerce.customerName": "Customer 2", - "ECommerce.discount": 0, + "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.profit": "1.0904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "6459", + "ECommerce.sales": "3.76", "ECommerce.subCategory": "Art", }, Object { @@ -4090,14 +4090,14 @@ Array [ "ECommerce.city": "Arlington", "ECommerce.customerId": "BF-11020", "ECommerce.customerName": "Customer 6", - "ECommerce.discount": 0.2, + "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.profit": "15.498", + "ECommerce.quantity": "5", + "ECommerce.rowId": "6651", + "ECommerce.sales": "45.92", "ECommerce.subCategory": "Fasteners", }, Object { @@ -4105,14 +4105,14 @@ Array [ "ECommerce.city": "Houston", "ECommerce.customerId": "HK-14890", "ECommerce.customerName": "Customer 22", - "ECommerce.discount": 0.2, + "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.profit": "569.9905", + "ECommerce.quantity": "5", + "ECommerce.rowId": "7174", + "ECommerce.sales": "2399.96", "ECommerce.subCategory": "Copiers", }, Object { @@ -4120,14 +4120,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "LR-16915", "ECommerce.customerName": "Customer 30", - "ECommerce.discount": 0.5, + "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.profit": "-272.58", + "ECommerce.quantity": "2", + "ECommerce.rowId": "7293", + "ECommerce.sales": "649", "ECommerce.subCategory": "Machines", }, Object { @@ -4135,14 +4135,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "MM-18280", "ECommerce.customerName": "Customer 34", - "ECommerce.discount": 0, + "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.profit": "0.7065", + "ECommerce.quantity": "3", + "ECommerce.rowId": "7310", + "ECommerce.sales": "14.13", "ECommerce.subCategory": "Fasteners", }, Object { @@ -4150,14 +4150,14 @@ Array [ "ECommerce.city": "Philadelphia", "ECommerce.customerId": "BS-11755", "ECommerce.customerName": "Customer 10", - "ECommerce.discount": 0.2, + "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.profit": "6.4176", + "ECommerce.quantity": "3", + "ECommerce.rowId": "7425", + "ECommerce.sales": "36.672", "ECommerce.subCategory": "Furnishings", }, Object { @@ -4165,14 +4165,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BF-11170", "ECommerce.customerName": "Customer 7", - "ECommerce.discount": 0, + "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.profit": "467.9922", + "ECommerce.quantity": "2", + "ECommerce.rowId": "7698", + "ECommerce.sales": "1199.98", "ECommerce.subCategory": "Copiers", }, Object { @@ -4180,14 +4180,14 @@ Array [ "ECommerce.city": "Lakewood", "ECommerce.customerId": "NP-18670", "ECommerce.customerName": "Customer 35", - "ECommerce.discount": 0, + "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.profit": "129.294", + "ECommerce.quantity": "5", + "ECommerce.rowId": "8425", + "ECommerce.sales": "2154.9", "ECommerce.subCategory": "Bookcases", }, Object { @@ -4195,14 +4195,14 @@ Array [ "ECommerce.city": "Dallas", "ECommerce.customerId": "LC-17050", "ECommerce.customerName": "Customer 29", - "ECommerce.discount": 0.6, + "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.profit": "-19.864", + "ECommerce.quantity": "5", + "ECommerce.rowId": "8621", + "ECommerce.sales": "30.56", "ECommerce.subCategory": "Furnishings", }, Object { @@ -4210,14 +4210,14 @@ Array [ "ECommerce.city": "Decatur", "ECommerce.customerId": "JS-16030", "ECommerce.customerName": "Customer 25", - "ECommerce.discount": 0.2, + "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.profit": "6.1992", + "ECommerce.quantity": "2", + "ECommerce.rowId": "8673", + "ECommerce.sales": "18.368", "ECommerce.subCategory": "Fasteners", }, Object { @@ -4225,14 +4225,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "TS-21205", "ECommerce.customerName": "Customer 40", - "ECommerce.discount": 0.2, + "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.profit": "26.9973", + "ECommerce.quantity": "3", + "ECommerce.rowId": "8697", + "ECommerce.sales": "239.976", "ECommerce.subCategory": "Phones", }, Object { @@ -4240,14 +4240,14 @@ Array [ "ECommerce.city": "Morristown", "ECommerce.customerId": "GZ-14470", "ECommerce.customerName": "Customer 20", - "ECommerce.discount": 0, + "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.profit": "225.6", + "ECommerce.quantity": "4", + "ECommerce.rowId": "8878", + "ECommerce.sales": "480", "ECommerce.subCategory": "Machines", }, Object { @@ -4255,14 +4255,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "JH-15430", "ECommerce.customerName": "Customer 23", - "ECommerce.discount": 0.5, + "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.profit": "-7.2", + "ECommerce.quantity": "2", + "ECommerce.rowId": "8958", + "ECommerce.sales": "120", "ECommerce.subCategory": "Machines", }, Object { @@ -4270,14 +4270,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "CD-12280", "ECommerce.customerName": "Customer 13", - "ECommerce.discount": 0.1, + "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.profit": "24.2012", + "ECommerce.quantity": "2", + "ECommerce.rowId": "9473", + "ECommerce.sales": "128.124", "ECommerce.subCategory": "Chairs", }, Object { @@ -4285,14 +4285,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "SB-20185", "ECommerce.customerName": "Customer 37", - "ECommerce.discount": 0.2, + "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.profit": "-5.0098", + "ECommerce.quantity": "1", + "ECommerce.rowId": "9584", + "ECommerce.sales": "400.784", "ECommerce.subCategory": "Bookcases", }, Object { @@ -4300,14 +4300,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BS-11380", "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.4, + "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.profit": "74.9985", + "ECommerce.quantity": "3", + "ECommerce.rowId": "9618", + "ECommerce.sales": "899.982", "ECommerce.subCategory": "Copiers", }, Object { @@ -4315,14 +4315,14 @@ Array [ "ECommerce.city": "Bowling", "ECommerce.customerId": "BS-11380", "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.2, + "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.profit": "5.397", + "ECommerce.quantity": "3", + "ECommerce.rowId": "9619", + "ECommerce.sales": "86.352", "ECommerce.subCategory": "Art", }, ] @@ -4335,14 +4335,14 @@ Array [ "ECommerce.city": "Detroit", "ECommerce.customerId": "MC-17605", "ECommerce.customerName": "Customer 31", - "ECommerce.discount": 0, + "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.profit": "21.098", + "ECommerce.quantity": "2", + "ECommerce.rowId": "523", + "ECommerce.sales": "210.98", "ECommerce.subCategory": "Tables", }, Object { @@ -4350,14 +4350,14 @@ Array [ "ECommerce.city": "Lorain", "ECommerce.customerId": "GA-14725", "ECommerce.customerName": "Customer 19", - "ECommerce.discount": 0.2, + "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.profit": "8.5568", + "ECommerce.quantity": "4", + "ECommerce.rowId": "849", + "ECommerce.sales": "48.896", "ECommerce.subCategory": "Furnishings", }, Object { @@ -4365,14 +4365,14 @@ Array [ "ECommerce.city": "Olympia", "ECommerce.customerId": "PF-19165", "ECommerce.customerName": "Customer 36", - "ECommerce.discount": 0, + "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.profit": "4.0687", + "ECommerce.quantity": "1", + "ECommerce.rowId": "1013", + "ECommerce.sales": "14.03", "ECommerce.subCategory": "Storage", }, Object { @@ -4380,14 +4380,14 @@ Array [ "ECommerce.city": "Vancouver", "ECommerce.customerId": "JW-15220", "ECommerce.customerName": "Customer 26", - "ECommerce.discount": 0, + "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.profit": "3.6632", + "ECommerce.quantity": "2", + "ECommerce.rowId": "1494", + "ECommerce.sales": "9.64", "ECommerce.subCategory": "Furnishings", }, Object { @@ -4395,14 +4395,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "ML-17755", "ECommerce.customerName": "Customer 33", - "ECommerce.discount": 0.2, + "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.profit": "-2.1195", + "ECommerce.quantity": "3", + "ECommerce.rowId": "1995", + "ECommerce.sales": "11.304", "ECommerce.subCategory": "Fasteners", }, Object { @@ -4410,14 +4410,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "KN-16705", "ECommerce.customerName": "Customer 28", - "ECommerce.discount": 0.2, + "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.profit": "5.2026", + "ECommerce.quantity": "3", + "ECommerce.rowId": "2329", + "ECommerce.sales": "14.352", "ECommerce.subCategory": "Envelopes", }, Object { @@ -4425,14 +4425,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "DB-13405", "ECommerce.customerName": "Customer 15", - "ECommerce.discount": 0, + "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.profit": "13.604", + "ECommerce.quantity": "8", + "ECommerce.rowId": "2455", + "ECommerce.sales": "71.6", "ECommerce.subCategory": "Accessories", }, Object { @@ -4440,14 +4440,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BM-11650", "ECommerce.customerName": "Customer 8", - "ECommerce.discount": 0, + "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.profit": "81.432", + "ECommerce.quantity": "2", + "ECommerce.rowId": "2595", + "ECommerce.sales": "180.96", "ECommerce.subCategory": "Envelopes", }, Object { @@ -4455,14 +4455,14 @@ Array [ "ECommerce.city": "Provo", "ECommerce.customerId": "AS-10225", "ECommerce.customerName": "Customer 3", - "ECommerce.discount": 0, + "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.profit": "77.5764", + "ECommerce.quantity": "3", + "ECommerce.rowId": "2655", + "ECommerce.sales": "1292.94", "ECommerce.subCategory": "Bookcases", }, Object { @@ -4470,14 +4470,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "DG-13300", "ECommerce.customerName": "Customer 16", - "ECommerce.discount": 0, + "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.profit": "494.9725", + "ECommerce.quantity": "11", + "ECommerce.rowId": "2661", + "ECommerce.sales": "1979.89", "ECommerce.subCategory": "Phones", }, Object { @@ -4485,14 +4485,14 @@ Array [ "ECommerce.city": "Glendale", "ECommerce.customerId": "EM-14140", "ECommerce.customerName": "Customer 18", - "ECommerce.discount": 0.2, + "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.profit": "9.9652", + "ECommerce.quantity": "2", + "ECommerce.rowId": "2952", + "ECommerce.sales": "113.888", "ECommerce.subCategory": "Chairs", }, Object { @@ -4500,14 +4500,14 @@ Array [ "ECommerce.city": "San Francisco", "ECommerce.customerId": "HH-15010", "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0, + "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": 10.3904, - "ECommerce.quantity": 2, - "ECommerce.rowId": 3059, - "ECommerce.sales": 30.56, + "ECommerce.profit": "10.3904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3059", + "ECommerce.sales": "30.56", "ECommerce.subCategory": "Furnishings", }, Object { @@ -4515,14 +4515,14 @@ Array [ "ECommerce.city": "San Francisco", "ECommerce.customerId": "HH-15010", "ECommerce.customerName": "Customer 21", - "ECommerce.discount": 0.2, + "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.quantity": 2, - "ECommerce.rowId": 3060, - "ECommerce.sales": 24.368, + "ECommerce.profit": "-3.3506", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3060", + "ECommerce.sales": "24.368", "ECommerce.subCategory": "Tables", }, Object { @@ -4530,14 +4530,14 @@ Array [ "ECommerce.city": "Louisville", "ECommerce.customerId": "DW-13480", "ECommerce.customerName": "Customer 17", - "ECommerce.discount": 0, + "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": 3083, - "ECommerce.sales": 539.97, + "ECommerce.profit": "134.9925", + "ECommerce.quantity": "3", + "ECommerce.rowId": "3083", + "ECommerce.sales": "539.97", "ECommerce.subCategory": "Phones", }, Object { @@ -4545,14 +4545,14 @@ Array [ "ECommerce.city": "Auburn", "ECommerce.customerId": "KN-16705", "ECommerce.customerName": "Customer 28", - "ECommerce.discount": 0, + "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.profit": "1.0904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "3448", + "ECommerce.sales": "3.76", "ECommerce.subCategory": "Art", }, Object { @@ -4560,14 +4560,14 @@ Array [ "ECommerce.city": "Omaha", "ECommerce.customerId": "JO-15550", "ECommerce.customerName": "Customer 24", - "ECommerce.discount": 0, + "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.profit": "1.1775", + "ECommerce.quantity": "5", + "ECommerce.rowId": "3717", + "ECommerce.sales": "23.55", "ECommerce.subCategory": "Fasteners", }, Object { @@ -4575,14 +4575,14 @@ Array [ "ECommerce.city": "Bakersfield", "ECommerce.customerId": "AW-10840", "ECommerce.customerName": "Customer 4", - "ECommerce.discount": 0, + "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.profit": "2.726", + "ECommerce.quantity": "5", + "ECommerce.rowId": "3934", + "ECommerce.sales": "9.4", "ECommerce.subCategory": "Art", }, Object { @@ -4590,14 +4590,14 @@ Array [ "ECommerce.city": "Philadelphia", "ECommerce.customerId": "CC-12475", "ECommerce.customerName": "Customer 12", - "ECommerce.discount": 0.2, + "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.profit": "3.9296", + "ECommerce.quantity": "4", + "ECommerce.rowId": "4012", + "ECommerce.sales": "39.296", "ECommerce.subCategory": "Storage", }, Object { @@ -4605,14 +4605,14 @@ Array [ "ECommerce.city": "Lafayette", "ECommerce.customerId": "CS-12355", "ECommerce.customerName": "Customer 14", - "ECommerce.discount": 0, + "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.profit": "60.5488", + "ECommerce.quantity": "4", + "ECommerce.rowId": "4031", + "ECommerce.sales": "232.88", "ECommerce.subCategory": "Chairs", }, Object { @@ -4620,14 +4620,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "AH-10465", "ECommerce.customerName": "Customer 1", - "ECommerce.discount": 0, + "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": 4161, - "ECommerce.sales": 539.97, + "ECommerce.profit": "134.9925", + "ECommerce.quantity": "3", + "ECommerce.rowId": "4161", + "ECommerce.sales": "539.97", "ECommerce.subCategory": "Phones", }, Object { @@ -4635,14 +4635,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "WB-21850", "ECommerce.customerName": "Customer 41", - "ECommerce.discount": 0, + "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.profit": "21.5824", + "ECommerce.quantity": "4", + "ECommerce.rowId": "4227", + "ECommerce.sales": "45.92", "ECommerce.subCategory": "Fasteners", }, Object { @@ -4650,14 +4650,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "TB-21175", "ECommerce.customerName": "Customer 39", - "ECommerce.discount": 0, + "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.profit": "517.4793", + "ECommerce.quantity": "9", + "ECommerce.rowId": "4882", + "ECommerce.sales": "2249.91", "ECommerce.subCategory": "Accessories", }, Object { @@ -4665,14 +4665,14 @@ Array [ "ECommerce.city": "Detroit", "ECommerce.customerId": "CA-12775", "ECommerce.customerName": "Customer 11", - "ECommerce.discount": 0, + "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.profit": "134.5302", + "ECommerce.quantity": "7", + "ECommerce.rowId": "5220", + "ECommerce.sales": "498.26", "ECommerce.subCategory": "Chairs", }, Object { @@ -4680,14 +4680,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "KL-16555", "ECommerce.customerName": "Customer 27", - "ECommerce.discount": 0, + "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.profit": "8.5025", + "ECommerce.quantity": "5", + "ECommerce.rowId": "5277", + "ECommerce.sales": "44.75", "ECommerce.subCategory": "Accessories", }, Object { @@ -4695,14 +4695,14 @@ Array [ "ECommerce.city": "Los Angeles", "ECommerce.customerId": "SS-20140", "ECommerce.customerName": "Customer 38", - "ECommerce.discount": 0, + "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.profit": "8.5025", + "ECommerce.quantity": "5", + "ECommerce.rowId": "6125", + "ECommerce.sales": "44.75", "ECommerce.subCategory": "Accessories", }, Object { @@ -4710,14 +4710,14 @@ Array [ "ECommerce.city": "Marion", "ECommerce.customerId": "MG-17650", "ECommerce.customerName": "Customer 32", - "ECommerce.discount": 0.2, + "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.profit": "1.7352", + "ECommerce.quantity": "2", + "ECommerce.rowId": "6205", + "ECommerce.sales": "7.712", "ECommerce.subCategory": "Furnishings", }, Object { @@ -4725,14 +4725,14 @@ Array [ "ECommerce.city": "Oakland", "ECommerce.customerId": "BB-11545", "ECommerce.customerName": "Customer 5", - "ECommerce.discount": 0, + "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.profit": "44.975", + "ECommerce.quantity": "5", + "ECommerce.rowId": "6272", + "ECommerce.sales": "179.9", "ECommerce.subCategory": "Art", }, Object { @@ -4740,14 +4740,14 @@ Array [ "ECommerce.city": "Baltimore", "ECommerce.customerId": "AJ-10780", "ECommerce.customerName": "Customer 2", - "ECommerce.discount": 0, + "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.profit": "1.0904", + "ECommerce.quantity": "2", + "ECommerce.rowId": "6459", + "ECommerce.sales": "3.76", "ECommerce.subCategory": "Art", }, Object { @@ -4755,14 +4755,14 @@ Array [ "ECommerce.city": "Arlington", "ECommerce.customerId": "BF-11020", "ECommerce.customerName": "Customer 6", - "ECommerce.discount": 0.2, + "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.profit": "15.498", + "ECommerce.quantity": "5", + "ECommerce.rowId": "6651", + "ECommerce.sales": "45.92", "ECommerce.subCategory": "Fasteners", }, Object { @@ -4770,14 +4770,14 @@ Array [ "ECommerce.city": "Houston", "ECommerce.customerId": "HK-14890", "ECommerce.customerName": "Customer 22", - "ECommerce.discount": 0.2, + "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.profit": "569.9905", + "ECommerce.quantity": "5", + "ECommerce.rowId": "7174", + "ECommerce.sales": "2399.96", "ECommerce.subCategory": "Copiers", }, Object { @@ -4785,14 +4785,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "LR-16915", "ECommerce.customerName": "Customer 30", - "ECommerce.discount": 0.5, + "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.profit": "-272.58", + "ECommerce.quantity": "2", + "ECommerce.rowId": "7293", + "ECommerce.sales": "649", "ECommerce.subCategory": "Machines", }, Object { @@ -4800,14 +4800,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "MM-18280", "ECommerce.customerName": "Customer 34", - "ECommerce.discount": 0, + "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.profit": "0.7065", + "ECommerce.quantity": "3", + "ECommerce.rowId": "7310", + "ECommerce.sales": "14.13", "ECommerce.subCategory": "Fasteners", }, Object { @@ -4815,14 +4815,14 @@ Array [ "ECommerce.city": "Philadelphia", "ECommerce.customerId": "BS-11755", "ECommerce.customerName": "Customer 10", - "ECommerce.discount": 0.2, + "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.profit": "6.4176", + "ECommerce.quantity": "3", + "ECommerce.rowId": "7425", + "ECommerce.sales": "36.672", "ECommerce.subCategory": "Furnishings", }, Object { @@ -4830,14 +4830,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BF-11170", "ECommerce.customerName": "Customer 7", - "ECommerce.discount": 0, + "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.profit": "467.9922", + "ECommerce.quantity": "2", + "ECommerce.rowId": "7698", + "ECommerce.sales": "1199.98", "ECommerce.subCategory": "Copiers", }, Object { @@ -4845,14 +4845,14 @@ Array [ "ECommerce.city": "Lakewood", "ECommerce.customerId": "NP-18670", "ECommerce.customerName": "Customer 35", - "ECommerce.discount": 0, + "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.profit": "129.294", + "ECommerce.quantity": "5", + "ECommerce.rowId": "8425", + "ECommerce.sales": "2154.9", "ECommerce.subCategory": "Bookcases", }, Object { @@ -4860,14 +4860,14 @@ Array [ "ECommerce.city": "Dallas", "ECommerce.customerId": "LC-17050", "ECommerce.customerName": "Customer 29", - "ECommerce.discount": 0.6, + "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.profit": "-19.864", + "ECommerce.quantity": "5", + "ECommerce.rowId": "8621", + "ECommerce.sales": "30.56", "ECommerce.subCategory": "Furnishings", }, Object { @@ -4875,14 +4875,14 @@ Array [ "ECommerce.city": "Decatur", "ECommerce.customerId": "JS-16030", "ECommerce.customerName": "Customer 25", - "ECommerce.discount": 0.2, + "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.profit": "6.1992", + "ECommerce.quantity": "2", + "ECommerce.rowId": "8673", + "ECommerce.sales": "18.368", "ECommerce.subCategory": "Fasteners", }, Object { @@ -4890,14 +4890,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "TS-21205", "ECommerce.customerName": "Customer 40", - "ECommerce.discount": 0.2, + "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.profit": "26.9973", + "ECommerce.quantity": "3", + "ECommerce.rowId": "8697", + "ECommerce.sales": "239.976", "ECommerce.subCategory": "Phones", }, Object { @@ -4905,14 +4905,14 @@ Array [ "ECommerce.city": "Morristown", "ECommerce.customerId": "GZ-14470", "ECommerce.customerName": "Customer 20", - "ECommerce.discount": 0, + "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.profit": "225.6", + "ECommerce.quantity": "4", + "ECommerce.rowId": "8878", + "ECommerce.sales": "480", "ECommerce.subCategory": "Machines", }, Object { @@ -4920,14 +4920,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "JH-15430", "ECommerce.customerName": "Customer 23", - "ECommerce.discount": 0.5, + "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.profit": "-7.2", + "ECommerce.quantity": "2", + "ECommerce.rowId": "8958", + "ECommerce.sales": "120", "ECommerce.subCategory": "Machines", }, Object { @@ -4935,14 +4935,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "CD-12280", "ECommerce.customerName": "Customer 13", - "ECommerce.discount": 0.1, + "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.profit": "24.2012", + "ECommerce.quantity": "2", + "ECommerce.rowId": "9473", + "ECommerce.sales": "128.124", "ECommerce.subCategory": "Chairs", }, Object { @@ -4950,14 +4950,14 @@ Array [ "ECommerce.city": "New York City", "ECommerce.customerId": "SB-20185", "ECommerce.customerName": "Customer 37", - "ECommerce.discount": 0.2, + "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.profit": "-5.0098", + "ECommerce.quantity": "1", + "ECommerce.rowId": "9584", + "ECommerce.sales": "400.784", "ECommerce.subCategory": "Bookcases", }, Object { @@ -4965,14 +4965,14 @@ Array [ "ECommerce.city": "Columbus", "ECommerce.customerId": "BS-11380", "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.4, + "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.profit": "74.9985", + "ECommerce.quantity": "3", + "ECommerce.rowId": "9618", + "ECommerce.sales": "899.982", "ECommerce.subCategory": "Copiers", }, Object { @@ -4980,14 +4980,14 @@ Array [ "ECommerce.city": "Bowling", "ECommerce.customerId": "BS-11380", "ECommerce.customerName": "Customer 9", - "ECommerce.discount": 0.2, + "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.profit": "5.397", + "ECommerce.quantity": "3", + "ECommerce.rowId": "9619", + "ECommerce.sales": "86.352", "ECommerce.subCategory": "Art", }, ] @@ -5850,181 +5850,181 @@ exports[`Queries with the @cubejs-backend/mssql-driver querying custom granulari Array [ Object { "ECommerce.city": "Auburn", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Baltimore", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Columbus", - "ECommerce.count": 3, + "ECommerce.count": "3", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Decatur", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Detroit", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Houston", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Lorain", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Los Angeles", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Louisville", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "New York City", - "ECommerce.count": 4, + "ECommerce.count": "4", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Olympia", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Omaha", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { "ECommerce.city": "Arlington", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Bakersfield", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Bowling", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Columbus", - "ECommerce.count": 9, + "ECommerce.count": "9", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Dallas", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Detroit", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Glendale", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Lafayette", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Lakewood", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Marion", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Morristown", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "New York City", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Oakland", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Provo", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "San Francisco", - "ECommerce.count": 2, + "ECommerce.count": "2", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, Object { "ECommerce.city": "Vancouver", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, @@ -6034,12 +6034,12 @@ Array [ exports[`Queries with the @cubejs-backend/mssql-driver querying custom granularities ECommerce: count by half_year + no dimension 1`] = ` Array [ Object { - "ECommerce.count": 18, + "ECommerce.count": "18", "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-01-01T00:00:00.000", }, Object { - "ECommerce.count": 26, + "ECommerce.count": "26", "ECommerce.customOrderDateNoPreAgg": "2020-07-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year": "2020-07-01T00:00:00.000", }, @@ -6050,187 +6050,187 @@ exports[`Queries with the @cubejs-backend/mssql-driver querying custom granulari Array [ Object { "ECommerce.city": "Decatur", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", }, Object { "ECommerce.city": "Detroit", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", }, Object { "ECommerce.city": "Houston", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", }, Object { "ECommerce.city": "Lorain", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", }, Object { "ECommerce.city": "New York City", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", }, Object { "ECommerce.city": "Arlington", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Auburn", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Bakersfield", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Baltimore", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Columbus", - "ECommerce.count": 4, + "ECommerce.count": "4", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Detroit", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Los Angeles", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Louisville", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Morristown", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "New York City", - "ECommerce.count": 3, + "ECommerce.count": "3", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Olympia", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Omaha", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Provo", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { "ECommerce.city": "Bowling", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "Columbus", - "ECommerce.count": 8, + "ECommerce.count": "8", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "Dallas", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "Glendale", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "Lafayette", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "Lakewood", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "Marion", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "New York City", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "Oakland", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "San Francisco", - "ECommerce.count": 2, + "ECommerce.count": "2", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, Object { "ECommerce.city": "Vancouver", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, @@ -6240,17 +6240,17 @@ Array [ exports[`Queries with the @cubejs-backend/mssql-driver querying custom granularities ECommerce: count by half_year_by_1st_april + no dimension 1`] = ` Array [ Object { - "ECommerce.count": 5, + "ECommerce.count": "5", "ECommerce.customOrderDateNoPreAgg": "2019-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2019-10-01T00:00:00.000", }, Object { - "ECommerce.count": 19, + "ECommerce.count": "19", "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-04-01T00:00:00.000", }, Object { - "ECommerce.count": 20, + "ECommerce.count": "20", "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.half_year_by_1st_april": "2020-10-01T00:00:00.000", }, @@ -6261,199 +6261,199 @@ exports[`Queries with the @cubejs-backend/mssql-driver querying custom granulari Array [ Object { "ECommerce.city": "Decatur", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2019-12-12T21:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2019-12-12T21:00:00.000", }, Object { "ECommerce.city": "Detroit", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2019-12-12T21:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2019-12-12T21:00:00.000", }, Object { "ECommerce.city": "Lorain", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2019-12-12T21:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2019-12-12T21:00:00.000", }, Object { "ECommerce.city": "Auburn", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { "ECommerce.city": "Baltimore", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { "ECommerce.city": "Columbus", - "ECommerce.count": 2, + "ECommerce.count": "2", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { "ECommerce.city": "Houston", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { "ECommerce.city": "Los Angeles", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { "ECommerce.city": "Louisville", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { "ECommerce.city": "New York City", - "ECommerce.count": 3, + "ECommerce.count": "3", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { "ECommerce.city": "Omaha", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { "ECommerce.city": "Arlington", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-06-16T03:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-16T03:00:00.000", }, Object { "ECommerce.city": "Bakersfield", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-06-16T03:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-16T03:00:00.000", }, Object { "ECommerce.city": "Columbus", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-06-16T03:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-16T03:00:00.000", }, Object { "ECommerce.city": "Detroit", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-06-16T03:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-16T03:00:00.000", }, Object { "ECommerce.city": "Morristown", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-06-16T03:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-16T03:00:00.000", }, Object { "ECommerce.city": "New York City", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-06-16T03:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-16T03:00:00.000", }, Object { "ECommerce.city": "Olympia", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-06-16T03:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-16T03:00:00.000", }, Object { "ECommerce.city": "Provo", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-06-16T03:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-16T03:00:00.000", }, Object { "ECommerce.city": "Bowling", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "Columbus", - "ECommerce.count": 8, + "ECommerce.count": "8", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "Dallas", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "Glendale", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "Lakewood", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "Marion", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "New York City", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "Oakland", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "Philadelphia", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "San Francisco", - "ECommerce.count": 2, + "ECommerce.count": "2", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "Vancouver", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { "ECommerce.city": "Columbus", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-12-19T09:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-12-19T09:00:00.000", }, Object { "ECommerce.city": "Lafayette", - "ECommerce.count": 1, + "ECommerce.count": "1", "ECommerce.customOrderDateNoPreAgg": "2020-12-19T09:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-12-19T09:00:00.000", }, @@ -6463,27 +6463,27 @@ Array [ exports[`Queries with the @cubejs-backend/mssql-driver querying custom granularities ECommerce: count by three_months_by_march + no dimension 1`] = ` Array [ Object { - "ECommerce.count": 3, + "ECommerce.count": "3", "ECommerce.customOrderDateNoPreAgg": "2019-12-12T21:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2019-12-12T21:00:00.000", }, Object { - "ECommerce.count": 12, + "ECommerce.count": "12", "ECommerce.customOrderDateNoPreAgg": "2020-03-15T00:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-03-15T00:00:00.000", }, Object { - "ECommerce.count": 8, + "ECommerce.count": "8", "ECommerce.customOrderDateNoPreAgg": "2020-06-16T03:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-06-16T03:00:00.000", }, Object { - "ECommerce.count": 19, + "ECommerce.count": "19", "ECommerce.customOrderDateNoPreAgg": "2020-09-17T06:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-09-17T06:00:00.000", }, Object { - "ECommerce.count": 2, + "ECommerce.count": "2", "ECommerce.customOrderDateNoPreAgg": "2020-12-19T09:00:00.000", "ECommerce.customOrderDateNoPreAgg.three_months_by_march": "2020-12-19T09:00:00.000", }, @@ -6495,27 +6495,27 @@ 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, + "ECommerce.rollingCountByLeading": "8", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-02-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-02-01T10:00:00.000", - "ECommerce.rollingCountByLeading": 12, + "ECommerce.rollingCountByLeading": "12", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-04-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-04-01T10:00:00.000", - "ECommerce.rollingCountByLeading": 6, + "ECommerce.rollingCountByLeading": "6", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-06-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-06-01T10:00:00.000", - "ECommerce.rollingCountByLeading": 19, + "ECommerce.rollingCountByLeading": "19", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-08-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-08-01T10:00:00.000", - "ECommerce.rollingCountByLeading": 16, + "ECommerce.rollingCountByLeading": "16", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-10-01T10:00:00.000", @@ -6535,17 +6535,17 @@ 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, + "ECommerce.rollingCountByTrailing": "3", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-02-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-02-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": 3, + "ECommerce.rollingCountByTrailing": "3", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-04-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-04-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": 12, + "ECommerce.rollingCountByTrailing": "12", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-06-01T10:00:00.000", @@ -6555,12 +6555,12 @@ Array [ Object { "ECommerce.customOrderDateNoPreAgg": "2020-08-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-08-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": 10, + "ECommerce.rollingCountByTrailing": "10", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-10-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-10-01T10:00:00.000", - "ECommerce.rollingCountByTrailing": 16, + "ECommerce.rollingCountByTrailing": "16", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-12-01T10:00:00.000", @@ -6575,37 +6575,37 @@ 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, + "ECommerce.rollingCountByUnbounded": "3", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-02-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-02-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 6, + "ECommerce.rollingCountByUnbounded": "6", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-04-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-04-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 18, + "ECommerce.rollingCountByUnbounded": "18", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-06-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-06-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 18, + "ECommerce.rollingCountByUnbounded": "18", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-08-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-08-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 28, + "ECommerce.rollingCountByUnbounded": "28", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-10-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-10-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 44, + "ECommerce.rollingCountByUnbounded": "44", }, Object { "ECommerce.customOrderDateNoPreAgg": "2020-12-01T10:00:00.000", "ECommerce.customOrderDateNoPreAgg.two_mo_by_feb": "2020-12-01T10:00:00.000", - "ECommerce.rollingCountByUnbounded": 44, + "ECommerce.rollingCountByUnbounded": "44", }, ] `; From 3a7842b3ca045ed8cd43a4831118634f72e78048 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Thu, 17 Apr 2025 22:51:34 +0300 Subject: [PATCH 07/11] Some updates to health check --- .../cubejs-testing-shared/src/db-container-runners/mssql.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cubejs-testing-shared/src/db-container-runners/mssql.ts b/packages/cubejs-testing-shared/src/db-container-runners/mssql.ts index 44864c3c25921..66807fc0527a6 100644 --- a/packages/cubejs-testing-shared/src/db-container-runners/mssql.ts +++ b/packages/cubejs-testing-shared/src/db-container-runners/mssql.ts @@ -6,13 +6,15 @@ export class MssqlDbRunner extends DbRunnerAbstract { public static startContainer(options: DBRunnerContainerOptions) { const version = process.env.TEST_MSSQL_VERSION || options.version || '2019-latest'; + const logMsg = version === '2019-latest' ? 'Service Broker manager has started' : 'SQL Server is now ready for client connections'; + const container = new GenericContainer(`mcr.microsoft.com/mssql/server:${version}`) .withEnvironment({ ACCEPT_EULA: 'Y', MSSQL_SA_PASSWORD: process.env.TEST_DB_PASSWORD || 'Test1test', }) .withExposedPorts(1433) - .withWaitStrategy(Wait.forLogMessage('Service Broker manager has started')) + .withWaitStrategy(Wait.forLogMessage(logMsg)) .withStartupTimeout(30 * 1000); if (options.volumes) { From cb093867fe34e07fe019ec890b3e6cdbc14c56a4 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 18 Apr 2025 13:16:33 +0300 Subject: [PATCH 08/11] sync lock --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index c414be1bfacde..b4e5d7a8a0548 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1154,7 +1154,7 @@ jsonwebtoken "^9.0.0" uuid "^8.3.0" -"@azure/msal-node@^3.2.3", "@azure/msal-node@^3.5.0": +"@azure/msal-node@^3.5.0": version "3.5.1" resolved "https://registry.yarnpkg.com/@azure/msal-node/-/msal-node-3.5.1.tgz#8bb233cbeeda83f64af4cc29569f1b5312c9b9ad" integrity sha512-dkgMYM5B6tI88r/oqf5bYd93WkenQpaWwiszJDk7avVjso8cmuKRTW97dA1RMi6RhihZFLtY1VtWxU9+sW2T5g== From a4edae799c66d12ba50a55f778e0be180084ba3b Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 18 Apr 2025 17:49:27 +0300 Subject: [PATCH 09/11] upd package.json --- packages/cubejs-mssql-driver/package.json | 9 +++++++++ packages/cubejs-mysql-driver/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/cubejs-mssql-driver/package.json b/packages/cubejs-mssql-driver/package.json index 4d25cd81cb1de..e5ed6c4db4660 100644 --- a/packages/cubejs-mssql-driver/package.json +++ b/packages/cubejs-mssql-driver/package.json @@ -11,9 +11,15 @@ "engines": { "node": "^14.0.0 || ^16.0.0 || >=17.0.0" }, + "files": [ + "dist/src", + "index.js" + ], "main": "index.js", + "typings": "dist/src/index.d.ts", "dependencies": { "@cubejs-backend/base-driver": "1.3.5", + "@cubejs-backend/shared": "1.3.5", "mssql": "^11.0.1" }, "devDependencies": { @@ -23,6 +29,9 @@ "jest": { "testEnvironment": "node" }, + "eslintConfig": { + "extends": "../cubejs-linter" + }, "license": "Apache-2.0", "publishConfig": { "access": "public" diff --git a/packages/cubejs-mysql-driver/package.json b/packages/cubejs-mysql-driver/package.json index 0cdda01999080..a0974bddbef34 100644 --- a/packages/cubejs-mysql-driver/package.json +++ b/packages/cubejs-mysql-driver/package.json @@ -29,7 +29,6 @@ "dependencies": { "@cubejs-backend/base-driver": "1.3.5", "@cubejs-backend/shared": "1.3.5", - "@types/mysql": "^2.15.21", "generic-pool": "^3.8.2", "mysql": "^2.18.1" }, @@ -37,6 +36,7 @@ "@cubejs-backend/linter": "1.3.5", "@cubejs-backend/testing-shared": "1.3.5", "@types/generic-pool": "^3.8.2", + "@types/mysql": "^2.15.21", "@types/jest": "^27", "jest": "^27", "stream-to-array": "^2.3.0", From 44db84f466f5a7ca74feb625e9d4489a98a1c640 Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 18 Apr 2025 20:46:53 +0300 Subject: [PATCH 10/11] fix package.json --- packages/cubejs-mssql-driver/package.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/cubejs-mssql-driver/package.json b/packages/cubejs-mssql-driver/package.json index e5ed6c4db4660..9cf378454df6a 100644 --- a/packages/cubejs-mssql-driver/package.json +++ b/packages/cubejs-mssql-driver/package.json @@ -17,6 +17,13 @@ ], "main": "index.js", "typings": "dist/src/index.d.ts", + "scripts": { + "build": "rm -rf dist && npm run tsc", + "tsc": "tsc", + "watch": "tsc -w", + "lint": "eslint src/* test/* --ext .ts,.js", + "lint:fix": "eslint --fix src/* test/* --ext .ts,.js" + }, "dependencies": { "@cubejs-backend/base-driver": "1.3.5", "@cubejs-backend/shared": "1.3.5", From 48c03f5f4ed6e73703fe059361142db3637c84dd Mon Sep 17 00:00:00 2001 From: Konstantin Burkalev Date: Fri, 18 Apr 2025 21:20:38 +0300 Subject: [PATCH 11/11] fix lint errors --- packages/cubejs-mssql-driver/package.json | 4 ++-- .../cubejs-mssql-driver/src/MSSqlDriver.ts | 24 +++++++++---------- .../cubejs-mssql-driver/src/QueryStream.ts | 19 ++++++++------- 3 files changed, 24 insertions(+), 23 deletions(-) diff --git a/packages/cubejs-mssql-driver/package.json b/packages/cubejs-mssql-driver/package.json index 9cf378454df6a..e1fdd1af48a4d 100644 --- a/packages/cubejs-mssql-driver/package.json +++ b/packages/cubejs-mssql-driver/package.json @@ -21,8 +21,8 @@ "build": "rm -rf dist && npm run tsc", "tsc": "tsc", "watch": "tsc -w", - "lint": "eslint src/* test/* --ext .ts,.js", - "lint:fix": "eslint --fix src/* test/* --ext .ts,.js" + "lint": "eslint src/* --ext .ts,.js", + "lint:fix": "eslint --fix src/* --ext .ts,.js" }, "dependencies": { "@cubejs-backend/base-driver": "1.3.5", diff --git a/packages/cubejs-mssql-driver/src/MSSqlDriver.ts b/packages/cubejs-mssql-driver/src/MSSqlDriver.ts index 402c8314faa46..3688453395ab5 100644 --- a/packages/cubejs-mssql-driver/src/MSSqlDriver.ts +++ b/packages/cubejs-mssql-driver/src/MSSqlDriver.ts @@ -35,13 +35,13 @@ const numericTypes = [ ]; for (const type of numericTypes) { - sql.valueHandler.set(type, (value) => value != null ? String(value) : value); + sql.valueHandler.set(type, (value) => (value != null ? String(value) : value)); } export type MSSqlDriverConfiguration = Omit & { readOnly?: boolean; server?: string; -} +}; const GenericTypeToMSSql: Record = { boolean: 'bit', @@ -55,28 +55,29 @@ const MSSqlToGenericType: Record = { bit: 'boolean', uniqueidentifier: 'uuid', datetime2: 'timestamp' -} +}; /** * MS SQL driver class. */ export class MSSqlDriver extends BaseDriver implements DriverInterface { - private readonly connectionPool: ConnectionPool; + private readonly initialConnectPromise: Promise; + private readonly config: MSSqlDriverConfiguration; /** * Returns default concurrency value. */ - static getDefaultConcurrency() { + public static getDefaultConcurrency() { return 2; } /** * Class constructor. */ - constructor(config: MSSqlDriverConfiguration & { + public constructor(config: MSSqlDriverConfiguration & { /** * Data source name. */ @@ -93,8 +94,7 @@ export class MSSqlDriver extends BaseDriver implements DriverInterface { */ testConnectionTimeout?: number, server?: string, - } = {} - ) { + } = {}) { super({ testConnectionTimeout: config.testConnectionTimeout, }); @@ -140,7 +140,7 @@ export class MSSqlDriver extends BaseDriver implements DriverInterface { * Note: It returns the unprefixed option names. * In case of using multi sources options need to be prefixed manually. */ - static driverEnvVariables() { + public static driverEnvVariables() { return [ 'CUBEJS_DB_HOST', 'CUBEJS_DB_NAME', @@ -184,7 +184,7 @@ export class MSSqlDriver extends BaseDriver implements DriverInterface { }); stream.on('error', (err: Error) => { reject(err); - }) + }); }); return { rowStream: stream, @@ -211,7 +211,7 @@ export class MSSqlDriver extends BaseDriver implements DriverInterface { * } * }} fields */ - mapFields(fields: Record) { + private mapFields(fields: Record) { return Object.keys(fields).map((field) => { let type; switch (fields[field].type) { @@ -368,7 +368,7 @@ export class MSSqlDriver extends BaseDriver implements DriverInterface { return GenericTypeToMSSql[columnType] || super.fromGenericType(columnType); } - protected toGenericType(columnType: string): string{ + protected toGenericType(columnType: string): string { return MSSqlToGenericType[columnType] || super.toGenericType(columnType); } diff --git a/packages/cubejs-mssql-driver/src/QueryStream.ts b/packages/cubejs-mssql-driver/src/QueryStream.ts index 768aabd67559d..1693c9a28c8b4 100644 --- a/packages/cubejs-mssql-driver/src/QueryStream.ts +++ b/packages/cubejs-mssql-driver/src/QueryStream.ts @@ -9,12 +9,13 @@ import { */ export class QueryStream extends Readable { private request: sql.Request | null; + private toRead: number = 0; /** * @constructor */ - constructor(request: sql.Request, highWaterMark: number) { + public constructor(request: sql.Request, highWaterMark: number) { super({ objectMode: true, highWaterMark: @@ -27,10 +28,10 @@ export class QueryStream extends Readable { if (this.toRead-- <= 0 || !canAdd) { this.request?.pause(); } - }) + }); this.request.on('done', () => { this.push(null); - }) + }); this.request.on('error', (err: Error) => { this.destroy(err); }); @@ -39,15 +40,15 @@ export class QueryStream extends Readable { /** * @override */ - _read(toRead: number) { + public _read(toRead: number) { this.toRead += toRead; this.request?.resume(); } - transformRow(row: Record) { - for (const key in row) { - if (row.hasOwnProperty(key) && row[key] && row[key] instanceof Date) { - row[key] = row[key].toJSON(); + private transformRow(row: Record) { + for (const [key, value] of Object.entries(row)) { + if (value instanceof Date) { + row[key] = value.toJSON(); } } } @@ -55,7 +56,7 @@ export class QueryStream extends Readable { /** * @override */ - _destroy(error: any, callback: CallableFunction) { + public _destroy(error: any, callback: CallableFunction) { this.request?.cancel(); this.request = null; callback(error);