Refresh worker responsibilities, key environment variables for scheduled builds, and troubleshooting when refresh intervals fall behind.
Pre-aggregation refresh is the process of building pre-aggregations and updating
them with new data. Pre-aggregation refresh is the responsibility of the refresh
worker.
Configuration
You can use the following environment variables to configure the refresh worker
behavior:
By default, each data source builds and stores its pre-aggregations using its own
connection. You can instead point a data source’s pre-aggregations at a dedicated
connection by adding a PRE_AGGREGATIONS segment to its environment variables. When
set, that source’s pre-aggregations are built on and read from the dedicated
connection rather than the source’s own.Use the CUBEJS_PRE_AGGREGATIONS_DB_* variables for the default data source, and the
CUBEJS_DS_<NAME>_PRE_AGGREGATIONS_DB_* variables for a named data
source:
# Default data sourceCUBEJS_DB_TYPE=postgresCUBEJS_DB_HOST=localhost# Dedicated pre-aggregation data source for the default data sourceCUBEJS_PRE_AGGREGATIONS_DB_HOST=preagg-hostCUBEJS_PRE_AGGREGATIONS_DB_USER=preagg-userCUBEJS_PRE_AGGREGATIONS_DB_PASS=preagg-pass# A named data source and its dedicated pre-aggregation data sourceCUBEJS_DATASOURCES=default,analyticsCUBEJS_DS_ANALYTICS_DB_TYPE=postgresCUBEJS_DS_ANALYTICS_DB_HOST=remotehostCUBEJS_DS_ANALYTICS_PRE_AGGREGATIONS_DB_HOST=analytics-preagg-hostCUBEJS_DS_ANALYTICS_PRE_AGGREGATIONS_DB_USER=analytics-preagg-userCUBEJS_DS_ANALYTICS_PRE_AGGREGATIONS_DB_PASS=analytics-preagg-pass
The PRE_AGGREGATIONS variant supports the same connection variables as the regular
CUBEJS_DB_* / CUBEJS_DS_<NAME>_DB_* data source variables (for example _DB_HOST,
_DB_PORT, _DB_USER, _DB_PASS, and _DB_SSL).Driver-specific variables take the same segment, so the dedicated connection is not
limited to the _DB_* family — for example CUBEJS_PRE_AGGREGATIONS_JDBC_URL or
CUBEJS_PRE_AGGREGATIONS_AWS_REGION. In the decorated form for a named data source, the
DB_, JDBC_, AWS_, DATABASE, and FIREBOLT_ families are supported.Setting any one of these variables switches the data source’s pre-aggregations onto the
dedicated connection; there is no separate flag to enable it. Activation is prefix-based
rather than name-based, so a misspelled variable such as
CUBEJS_PRE_AGGREGATIONS_DB_HSOT still switches it on — combined with the rule below,
that leaves every setting at its driver default.
Each variable is read independently, and an unset one does not fall back to its
CUBEJS_DB_* counterpart — it falls back to the driver’s own default. Configure the
dedicated connection in full: if you set only CUBEJS_PRE_AGGREGATIONS_DB_HOST, the build
connects to that host with the driver’s default user and password rather than the ones
from CUBEJS_DB_USER and CUBEJS_DB_PASS.The one exception is the driver type: CUBEJS_PRE_AGGREGATIONS_DB_TYPE is ignored, since
the dedicated connection always uses the same driver as the data source it belongs to.
A custom driver_factory takes precedence over these
variables: if both are configured, the driver_factory connection is used for
pre-aggregations as well and a Pre-aggregation driver conflict warning is logged.
Troubleshooting
Refresh scheduler interval error
Sometimes, you might come across the following error:
{ "message": "Refresh Scheduler Interval Error", "error": "Previous interval #2 was not finished with 60000 interval"}
It indicates that your refresh worker is overloaded. You probably have a lot of
tenants, a lot of pre-aggregations to refresh,
or both.If you’re using multitenancy, you’d need to deploy several Cube
clusters (each one per a reduced set of tenants) so there will be multiple refresh
workers which will work only on a subset of your tenants.If you’re using Cube Cloud, you can use a Multi-cluster deployment
that would automatically do this for you.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Cube Documentation","colors":{"primary":"#5339CF","light":"#A5A3FF","dark":"#716EEE"},"logo":{"light":"https://mintcdn.com/cubed3/wCTntgEXVYYYnx4l/logo/light.svg?fit=max\u0026auto=format\u0026n=wCTntgEXVYYYnx4l\u0026q=85\u0026s=8bbf45ba64eac6116629064fac55aad7","dark":"https://mintcdn.com/cubed3/wCTntgEXVYYYnx4l/logo/dark.svg?fit=max\u0026auto=format\u0026n=wCTntgEXVYYYnx4l\u0026q=85\u0026s=d8fa230950c8c63b3c2f88d2768694d0"},"favicon":"https://mintcdn.com/cubed3/wCTntgEXVYYYnx4l/favicon.svg?fit=max\u0026auto=format\u0026n=wCTntgEXVYYYnx4l\u0026q=85\u0026s=3b0cb7aa770d2abd546ef19463fbba8c","navbar":{"links":[{"href":"https://cube.dev/demos","label":"Demos"},{"href":"https://cube.dev/changelog","label":"Changelog"},{"href":"https://slack.cube.dev","label":"Community"}],"primary":{"type":"button","label":"Get Started","href":"https://cubecloud.dev/auth/signup"}},"footer":{"socials":{"x":"https://x.com/the_cube_dev","github":"https://github.com/cube-js/cube","linkedin":"https://www.linkedin.com/company/cube-dev"},"links":[{"header":"Legal","items":[{"label":"Privacy Policy","href":"https://cube.dev/legal/privacy-policy"},{"label":"Cookie Preferences","href":"#cookie-preferences"}]}]},"seo":{"metatags":{"og:type":"website","og:site_name":"Cube Documentation"},"indexing":"navigable"},"icons":{"library":"tabler"},"styling":{"codeblocks":"dark","latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cubed3","hasAudioNarration":false,"actualSubdomain":"cubed3","customDomains":["docs.cube.dev"],"gitSource":{"type":"github","owner":"cube-js","repo":"cube","deployBranch":"master","contentDirectory":"docs-mintlify","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b00a7b953e410d2fbe5eca0","clientVersion":"0.0.4248","searchFilterCounts":[{"language":"default","tag":"API","count":238},{"language":"default","tag":"Platform Endpoints","count":231},{"language":"default","tag":"Documentation","count":101},{"language":"default","tag":"Admin","count":95},{"language":"default","tag":"Data Modeling","count":65},{"language":"default","tag":"Recipes","count":47},{"language":"default","tag":"Topics","count":47},{"language":"default","tag":"Reference","count":44},{"language":"default","tag":"Connect to data","count":31},{"language":"default","tag":"Explore \u0026 Analyze","count":30}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#content-area table,.mdx-content table{width:100%!important}.cube-consent{position:fixed;right:16px;bottom:16px;z-index:2147483000;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;width:min(440px, calc(100vw - 32px));padding:16px;background:#fff;color:#111827;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 8px 24px rgb(0 0 0 / 12%);font-size:14px;line-height:1.5}html.dark .cube-consent{background:#111318;color:#f3f4f6;border-color:#2b2f38}.cube-consent__title{margin:0;padding-right:24px;font-size:16px;font-weight:600}.cube-consent__text,.cube-consent__status{margin:0;color:#4b5563}html.dark .cube-consent__text,html.dark .cube-consent__status{color:#b6bcc8}.cube-consent__link{color:inherit;text-decoration:underline}.cube-consent__actions{display:flex;gap:8px}.cube-consent__button{flex:1;padding:8px 16px;border:1px solid #111827;border-radius:6px;background:#111827;color:#fff;font:inherit;font-weight:500;cursor:pointer}html.dark .cube-consent__button{border-color:#f3f4f6;background:#f3f4f6;color:#111318}.cube-consent__button:hover{opacity:0.88}.cube-consent__button:focus-visible,.cube-consent__close:focus-visible,.cube-consent__link:focus-visible{outline:2px solid #111827;outline-offset:2px}html.dark .cube-consent :focus-visible{outline-color:#f3f4f6}.cube-consent__close{position:absolute;top:8px;right:8px;width:24px;height:24px;padding:0;border:0;background:transparent;color:inherit;font-size:20px;line-height:1;cursor:pointer}"}]}
{"page":{"pagePath":"docs/pre-aggregations/refreshing-pre-aggregations","slug":"/docs/pre-aggregations/refreshing-pre-aggregations","pageMetadata":{"title":"Refreshing pre-aggregations","description":"Refresh worker responsibilities, key environment variables for scheduled builds, and troubleshooting when refresh intervals fall behind.","href":"/docs/pre-aggregations/refreshing-pre-aggregations"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Refresh worker responsibilities, key environment variables for scheduled builds, and troubleshooting when refresh intervals fall behind.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Info,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[_jsx(_components.em,{children:`Pre-aggregation refresh`}),` is the process of building pre-aggregations and updating\nthem with new data. Pre-aggregation refresh is the responsibility of the `,_jsx(_components.em,{children:`refresh\nworker`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`configuration`,children:`Configuration`}),`\n`,_jsx(_components.p,{children:`You can use the following environment variables to configure the refresh worker\nbehavior:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_refresh_worker`,children:_jsx(_components.code,{children:`CUBEJS_REFRESH_WORKER`})}),` (see also `,_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_pre_aggregations_builder`,children:_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_BUILDER`})}),`)`]}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_pre_aggregations_schema`,children:_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_SCHEMA`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_scheduled_refresh_timezones`,children:_jsx(_components.code,{children:`CUBEJS_SCHEDULED_REFRESH_TIMEZONES`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_db_query_timeout`,children:_jsx(_components.code,{children:`CUBEJS_DB_QUERY_TIMEOUT`})})}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_refresh_worker_concurrency`,children:_jsx(_components.code,{children:`CUBEJS_REFRESH_WORKER_CONCURRENCY`})}),` (see also `,_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_concurrency`,children:_jsx(_components.code,{children:`CUBEJS_CONCURRENCY`})}),`)`]}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_scheduled_refresh_queries_per_app_id`,children:_jsx(_components.code,{children:`CUBEJS_SCHEDULED_REFRESH_QUERIES_PER_APP_ID`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_drop_pre_agg_without_touch`,children:_jsx(_components.code,{children:`CUBEJS_DROP_PRE_AGG_WITHOUT_TOUCH`})})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_pre_aggregations_backoff_max_time`,children:_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_BACKOFF_MAX_TIME`})})}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`pre-aggregation-data-source`,children:`Pre-aggregation data source`}),`\n`,_jsxs(_components.p,{children:[`By default, each data source builds and stores its pre-aggregations using its own\nconnection. You can instead point a data source’s pre-aggregations at a dedicated\nconnection by adding a `,_jsx(_components.code,{children:`PRE_AGGREGATIONS`}),` segment to its environment variables. When\nset, that source’s pre-aggregations are built on and read from the dedicated\nconnection rather than the source’s own.`]}),`\n`,_jsxs(_components.p,{children:[`Use the `,_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_DB_*`}),` variables for the default data source, and the\n`,_jsx(_components.code,{children:`CUBEJS_DS_\u003cNAME>_PRE_AGGREGATIONS_DB_*`}),` variables for a `,_jsx(_components.a,{href:`/admin/connect-to-data/multiple-data-sources`,children:`named data\nsource`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`dotenv`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`dotenv`,children:_jsxs(_components.code,{language:`dotenv`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Default data source`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_DB_TYPE`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=postgres`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_DB_HOST`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=localhost`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# Dedicated pre-aggregation data source for the default data source`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_PRE_AGGREGATIONS_DB_HOST`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=preagg-host`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_PRE_AGGREGATIONS_DB_USER`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=preagg-user`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_PRE_AGGREGATIONS_DB_PASS`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=preagg-pass`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6A9955`,\"--shiki-dark\":`#6A9955`},children:`# A named data source and its dedicated pre-aggregation data source`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_DATASOURCES`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=default,analytics`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_DS_ANALYTICS_DB_TYPE`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=postgres`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_DS_ANALYTICS_DB_HOST`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=remotehost`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_DS_ANALYTICS_PRE_AGGREGATIONS_DB_HOST`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=analytics-preagg-host`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_DS_ANALYTICS_PRE_AGGREGATIONS_DB_USER`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=analytics-preagg-user`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`CUBEJS_DS_ANALYTICS_PRE_AGGREGATIONS_DB_PASS`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=analytics-preagg-pass`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`PRE_AGGREGATIONS`}),` variant supports the same connection variables as the regular\n`,_jsx(_components.code,{children:`CUBEJS_DB_*`}),` / `,_jsx(_components.code,{children:`CUBEJS_DS_\u003cNAME>_DB_*`}),` data source variables (for example `,_jsx(_components.code,{children:`_DB_HOST`}),`,\n`,_jsx(_components.code,{children:`_DB_PORT`}),`, `,_jsx(_components.code,{children:`_DB_USER`}),`, `,_jsx(_components.code,{children:`_DB_PASS`}),`, and `,_jsx(_components.code,{children:`_DB_SSL`}),`).`]}),`\n`,_jsxs(_components.p,{children:[`Driver-specific variables take the same segment, so the dedicated connection is not\nlimited to the `,_jsx(_components.code,{children:`_DB_*`}),` family — for example `,_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_JDBC_URL`}),` or\n`,_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_AWS_REGION`}),`. In the decorated form for a named data source, the\n`,_jsx(_components.code,{children:`DB_`}),`, `,_jsx(_components.code,{children:`JDBC_`}),`, `,_jsx(_components.code,{children:`AWS_`}),`, `,_jsx(_components.code,{children:`DATABASE`}),`, and `,_jsx(_components.code,{children:`FIREBOLT_`}),` families are supported.`]}),`\n`,_jsxs(_components.p,{children:[`Setting any one of these variables switches the data source’s pre-aggregations onto the\ndedicated connection; there is no separate flag to enable it. Activation is prefix-based\nrather than name-based, so a misspelled variable such as\n`,_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_DB_HSOT`}),` still switches it on — combined with the rule below,\nthat leaves every setting at its driver default.`]}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`Each variable is read independently, and an unset one does `,_jsx(_components.strong,{children:`not`}),` fall back to its\n`,_jsx(_components.code,{children:`CUBEJS_DB_*`}),` counterpart — it falls back to the driver’s own default. Configure the\ndedicated connection in full: if you set only `,_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_DB_HOST`}),`, the build\nconnects to that host with the driver’s default user and password rather than the ones\nfrom `,_jsx(_components.code,{children:`CUBEJS_DB_USER`}),` and `,_jsx(_components.code,{children:`CUBEJS_DB_PASS`}),`.`]}),_jsxs(_components.p,{children:[`The one exception is the driver type: `,_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_DB_TYPE`}),` is ignored, since\nthe dedicated connection always uses the same driver as the data source it belongs to.`]})]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_pre_aggregations_schema`,children:_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_SCHEMA`})}),`,\n`,_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_pre_aggregations_builder`,children:_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_BUILDER`})}),`,\n`,_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_pre_aggregations_backoff_max_time`,children:_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_BACKOFF_MAX_TIME`})}),`,\nand `,_jsx(_components.a,{href:`/reference/configuration/environment-variables#cubejs_pre_aggregations_allow_non_strict_date_range_match`,children:_jsx(_components.code,{children:`CUBEJS_PRE_AGGREGATIONS_ALLOW_NON_STRICT_DATE_RANGE_MATCH`})}),`\nshare the prefix but configure pre-aggregation behavior rather than a connection, so they\ndo not switch the data source’s pre-aggregations onto a dedicated connection.`]})}),`\n`,_jsxs(_components.p,{children:[`A custom `,_jsx(_components.a,{href:`/reference/configuration/config#driver_factory`,children:_jsx(_components.code,{children:`driver_factory`})}),` takes precedence over these\nvariables: if both are configured, the `,_jsx(_components.code,{children:`driver_factory`}),` connection is used for\npre-aggregations as well and a `,_jsx(_components.code,{children:`Pre-aggregation driver conflict`}),` warning is logged.`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsx(Heading,{level:`3`,id:`refresh-scheduler-interval-error`,children:_jsx(_components.code,{children:`Refresh scheduler interval error`})}),`\n`,_jsx(_components.p,{children:`Sometimes, you might come across the following error:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Refresh Scheduler Interval Error\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:`\"Previous interval #2 was not finished with 60000 interval\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`It indicates that your refresh worker is overloaded. You probably have a lot of\n`,_jsx(_components.a,{href:`/embedding/multitenancy`,children:`tenants`}),`, a lot of `,_jsx(_components.a,{href:`/docs/pre-aggregations/using-pre-aggregations`,children:`pre-aggregations`}),` to refresh,\nor both.`]}),`\n`,_jsxs(_components.p,{children:[`If you’re using `,_jsx(_components.a,{href:`/embedding/multitenancy`,children:`multitenancy`}),`, you’d need to deploy several Cube\nclusters (each one per a reduced set of tenants) so there will be multiple refresh\nworkers which will work only on a subset of your tenants.`]}),`\n`,_jsxs(_components.p,{children:[`If you’re using Cube Cloud, you can use a `,_jsx(_components.a,{href:`/admin/deployment/deployment-types#multi-cluster`,children:`Multi-cluster deployment`}),`\nthat would automatically do this for you.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Refreshing pre-aggregations","description":"Refresh worker responsibilities, key environment variables for scheduled builds, and troubleshooting when refresh intervals fall behind.","href":"/docs/pre-aggregations/refreshing-pre-aggregations"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Configuration","slug":"configuration","depth":2,"children":[]},{"title":"Pre-aggregation data source","slug":"pre-aggregation-data-source","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[{"title":"Refresh scheduler interval error","slug":"refresh-scheduler-interval-error","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cubed3/73c42f6b43b9b3b0/scripts/extract-chat.js","/_mintlify/custom/cubed3/08d502537a7bd0d7/scripts/extract-core-data.js","/_mintlify/custom/cubed3/476a9fa93e98d93b/consent.js"],"subdomain":"cubed3","siteName":"Cube Documentation","title":"Refreshing pre-aggregations - Cube Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-01T01:20:09.607Z","originalFileLocation":"docs/pre-aggregations/refreshing-pre-aggregations.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Refresh worker responsibilities, key environment variables for scheduled builds, and troubleshooting when refresh intervals fall behind.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cube Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Refreshing pre-aggregations - Cube Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Refresh worker responsibilities, key environment variables for scheduled builds, and troubleshooting when refresh intervals fall behind.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cube Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cubed3.mintlify.site/_mintlify/api/og/v2?division=Pre-aggregations\u0026amp;title=Refreshing+pre-aggregations\u0026amp;description=Refresh+worker+responsibilities%2C+key+environment+variables+for+scheduled+builds%2C+and+troubleshooting+when+refresh+intervals+fall+behind.\u0026amp;theme=6d1e003873cec4de62649d7c\u0026amp;signature=0e387e0bd818e821348ae68586b4d45084697138653064edb40c6b71a5a865d9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Refreshing pre-aggregations - Cube Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Refresh worker responsibilities, key environment variables for scheduled builds, and troubleshooting when refresh intervals fall behind.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cubed3.mintlify.site/_mintlify/api/og/v2?division=Pre-aggregations\u0026amp;title=Refreshing+pre-aggregations\u0026amp;description=Refresh+worker+responsibilities%2C+key+environment+variables+for+scheduled+builds%2C+and+troubleshooting+when+refresh+intervals+fall+behind.\u0026amp;theme=6d1e003873cec4de62649d7c\u0026amp;signature=0e387e0bd818e821348ae68586b4d45084697138653064edb40c6b71a5a865d9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/cubed3/JtLYPWhDFrYGSK8W/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cube Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#5339CF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/pre-aggregations/refreshing-pre-aggregations.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.cube.dev/#organization\",\"name\":\"Cube Documentation\",\"url\":\"https://docs.cube.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cubed3/wCTntgEXVYYYnx4l/logo/light.svg?fit=max\u0026auto=format\u0026n=wCTntgEXVYYYnx4l\u0026q=85\u0026s=8bbf45ba64eac6116629064fac55aad7\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.cube.dev#website\",\"name\":\"Cube Documentation\",\"url\":\"https://docs.cube.dev\",\"publisher\":{\"@id\":\"https://docs.cube.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations#webpage\",\"url\":\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations\",\"name\":\"Refreshing pre-aggregations\",\"description\":\"Refresh worker responsibilities, key environment variables for scheduled builds, and troubleshooting when refresh intervals fall behind.\",\"dateModified\":\"2026-08-01T01:20:09.607Z\",\"isPartOf\":{\"@id\":\"https://docs.cube.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Pre-aggregations\",\"item\":\"https://docs.cube.dev/docs/pre-aggregations\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Refreshing pre-aggregations\",\"item\":\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations#article\",\"headline\":\"Refreshing pre-aggregations\",\"name\":\"Refreshing pre-aggregations\",\"description\":\"Refresh worker responsibilities, key environment variables for scheduled builds, and troubleshooting when refresh intervals fall behind.\",\"url\":\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations\",\"mainEntityOfPage\":{\"@id\":\"https://docs.cube.dev/docs/pre-aggregations/refreshing-pre-aggregations#webpage\"},\"dateModified\":\"2026-08-01T01:20:09.607Z\",\"publisher\":{\"@id\":\"https://docs.cube.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.cube.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Cube Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Cube Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/pre-aggregations/refreshing-pre-aggregations.md","siteName":"Cube Documentation","nav":{"global":null,"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/docs/introduction"},{"title":"Preferences","href":"/docs/preferences"},{"title":"Inbox","href":"/docs/inbox"},{"group":"Getting Started","pages":[{"title":"Connect your data","href":"/docs/getting-started/connect-your-data"},{"title":"Use analytics chat","href":"/docs/getting-started/use-analytics-chat"},{"title":"Create workbooks and dashboards","href":"/docs/getting-started/create-workbooks-and-dashboards"},{"title":"Develop in IDE","href":"/docs/getting-started/develop-in-ide"},{"title":"Embed analytics","href":"/docs/getting-started/embed-analytics"}]},{"group":"Migrate from Cube Core","pages":[{"title":"Import a local project to Cube Cloud with CLI","href":"/docs/getting-started/migrate-from-core/upload-with-cli"},{"title":"Import a GitHub repository","href":"/docs/getting-started/migrate-from-core/import-github-repository"},{"title":"Import a GitLab repository","href":"/docs/getting-started/migrate-from-core/import-gitlab-repository-via-ssh"},{"title":"Import a Git repository","href":"/docs/getting-started/migrate-from-core/import-git-repository-via-ssh"},{"title":"Import a Bitbucket repository","href":"/docs/getting-started/migrate-from-core/import-bitbucket-repository-via-ssh"}]}]},{"group":"Explore \u0026 Analyze","pages":[{"group":"Workbooks","root":{"title":"Workbooks","href":"/docs/explore-analyze/workbooks/index"},"pages":[{"title":"Querying data","href":"/docs/explore-analyze/workbooks/querying-data"},{"title":"Calculated fields","href":"/docs/explore-analyze/workbooks/calculated-fields"},{"title":"Source SQL Tabs","href":"/docs/explore-analyze/workbooks/source-sql-tabs"},{"title":"Python analysis","href":"/docs/explore-analyze/workbooks/python-analysis"},{"title":"Workbook Agent","href":"/docs/explore-analyze/workbooks/workbook-agent"}]},{"title":"Explore","href":"/docs/explore-analyze/explore"},{"group":"Charts","root":{"title":"Charts","href":"/docs/explore-analyze/charts/index"},"pages":[{"group":"Chart types","root":{"title":"Chart types","href":"/docs/explore-analyze/charts/chart-types/index"},"pages":[{"title":"Bar","href":"/docs/explore-analyze/charts/chart-types/bar"},{"title":"Line","href":"/docs/explore-analyze/charts/chart-types/line"},{"title":"Area","href":"/docs/explore-analyze/charts/chart-types/area"},{"title":"Scatter","href":"/docs/explore-analyze/charts/chart-types/scatter"},{"title":"Pie \u0026 donut","href":"/docs/explore-analyze/charts/chart-types/pie"},{"title":"Funnel","href":"/docs/explore-analyze/charts/chart-types/funnel"},{"title":"Sankey","href":"/docs/explore-analyze/charts/chart-types/sankey"},{"title":"Heatmap","href":"/docs/explore-analyze/charts/chart-types/heatmap"},{"title":"Boxplot","href":"/docs/explore-analyze/charts/chart-types/boxplot"},{"title":"Table","href":"/docs/explore-analyze/charts/chart-types/table"},{"title":"KPI","href":"/docs/explore-analyze/charts/chart-types/kpi"},{"title":"Map","href":"/docs/explore-analyze/charts/chart-types/map"},{"title":"HTML","href":"/docs/explore-analyze/charts/chart-types/html"}]},{"title":"Custom visualizations","href":"/docs/explore-analyze/charts/custom"},{"group":"Configure charts","root":{"title":"Configure charts","href":"/docs/explore-analyze/charts/configuration/index"},"pages":[{"title":"Series mapping","href":"/docs/explore-analyze/charts/configuration/series-mapping"},{"title":"Series configuration","href":"/docs/explore-analyze/charts/configuration/series-configuration"},{"title":"Color \u0026 stacking","href":"/docs/explore-analyze/charts/configuration/color-and-stacking"},{"title":"Small multiples","href":"/docs/explore-analyze/charts/configuration/small-multiples"},{"title":"Axes","href":"/docs/explore-analyze/charts/configuration/axes"},{"title":"Tooltips","href":"/docs/explore-analyze/charts/configuration/tooltips"},{"title":"Data labels","href":"/docs/explore-analyze/charts/configuration/data-labels"}]}]},{"title":"Analytics Chat","href":"/docs/explore-analyze/analytics-chat"},{"title":"Scheduled Tasks","href":"/docs/explore-analyze/scheduled-tasks"},{"title":"Agent skills","href":"/docs/explore-analyze/skills"}]},{"group":"Present \u0026 Share","pages":[{"group":"Dashboards","root":{"title":"Dashboards","href":"/docs/explore-analyze/dashboards/index"},"pages":[{"group":"Widgets","root":{"title":"Widgets","href":"/docs/explore-analyze/dashboards/widgets/index"},"pages":[{"title":"Charts","href":"/docs/explore-analyze/dashboards/widgets/charts"},{"title":"Text","href":"/docs/explore-analyze/dashboards/widgets/text"},{"title":"Controls","href":"/docs/explore-analyze/dashboards/widgets/controls"},{"title":"Analysis","href":"/docs/explore-analyze/dashboards/widgets/analysis"},{"title":"Spacer, Divider, Stack, Grid \u0026 Tabs","href":"/docs/explore-analyze/dashboards/widgets/layout"}]},{"title":"Cross-filtering","href":"/docs/explore-analyze/dashboards/cross-filtering"},{"title":"Styling","href":"/docs/explore-analyze/dashboards/styling"},{"title":"Dashboards as code","href":"/docs/explore-analyze/dashboards/dashboards-as-code"},{"title":"Dashboard Agent","href":"/docs/explore-analyze/dashboards/dashboard-agent"},{"title":"Comments","href":"/docs/explore-analyze/dashboards/comments"},{"title":"Reviews","href":"/docs/explore-analyze/dashboards/reviews"}]},{"title":"Apps","href":"/docs/explore-analyze/apps"},{"title":"Refreshes, deliveries and alerts","href":"/docs/explore-analyze/dashboard-deliveries"},{"title":"Alerts","href":"/docs/explore-analyze/alerts"},{"title":"Report deliveries","href":"/docs/explore-analyze/report-deliveries"}]},{"group":"Organize content","pages":[{"title":"Folders","href":"/docs/organize-content/folders"},{"title":"Share content","href":"/docs/organize-content/sharing"}]},{"group":"Data Modeling","pages":[{"title":"Getting started","href":"/docs/data-modeling/overview"},{"group":"Views","root":{"title":"Views","href":"/docs/data-modeling/views"},"pages":[{"title":"Multi-fact views","href":"/docs/data-modeling/multi-fact-views"},{"title":"View groups","href":"/docs/data-modeling/view-groups"}]},{"group":"Cubes","root":{"title":"Cubes","href":"/docs/data-modeling/cubes"},"pages":[{"title":"Extending cubes and views","href":"/docs/data-modeling/extending-cubes"}]},{"title":"Joins","href":"/docs/data-modeling/joins"},{"title":"Measures","href":"/docs/data-modeling/measures"},{"title":"Dimensions","href":"/docs/data-modeling/dimensions"},{"title":"Calendar cubes","href":"/docs/data-modeling/concepts/calendar-cubes"},{"title":"AI context","href":"/docs/data-modeling/ai-context"},{"title":"Syntax","href":"/docs/data-modeling/concepts/syntax"},{"group":"Access Control","pages":[{"title":"Access Control","sidebarTitle":"Overview","href":"/docs/data-modeling/access-control/index"},{"title":"Access policies","href":"/docs/data-modeling/data-access-policies"},{"title":"Row-level security","href":"/docs/data-modeling/access-control/row-level-security"},{"title":"Member-level security","href":"/docs/data-modeling/access-control/member-level-security"},{"title":"Security context","href":"/docs/data-modeling/access-control/context"}]},{"group":"Dynamic Data Models","root":{"title":"Dynamic Data Models","href":"/docs/data-modeling/dynamic/index"},"pages":[{"title":"Data modeling with YAML, Jinja, and Python","href":"/docs/data-modeling/dynamic/jinja"},{"title":"Data modeling with JavaScript","href":"/docs/data-modeling/dynamic/javascript"},{"title":"Export and import","href":"/docs/data-modeling/dynamic/code-reusability-export-and-import"},{"title":"Execution Environment (JavaScript)","href":"/docs/data-modeling/dynamic/schema-execution-environment"}]},{"title":"Configuration","href":"/docs/data-modeling/configuration"},{"group":"Developing Model","pages":[{"title":"Visual Modeler","href":"/docs/data-modeling/visual-modeler"},{"title":"Data Model IDE","href":"/docs/data-modeling/data-model-ide"},{"title":"Development mode","href":"/docs/data-modeling/dev-mode"},{"title":"Access Policies viewer","href":"/docs/data-modeling/access-policies-viewer"},{"title":"Content Validator","href":"/docs/data-modeling/content-validator"}]}]},{"group":"Pre-aggregations","pages":[{"title":"Overview","href":"/docs/pre-aggregations/index"},{"title":"Getting started with pre-aggregations","href":"/docs/pre-aggregations/getting-started-pre-aggregations"},{"title":"Using pre-aggregations","href":"/docs/pre-aggregations/using-pre-aggregations"},{"title":"Matching queries with pre-aggregations","description":"When executing a query, Cube will try to match and fulfill it with the best available pre-aggregation.","href":"/docs/pre-aggregations/matching-pre-aggregations"},{"title":"Refreshing pre-aggregations","href":"/docs/pre-aggregations/refreshing-pre-aggregations"},{"title":"Lambda pre-aggregations","description":"Lambda-style pre-aggregations that merge historical rollups with fresher source or streaming layers for near-real-time serving on Cube Store.","href":"/docs/pre-aggregations/lambda-pre-aggregations"},{"title":"Cube Store architecture","href":"/docs/pre-aggregations/cube-store-architecture"}]},{"group":"Integrations","pages":[{"title":"Slack","href":"/docs/integrations/slack"},{"title":"Tableau Integration","sidebarTitle":"Tableau","hidden":true,"href":"/docs/integrations/tableau"},{"title":"Microsoft Power BI","hidden":true,"href":"/docs/integrations/power-bi/index"},{"title":"Cube for Excel","href":"/docs/integrations/microsoft-excel"},{"title":"Cube for Sheets","href":"/docs/integrations/google-sheets"},{"title":"Snowflake Semantic Views Integration","sidebarTitle":"Snowflake Semantic Views","href":"/docs/integrations/snowflake-semantic-views"},{"title":"Databricks Metric Views","href":"/docs/integrations/databricks-metric-views"},{"title":"Apache Ossie","href":"/docs/integrations/apache-ossie"},{"title":"dbt Integration","sidebarTitle":"dbt","href":"/docs/integrations/dbt"},{"group":"Semantic Layer Sync","root":{"title":"Semantic Layer Sync","hidden":true,"href":"/docs/integrations/semantic-layer-sync/index"},"pages":[{"title":"Semantic Layer Sync with Apache Superset","sidebarTitle":"Superset","hidden":true,"href":"/docs/integrations/semantic-layer-sync/superset"},{"title":"Semantic Layer Sync with Preset","sidebarTitle":"Preset","hidden":true,"href":"/docs/integrations/semantic-layer-sync/preset"},{"title":"Semantic Layer Sync with Tableau","sidebarTitle":"Tableau","hidden":true,"href":"/docs/integrations/semantic-layer-sync/tableau"}]},{"title":"MCP server","href":"/docs/integrations/mcp-server"},{"title":"Cube agent skills","href":"/docs/integrations/agent-skills"}]}]},{"tab":"Admin","pages":[{"title":"Admin","href":"/admin/connect-to-data"}]},{"tab":"Embedding","pages":[{"title":"Embedding","href":"/embedding"}]},{"tab":"Reference","pages":[{"title":"Reference","href":"/reference/data-modeling/cube"}]},{"tab":"Cube Core","pages":[{"title":"Cube Core","href":"/cube-core"}]},{"tab":"Recipes","pages":[{"title":"Recipes","href":"/recipes"}]},{"tab":"API","pages":[{"title":"API","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Refreshing pre-aggregations - Cube Documentation","deploymentId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","buildId":"dpl_2pTxFtyBudBMYZiCw1MyvoA1wxpd","dynamics":[],"chunks":[]}