diff --git a/docs-mintlify/admin/users-and-permissions/custom-roles.mdx b/docs-mintlify/admin/users-and-permissions/custom-roles.mdx index cd78df899d9ff..cd78cd4fdb750 100644 --- a/docs-mintlify/admin/users-and-permissions/custom-roles.mdx +++ b/docs-mintlify/admin/users-and-permissions/custom-roles.mdx @@ -1,6 +1,6 @@ --- title: Custom roles -description: Custom roles are available on the Enterprise plan. +description: Define fine-grained custom roles for your organization on the Enterprise plan. --- @@ -9,142 +9,244 @@ Custom roles are available on the [Enterprise plan](https://cube.dev/pricing). -Cube comes with [default roles][ref-default-roles] that cover common use cases. However, if you need more customization, you can create custom roles with a fine-grained set of permissions tailored to your organization's specific needs. +Cube comes with [default roles][ref-default-roles] (Admin, Developer, Explorer, Viewer) that cover common use cases. When you need finer control — for example, to let a user edit the data model on a single deployment but nothing else — you can define **custom roles** with a tailored set of permissions. [ref-default-roles]: /admin/users-and-permissions/roles-and-permissions -## Managing roles -In Cube Cloud, users are not assigned permissions directly. Instead, they are assigned -_roles_ that are associated with _policies_. Each policy define what _actions_ they can -perform and on what _resources_ they can perform those actions. This approach makes it -easier to manage permissions at scale. +## How custom roles work -Each role can be associated with one or more of the following policies: +Each custom role is built around three concepts: -| Policy | Description | -| --- | --- | -| `Global` | Controls account-level functionality, e.g., as Billing. | -| `Deployment` | Controls deployment-level functionality, e.g., as Playground. | -| `Report` | Controls access to specific reports in Saved Reports. | -| `ReportFolder` | Controls access to specific folders in Saved Reports. | -| `Agent` | Controls access to specific [AI agents][ref-ai-agents]. | -| `AgentSpace` | Controls access to specific AI agent [spaces][ref-ai-spaces]. | -| `Workbook` | Controls access to specific [workbooks][ref-workbooks]. | +1. **Base Role** (required) — Viewer, Explorer, or Developer. Determines the user's license tier and the inherited level of access. +2. **Global permissions** — org-wide capabilities such as billing, customization, integrations, and account-wide deployment management. +3. **Deployment permissions** — one or more policies, each targeting "All deployments" or specific deployments. -Each policy can apply to _all resources_ or _specific resources_. For example, a policy -could apply to all deployments or only to a specific deployment. +Permissions stack: a user gets the union of every role assigned to them, so a user with multiple custom roles holds the broadest set of granted permissions. -Also, each policy can have _all actions_ or only _specific actions_ associated with it. -For example, a policy could allow a user to view, create, or delete one or more -deployments if it's associated with those specific actions. +## Browsing roles -See [actions reference](#actions) for a list of available actions. +To see the list of custom roles, go to **Admin → Custom Roles** in your Cube account. Click on a role to edit it, or click **Add Role** to create a new one. -### Browsing roles +{/* TODO: Upload screenshot of /admin/roles list page */} -To see a list of custom roles, go to the **Admin -> Custom Roles** page in your Cube -account: +## Anatomy of a custom role - - Cube Cloud Custom Roles - +The role builder uses a two-column layout. The left column (sticky as you scroll) holds the role's identity and the **Create / Update** button. The right column (scrollable) holds the permission cards. -### Creating a role +{/* TODO: Upload screenshot of empty Create Role page showing the two-column layout */} -To create a new role, click the **Add Role** button. Enter a name and an optional -description for the role, then click **Add Policy** and select either **Deployment** -or **Global** for this policy's scope. +### Name and description -Deployment policies apply to deployment-level functionality, such as the -Playground and Data Model editor. Global policies apply to account-level -functionality, such as Billing. Once the policy scope has been -selected, you can restrict which actions this role can perform by selecting -"Specific" and using the dropdown to select specific actions. +- **Name** is required and must be unique within the account. The names `Admin`, `Guest`, `Developer`, `None`, and `All` are reserved. +- **Description** is optional but recommended — it shows up alongside the role on the Custom Roles list and on user profile pages. - - Cube Cloud Custom Roles - +### Base Role -When you are finished, click **Create** to create the role. +Every custom role has exactly one **Base Role**. It determines: -## Assigning roles to users +- The user's **license tier** — Cube infers the tier from the highest Base Role across all of the user's roles. +- The **inherited** capabilities the role grants out of the box. + +| Base Role | Description | +| ---------- | ------------------------------------------------------------ | +| Viewer | Read-only access to dashboards and chats. | +| Explorer | Viewer + create/edit workbooks, run queries. | +| Developer | Explorer + edit data model, manage deployments. | + +Inheritance is hierarchical: + +- **Explorer** automatically grants Viewer access. +- **Developer** automatically grants Explorer and Viewer access. + +{/* TODO: Upload screenshot of Base Role section with all three options visible */} + + + +The Base Role is required. Save is disabled until one is selected. + + + +#### Auto-bump to Developer + +If you check any deployment-scoped action stronger than **Access deployment** (`DeploymentRead`) — for example, **Edit deployment** or **Edit data model** — the Base Role is automatically forced to **Developer**, and the Viewer and Explorer options are disabled with a tooltip: + +> Selected actions require Developer role + +Removing the elevated action re-enables the lower tiers. This mirrors the server-side rule that any deployment write or data-model write requires the Developer license tier. + +{/* TODO: Upload screenshot of the auto-bump state — Viewer originally selected, "Edit deployment" checked, Base Role bumped to Developer with tooltip */} + +### Global permissions + +Global permissions are org-wide. Check any number of them on the **Global permissions** card: + +| Group | Permission | What it grants | +| ------------------------------------ | ----------------------------------- | --------------------------------------------------------- | +| Audit & Billing | Manage audit log | Access and configure the audit log. | +| Audit & Billing | View billing | View invoices and usage. | +| Customization | Manage chart palettes | Create and edit org-wide chart palettes. | +| Customization | Manage dashboard themes | Create and edit org-wide dashboard themes. | +| Integrations / Network | Manage OAuth integrations | Configure OAuth integrations and clients. | +| Integrations / Network | Issue OAuth tokens | Mint OAuth tokens for integrations. | +| Deployment management (account-wide) | Manage deployments (account-wide) | Create and list deployments across the account. | + +### Deployment permissions + +Deployment permissions are scoped to specific deployments. A custom role can have any number of **deployment policies**, each represented as its own card. Click **Add deployment policy** to add another card. + +Each card has two sections: + +#### Scope -To assign custom roles to users: +Choose which deployments the policy applies to: -1. Navigate to **Admin → Users** -2. Choose one of the following methods: - - **From the users table**: Use the dropdown in the users table - - **From individual user page**: Click on a user and assign roles from their profile page -3. You can assign multiple custom roles to a single user +- **All deployments** — the policy covers every deployment in the account, including ones added later. +- **Specific deployments** — pick deployments from a searchable multi-select picker. -## Actions +{/* TODO: Upload screenshot of a deployment policy card with "Specific deployments" selected and multiple deployments picked */} -Policies can have the following actions associated with them. +#### Actions + +Either grant **Full access** (a shortcut that enables every current and future deployment-scoped permission) or pick granular actions: + +| Group | Permission | What it grants | +| ----------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| General | Access deployment | Foundation permission required to access the deployment at all. A Viewer needs this just to open it. | +| General | Edit deployment | Modify deployment settings. | +| General | Delete deployment | Remove the deployment. | +| Data Model | View data model | Read data model files and dev branches. | +| Data Model | Edit data model | Edit the data model on any branch, including the main/deploy branch. Allows committing and merging to main, force-syncing main, and starting dev mode against main. | +| Data Model | Edit data model on dev branches | Edit the data model only on non-default branches. Blocks any write that targets the main/deploy branch (including merging to main). | +| Monitoring | Access query history | View deployment query history, performance, and traces. | + +When **Full access** is checked, the granular checkboxes appear checked and disabled — granting Full access today also covers any deployment-scoped permissions added in the future. + +{/* TODO: Upload screenshot of a deployment policy card with "Full access" checked, granular checkboxes shown checked + disabled */} + + + +**Access deployment** (`DeploymentRead`) is special. It's the only deployment action that does **not** auto-bump the Base Role to Developer, because Viewers also need it just to open a deployment. + + + +## Walkthroughs + +### Create a Viewer with read access to all deployments + +A common pattern: someone who consumes dashboards and chats but never edits anything. + + + + Go to **Admin → Custom Roles** and click **Add Role**. + + + Set the **Name** to, e.g., `Org Viewer`. + + + Select **Viewer**. + + + Click **Add deployment policy**, leave **Scope** on **All deployments**, and check **Access deployment** under General. + + + Click **Create**. + + + +### Create an Explorer for a single deployment + +For an analyst who works in one deployment. + + + + Name the role (e.g., `Marketing Analyst`) and pick **Explorer** as the Base Role. + + + Add a deployment policy, switch **Scope** to **Specific deployments**, and pick the relevant deployment(s) from the picker. + + + Check **Access deployment** so the user can open the deployment, and add **Access query history** if they should see query performance. + + + Click **Create**. + + + +### Create a Developer with Full access to specific deployments + +For a data engineer who owns a subset of deployments end-to-end. + + + + Name the role (e.g., `Sales Domain Owner`). + + + Add a deployment policy, switch **Scope** to **Specific deployments**, pick the relevant deployments, and check **Full access**. + + + The Base Role automatically switches to **Developer** and the Viewer/Explorer radios are disabled. + + + Click **Create**. + + + +## Assigning roles to users -### `Global` +To assign a custom role to a user: -| Action | Description | -| --- | --- | -| `Alerts Access`
`Alerts Create`
`Alerts Edit`
`Alerts Delete` | View, create, edit, and delete [budgets][ref-budgets]. | -| `Billing Access` | Access the billing data of the Cube Cloud account. | -| `Deployment Manage` | Create and delete deployments in the Cube Cloud account. | -| `Agent Admin` | Administer AI agents across the account. | -| `AI BI Developer` | Developer-level access to AI BI features with full AI token usage. | -| `AI BI User` | User-level access to AI BI features with standard AI token usage. | -| `AI BI Viewer` | Viewer-level access to AI BI features with limited AI token usage. | +1. Navigate to **Admin → Users**. +2. Either change the role from the dropdown in the users table, or click into the user's profile page. +3. Add one or more custom roles. Multiple roles stack — the user holds the union of permissions. -### `Deployment` +See [Manage users][ref-manage-users] for more. -| Action | Description | -| --- | --- | -| `Deployment View`
`Deployment Edit` | Access the deployment, change its settings. | -| `Playground Access` | Use [Playground][ref-playground]. | -| `Data Model View` | View the source code in the [data model][ref-data-model] editor, use [Visual Modeler][ref-visual-model]. | -| `Data Model Edit (all branches)`
`Data Model Edit (dev branches only)` | Use the [development mode][ref-dev-mode], edit the data model, perform Git operations (e.g., commit, pull, push). | -| `Queries & Metrics Access` | Use [Query History][ref-query-history] and [Performance Insights][ref-perf-insights]. | -| `SQL Runner Access` | Use [SQL Runner][ref-sql-runner]. | -| `Data Assets Access` | Use [Semantic Catalog][ref-semantic-catalog]. | +[ref-manage-users]: /admin/users-and-permissions/manage-users -### `Report` +## Validation -| Action | Description | -| --- | --- | -| `Report Read`
`Report Manage` | View and create/delete reports. | +The role builder enforces a few rules client-side: -### `ReportFolder` +- **Name** is required and must be unique. Reserved names (`Admin`, `Guest`, `Developer`, `None`, `All`) are rejected. +- **Base Role** is required — Save is disabled until one is picked, and an inline error appears if you try to submit without one. +- A deployment policy with **no actions selected** is silently dropped on save (treated as a no-op). +- A deployment policy with **Specific deployments** scope but no deployments selected is also dropped on save. -| Action | Description | -| --- | --- | -| `Report Read`
`Report Manage` | View and create/delete report folders. | +## Reference: action catalog -### `Agent` +This section lists every action a custom role can grant. The internal action names match the names shown in the [audit log][ref-audit-log]. -| Action | Description | -| --- | --- | -| `Agent Access`
`Agent Manage` | View and manage AI agents. | +[ref-audit-log]: /admin/monitoring/audit-log -### `AgentSpace` +### Base Role actions (Global) -| Action | Description | -| --- | --- | -| `Agent Space Manage` | Manage AI agent spaces. | +| Internal name | Label | Description | +| --------------- | --------- | ---------------------------------------------------------- | +| `AIBIView` | Viewer | Read-only access to dashboards and chats. | +| `AIBIExplore` | Explorer | Viewer + create/edit workbooks, run queries. | +| `AIBIDevelop` | Developer | Explorer + edit data model, manage deployments. | -### `Workbook` +### Global actions -| Action | Description | -| --- | --- | -| `Workbook Read`
`Workbook Manage`
`Workbook Edit` | View, manage, and edit workbooks. | +| Internal name | Label | +| ------------------------------ | --------------------------------- | +| `AuditLogManage` | Manage audit log | +| `BillingRead` | View billing | +| `ChartPalettesManage` | Manage chart palettes | +| `DashboardThemesManage` | Manage dashboard themes | +| `OAuthIntegrationsManage` | Manage OAuth integrations | +| `OAuthIntegrationsIssueTokens` | Issue OAuth tokens | +| `DeploymentsManage` | Manage deployments (account-wide) | +### Deployment-scoped actions -[ref-budgets]: /admin/account-billing/budgets -[ref-playground]: /docs/workspace/playground -[ref-data-model]: /docs/data-modeling/data-model-ide -[ref-visual-model]: /docs/data-modeling/visual-modeler -[ref-dev-mode]: /docs/data-modeling/dev-mode -[ref-query-history]: /admin/monitoring/query-history -[ref-perf-insights]: /admin/monitoring/performance -[ref-sql-runner]: /docs/data-modeling/sql-runner -[ref-semantic-catalog]: /docs/workspace/semantic-catalog -[ref-ai-agents]: /admin/ai -[ref-ai-spaces]: /admin/ai/multi-agent -[ref-workbooks]: /analytics/workbooks \ No newline at end of file +| Internal name | Label | +| ------------------------- | ----------------------------------------------------------- | +| `All` | Full access (every current and future deployment action) | +| `DeploymentRead` | Access deployment | +| `DeploymentUpdate` | Edit deployment | +| `DeploymentDelete` | Delete deployment | +| `SchemaRead` | View data model | +| `SchemaUpdate` | Edit data model | +| `SchemaUpdateDevBranches` | Edit data model on dev branches | +| `APMRead` | Access query history | diff --git a/packages/cubejs-schema-compiler/src/adapter/AthenaQuery.ts b/packages/cubejs-schema-compiler/src/adapter/AthenaQuery.ts index b74fd2918eb2e..c5ae85935be70 100644 --- a/packages/cubejs-schema-compiler/src/adapter/AthenaQuery.ts +++ b/packages/cubejs-schema-compiler/src/adapter/AthenaQuery.ts @@ -1,9 +1,4 @@ import { PrestodbQuery } from './PrestodbQuery'; export class AthenaQuery extends PrestodbQuery { - // Athena doesn't require odd prestodb manual datetime offset calculations - // as it uses mature timestamps models - public override convertTz(field) { - return this.timezone ? `CAST((${field} AT TIME ZONE '${this.timezone}') AS TIMESTAMP)` : field; - } } diff --git a/packages/cubejs-schema-compiler/test/unit/athena-query.test.ts b/packages/cubejs-schema-compiler/test/unit/athena-query.test.ts new file mode 100644 index 0000000000000..9df99bff22733 --- /dev/null +++ b/packages/cubejs-schema-compiler/test/unit/athena-query.test.ts @@ -0,0 +1,53 @@ +/* eslint-disable no-restricted-syntax */ +import { AthenaQuery } from '../../src/adapter/AthenaQuery'; +import { prepareJsCompiler } from './PrepareCompiler'; + +describe('AthenaQuery', () => { + const { compiler, joinGraph, cubeEvaluator } = prepareJsCompiler(` + cube('orders', { + sql: \` + SELECT * + FROM public.orders + \`, + dimensions: { + id: { + sql: \`id\`, + type: 'number', + primaryKey: true + }, + created_at: { + sql: \`created_at\`, + type: 'time' + } + }, + measures: { + count: { + type: 'count', + } + } + }); + `); + + it('convertTz uses manual offset calculation (inherits from PrestodbQuery)', async () => { + await compiler.compile(); + + const query = new AthenaQuery({ joinGraph, cubeEvaluator, compiler }, { + measures: ['orders.count'], + timeDimensions: [{ + dimension: 'orders.created_at', + granularity: 'month', + dateRange: ['2026-01-01', '2026-12-31'], + }], + timezone: 'Asia/Kolkata', + }); + + const queryAndParams = query.buildSqlAndParams(); + const sql = queryAndParams[0]; + + expect(sql).toContain('timezone_hour'); + expect(sql).toContain('timezone_minute'); + expect(sql).not.toMatch( + /CAST\(\(.*AT TIME ZONE.*\) AS TIMESTAMP\)/ + ); + }); +}); diff --git a/packages/cubejs-testing-drivers/src/tests/testQueries.ts b/packages/cubejs-testing-drivers/src/tests/testQueries.ts index 8a97514618b96..0517b99388b04 100644 --- a/packages/cubejs-testing-drivers/src/tests/testQueries.ts +++ b/packages/cubejs-testing-drivers/src/tests/testQueries.ts @@ -1158,6 +1158,24 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten expect(response.rawData()).toMatchSnapshot(); }); + execute('querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata)', async () => { + const response = await client.load({ + measures: [ + 'ECommerce.count', + ], + timeDimensions: [{ + dimension: 'ECommerce.customOrderDateNoPreAgg', + granularity: 'month', + dateRange: ['2020-01-01', '2020-12-31'], + }], + order: { + 'ECommerce.customOrderDateNoPreAgg': 'asc' + }, + timezone: 'Asia/Kolkata', + }); + expect(response.rawData()).toMatchSnapshot(); + }); + execute('filtering ECommerce: contains dimensions, first', async () => { const response = await client.load({ dimensions: [ diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/athena-export-bucket-s3-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/athena-export-bucket-s3-full.test.ts.snap index 08a447e06ce97..482bac91639fb 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/athena-export-bucket-s3-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/athena-export-bucket-s3-full.test.ts.snap @@ -14383,3 +14383,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/athena-driver querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/bigquery-export-bucket-gcs-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/bigquery-export-bucket-gcs-full.test.ts.snap index adc16d91db99e..688a5164a7992 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/bigquery-export-bucket-gcs-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/bigquery-export-bucket-gcs-full.test.ts.snap @@ -18182,3 +18182,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/bigquery-driver querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-export-bucket-s3-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-export-bucket-s3-full.test.ts.snap index 1054800429609..fe462d4a3493a 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-export-bucket-s3-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-export-bucket-s3-full.test.ts.snap @@ -9209,3 +9209,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/clickhouse-driver export-bucket-s3 querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-export-bucket-s3-prefix-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-export-bucket-s3-prefix-full.test.ts.snap index c335df41d8883..5bcf898a905b4 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-export-bucket-s3-prefix-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-export-bucket-s3-prefix-full.test.ts.snap @@ -9209,3 +9209,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/clickhouse-driver export-bucket-s3-prefix querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-full.test.ts.snap index 443ff67bb3247..d6614d4664f43 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/clickhouse-full.test.ts.snap @@ -10019,3 +10019,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/clickhouse-driver querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-azure-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-azure-full.test.ts.snap index d266e280823df..3137268982aab 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-azure-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-azure-full.test.ts.snap @@ -19931,3 +19931,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/databricks-jdbc-driver export-bucket-azure querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-azure-prefix-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-azure-prefix-full.test.ts.snap index 3a8381c2a497e..4e9047b79504d 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-azure-prefix-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-azure-prefix-full.test.ts.snap @@ -19736,3 +19736,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/databricks-jdbc-driver export-bucket-azure-prefix querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-gcs-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-gcs-full.test.ts.snap index 075dc71ba6b6f..b5e5fb608bc52 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-gcs-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-gcs-full.test.ts.snap @@ -19931,3 +19931,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/databricks-jdbc-driver export-bucket-gcs querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-gcs-prefix-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-gcs-prefix-full.test.ts.snap index 5ad02aeb7de1e..95814680be94d 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-gcs-prefix-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-gcs-prefix-full.test.ts.snap @@ -19736,3 +19736,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/databricks-jdbc-driver export-bucket-gcs-prefix querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-s3-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-s3-full.test.ts.snap index 8efb6b3039ff5..cb77699b4d032 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-s3-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-s3-full.test.ts.snap @@ -19931,3 +19931,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/databricks-jdbc-driver export-bucket-s3 querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-s3-prefix-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-s3-prefix-full.test.ts.snap index 4d4810b30dd00..b5418aa9a3144 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-s3-prefix-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-export-bucket-s3-prefix-full.test.ts.snap @@ -19736,3 +19736,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/databricks-jdbc-driver export-bucket-s3-prefix querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-full.test.ts.snap index 56950a4a1feb9..76aa9e896adb2 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/databricks-jdbc-full.test.ts.snap @@ -20736,3 +20736,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/databricks-jdbc-driver querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; 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 5efb39414137c..2ff4d587ef7f7 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 @@ -8795,3 +8795,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/mssql-driver querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/mysql-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/mysql-full.test.ts.snap index c8f5ecb5a8dd7..91e69863510c0 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/mysql-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/mysql-full.test.ts.snap @@ -16912,3 +16912,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/mysql-driver querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": 2, + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": 1, + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": 2, + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": 1, + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": 5, + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": 7, + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": 6, + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": 4, + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": 9, + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": 7, + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/postgres-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/postgres-full.test.ts.snap index 9c5c0167bda03..89c4dd667134e 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/postgres-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/postgres-full.test.ts.snap @@ -23286,3 +23286,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/postgres-driver querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/postgres-pre-agg-credentials-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/postgres-pre-agg-credentials-full.test.ts.snap index d44bd39508b7f..1a871d0e37c6e 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/postgres-pre-agg-credentials-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/postgres-pre-agg-credentials-full.test.ts.snap @@ -22090,3 +22090,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/postgres-driver pre-agg-credentials querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/redshift-export-bucket-s3-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/redshift-export-bucket-s3-full.test.ts.snap index 437da9c77b1a5..491df2dc79d7a 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/redshift-export-bucket-s3-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/redshift-export-bucket-s3-full.test.ts.snap @@ -21849,3 +21849,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/redshift-driver export-bucket-s3 querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/redshift-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/redshift-full.test.ts.snap index b07f3133c1a61..65cb1546c69c6 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/redshift-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/redshift-full.test.ts.snap @@ -22368,3 +22368,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/redshift-driver querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-encrypted-pk-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-encrypted-pk-full.test.ts.snap index 4c99e9de33a4c..3cade295c5098 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-encrypted-pk-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-encrypted-pk-full.test.ts.snap @@ -22229,3 +22229,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver encrypted-pk querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-full.test.ts.snap index 9d726fce917c8..44509e6aa1fba 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-full.test.ts.snap @@ -22199,3 +22199,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver export-bucket-azure querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-prefix-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-prefix-full.test.ts.snap index 6dbb2b35e4d81..c7d881268baf5 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-prefix-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-prefix-full.test.ts.snap @@ -22004,3 +22004,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver export-bucket-azure-prefix querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-via-storage-integration-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-via-storage-integration-full.test.ts.snap index 14d78b10ff4fd..d96c60fde3771 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-via-storage-integration-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-azure-via-storage-integration-full.test.ts.snap @@ -22199,3 +22199,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver export-bucket-azure-via-storage-integration querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-gcs-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-gcs-full.test.ts.snap index 5aba264f7a313..b4831c9b41b64 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-gcs-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-gcs-full.test.ts.snap @@ -22199,3 +22199,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver export-bucket-gcs querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-gcs-prefix-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-gcs-prefix-full.test.ts.snap index b50ebba73d172..68546d57b6481 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-gcs-prefix-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-gcs-prefix-full.test.ts.snap @@ -22004,3 +22004,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver export-bucket-gcs-prefix querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-full.test.ts.snap index b2586e4fddc1a..60ca23d9b390b 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-full.test.ts.snap @@ -22199,3 +22199,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver export-bucket-s3 querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-prefix-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-prefix-full.test.ts.snap index 70af953e55475..369037daea1c1 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-prefix-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-prefix-full.test.ts.snap @@ -22004,3 +22004,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver export-bucket-s3-prefix querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-via-storage-integration-iam-roles-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-via-storage-integration-iam-roles-full.test.ts.snap index 4685bf6504c92..460dd35d06ae8 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-via-storage-integration-iam-roles-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-export-bucket-s3-via-storage-integration-iam-roles-full.test.ts.snap @@ -22004,3 +22004,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver export-bucket-s3-via-storage-integration-iam-roles querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`; diff --git a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-full.test.ts.snap b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-full.test.ts.snap index c5ac482037b2c..b7f6fcdd561aa 100644 --- a/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-full.test.ts.snap +++ b/packages/cubejs-testing-drivers/test/__snapshots__/snowflake-full.test.ts.snap @@ -23079,3 +23079,58 @@ Array [ }, ] `; + +exports[`Queries with the @cubejs-backend/snowflake-driver querying ECommerce: count by month + order with non-UTC timezone (Asia/Kolkata) 1`] = ` +Array [ + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-01-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-01-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-02-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-02-01T00:00:00.000", + }, + Object { + "ECommerce.count": "2", + "ECommerce.customOrderDateNoPreAgg": "2020-03-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-03-01T00:00:00.000", + }, + Object { + "ECommerce.count": "1", + "ECommerce.customOrderDateNoPreAgg": "2020-04-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-04-01T00:00:00.000", + }, + Object { + "ECommerce.count": "5", + "ECommerce.customOrderDateNoPreAgg": "2020-05-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-05-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-06-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-06-01T00:00:00.000", + }, + Object { + "ECommerce.count": "6", + "ECommerce.customOrderDateNoPreAgg": "2020-09-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-09-01T00:00:00.000", + }, + Object { + "ECommerce.count": "4", + "ECommerce.customOrderDateNoPreAgg": "2020-10-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-10-01T00:00:00.000", + }, + Object { + "ECommerce.count": "9", + "ECommerce.customOrderDateNoPreAgg": "2020-11-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-11-01T00:00:00.000", + }, + Object { + "ECommerce.count": "7", + "ECommerce.customOrderDateNoPreAgg": "2020-12-01T00:00:00.000", + "ECommerce.customOrderDateNoPreAgg.month": "2020-12-01T00:00:00.000", + }, +] +`;