The source data definition sets where the data for an entity comes from.Source data is associated with a single entity.The source data definition specifies:
The origin of the data (e.g., a physical object or an SQL query).
The columns to be included as attributes of an entity, along with their designated names.
The metadata associated with those attributes, derived from the source.
As part of the source data definition, you can optionally specify a name for the created attribute.
If no name is provided, the column name is used as the attribute’s default name.
A common pattern for light data cleaning transformations involves adding a column as a hidden attribute and then
creating a calculated attribute with the same name that applies the transformation.For example, if the city_name column in the source data contains surrounding whitespace, you can normalize the column by
adding it as a hidden attribute and creating a calculated attribute to remove the whitespace:
Add the city_name column as _city_name_raw attribute, set as hidden.
Create a calculated attribute called city_name with the expression TRIM(entity._city_name_raw)
When source data is created, its column structure and data types are initially imported from the source.If the structure or data types change over time, you can re-synchronize them by using the “synchronize from source” option available in the UI or API.
Source objects can include any Snowflake object containing data, such as TABLE, VIEW, DYNAMIC TABLE, INTERACTIVE TABLE, MATERIALIZED VIEW, and more.
All types of tables are supported, including regular tables, Iceberg tables, and external tables.Note that the object path can be relative to the environment.
If its source path is relative (only table name), it will refer to the object in the database and schema of the current environment.
If its source path is absolute (db.schema.table) it always refers to that absolute path.
Source data can be based on any SQL query. Note that the SQL query runs as-is on the data warehouse.The SQL query runs within the current environment.
If a FROM statement of the SQL query is relative (only table name), it will refer to the table on the database and schema of the current environment.
If a FROM statement of the SQL query is absolute (db.schema.table) it always refers to that absolute path.
The SQL query may use parameters to adjust its execution.
Parameters can be set within a domain to create different data sources.
Custom SQL may result in lower performance due to the following reasons:
Filters may not be pushed down into the query, leading to larger table scans.
Column selection may not be pushed down, causing unnecessary data movement.
If the source data is a large dataset that is frequently filtered for performance reasons, it’s recommended to encapsulate it in a table.
If the source data contains many columns, consider encapsulating it in a view.In particular, it’s always better to reference a table directly rather than using a SELECT * FROM table custom SQL source.
Source data, whether it’s a query, table, or view, can include semi-structured columns (such as JSON, arrays, or maps).A Honeydew attribute can be of a semi-structured type and used directly as a structured object.
However, most BI tools cannot process semi-structured data and require simple, structured columns.There are two approaches to normalize semi-structured data for BI:
Use the source as-is with semi-structured attributes and create calculated attributes
to unpack specific fields..
Unpack all fields with a custom SQL query source.
For a JSON column with different fields, a structured custom SQL query can look like this:
-- the table JSON_TABLE has a column named json_data with different nested valuesSELECT -- unpack a field by key json_data:"id"::string AS id, -- unpack a sub-field in a properties by key json_data:"address":"city"::string AS address_city, -- unpack a sub-field in an array by key json_data:"visits"[0]:"time"::timestamp AS first_visit_time,FROM DATABASE.SCHEMA.JSON_TABLE;
Note that when unpacking semi-structured data, it is recommended to explicitly cast the columns to the appropriate types.
In most cases, it is recommended to avoid using LATERAL FLATTEN join to flatten a JSON object.When using LATERAL FLATTEN, each key in the JSON object becomes a separate row with a key and a value,
which can alter the granularity of the entity. If this behavior is desired, use the SEQ column,
which provides a unique sequence number, as part of the entity key to maintain consistency and avoid issues with key duplication.
dataset_type: Choose if a table, a SQL query or a virtual entity
sql: The name of table (when type is a table) / the base entity (virtual table) / SQL query (custom sql)
attributes: List of attributes to bring from the source, with optional renaming.
Each attribute supports a metadata field for tool-specific metadata
(see examples for AI,
Tableau,
Power BI,
Lightdash and
ThoughtSpot)
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Honeydew Documentation","colors":{"primary":"#abcb1a","light":"#CBE74A","dark":"#9cb918"},"logo":{"light":"https://mintcdn.com/honeydew/FY_ZgBcPUZJ2-No3/logo/logo.svg?fit=max\u0026auto=format\u0026n=FY_ZgBcPUZJ2-No3\u0026q=85\u0026s=10dbf238c7bdb5bb1ee94e85eea8049f","dark":"https://mintcdn.com/honeydew/FY_ZgBcPUZJ2-No3/logo/logo-white.svg?fit=max\u0026auto=format\u0026n=FY_ZgBcPUZJ2-No3\u0026q=85\u0026s=c774c9340ba4f0a8828b7ad8aa1e4179","href":"https://honeydew.ai"},"favicon":"https://mintcdn.com/honeydew/mXl3IrOWJ_NESw09/favicon.png?fit=max\u0026auto=format\u0026n=mXl3IrOWJ_NESw09\u0026q=85\u0026s=4b76e0217dbafaa5c1b88b130a5e62c4","navbar":{"links":[{"href":"https://app.honeydew.cloud/signup","label":"Sign Up"},{"href":"https://app.honeydew.cloud/","label":"Login"},{"href":"https://honeydew.ai","label":"Website"}],"primary":{"type":"button","label":"Book a Demo","href":"https://honeydew.ai/get-started/"}},"footer":{"socials":{"twitter":"https://twitter.com/honeydewai","linkedin":"https://www.linkedin.com/company/honeydewai","github":"https://github.com/honeydew-ai"}},"integrations":{"ga4":{"measurementId":"G-3FG56HVDQ6"},"gtm":{"tagId":"GTM-MNTHZF6"},"hotjar":{"hjid":"3749326","hjsv":"6"},"segment":{"key":"SPDgvdM9OoZSCirKWUQj58GrrjBEzOoE"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"honeydew","hasAudioNarration":false,"actualSubdomain":"honeydew","customDomains":["honeydew.ai"],"gitSource":{"type":"github","owner":"honeydew-ai","repo":"docs","deployBranch":"main","contentDirectory":"content","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae20cec8ffbca586928afcf","collectionId":"06abe275-146f-4f17-8352-4be0ab521fef","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae20cec8ffbca586928afcf"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ae20cec8ffbca586928afcf","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Integrations","count":47},{"language":"default","tag":"Modeling Reference","count":30},{"language":"default","tag":"BI Tools","count":19},{"language":"default","tag":"Management","count":16},{"language":"default","tag":"Security","count":11},{"language":"default","tag":"Recipes","count":10},{"language":"default","tag":"Advanced Modeling","count":8},{"language":"default","tag":"Authentication","count":7},{"language":"default","tag":"Governance","count":7},{"language":"default","tag":"Context Layer","count":7}]},"assistantConfig":{},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"editor-v7-file-tree","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":"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":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"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":"editor-nav-generations","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":"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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"modeling/source-data","slug":"/modeling/source-data","pageMetadata":{"title":"Source Data","description":null,"href":"/modeling/source-data"},"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`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`entity-source-data`,children:`Entity Source Data`}),`\n`,_jsxs(_components.p,{children:[`The source data definition sets where the data for an `,_jsx(_components.a,{href:`/modeling/entities`,children:`entity`}),` comes from.`]}),`\n`,_jsx(_components.p,{children:`Source data is associated with a single entity.`}),`\n`,_jsx(_components.p,{children:`The source data definition specifies:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The origin of the data (e.g., a physical object or an SQL query).`}),`\n`,_jsx(_components.li,{children:`The columns to be included as attributes of an entity, along with their designated names.`}),`\n`,_jsx(_components.li,{children:`The metadata associated with those attributes, derived from the source.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`columns`,children:`Columns`}),`\n`,_jsx(_components.p,{children:`Columns from the source data are added as attributes in the entity.`}),`\n`,_jsx(Heading,{level:`3`,id:`attribute-mapping-and-renaming`,children:`Attribute Mapping and Renaming`}),`\n`,_jsx(_components.p,{children:`As part of the source data definition, you can optionally specify a name for the created attribute.\nIf no name is provided, the column name is used as the attribute’s default name.`}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:`A common pattern for light data cleaning transformations involves adding a column as a hidden attribute and then\ncreating a calculated attribute with the same name that applies the transformation.`}),_jsxs(_components.p,{children:[`For example, if the `,_jsx(_components.code,{children:`city_name`}),` column in the source data contains surrounding whitespace, you can normalize the column by\nadding it as a hidden attribute and creating a calculated attribute to remove the whitespace:`]}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Add the `,_jsx(_components.code,{children:`city_name`}),` column as `,_jsx(_components.code,{children:`_city_name_raw`}),` attribute, set as hidden.`]}),`\n`,_jsxs(_components.li,{children:[`Create a `,_jsx(_components.a,{href:`/calculations/attributes`,children:`calculated attribute`}),` called `,_jsx(_components.code,{children:`city_name`}),` with the expression `,_jsx(_components.code,{children:`TRIM(entity._city_name_raw)`})]}),`\n`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`structure-and-type-synchronization`,children:`Structure and Type Synchronization`}),`\n`,_jsx(_components.p,{children:`When source data is created, its column structure and data types are initially imported from the source.`}),`\n`,_jsx(_components.p,{children:`If the structure or data types change over time, you can re-synchronize them by using the “synchronize from source” option available in the UI or API.`}),`\n`,_jsx(Heading,{level:`3`,id:`metadata-synchronization`,children:`Metadata Synchronization`}),`\n`,_jsx(_components.p,{children:`Metadata can be synchronized from the source data to the entity and its attributes:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Table and columns comments are imported as descriptions for the entity and its attributes`}),`\n`,_jsx(_components.li,{children:`Table and columns tags are imported as labels for the entity and its attributes`}),`\n`]}),`\n`,_jsx(_components.p,{children:`In addition, primary keys and foreign keys metadata is leveraged to suggest entity keys and relationships.`}),`\n`,_jsx(Heading,{level:`2`,id:`data-mapping`,children:`Data Mapping`}),`\n`,_jsx(_components.p,{children:`Source data can be a database object (such as a table, view, or custom SQL query).`}),`\n`,_jsx(Heading,{level:`3`,id:`database-objects`,children:`Database Objects`}),`\n`,_jsx(_components.p,{children:`Source objects can include any Snowflake object containing data, such as TABLE, VIEW, DYNAMIC TABLE, INTERACTIVE TABLE, MATERIALIZED VIEW, and more.\nAll types of tables are supported, including regular tables, Iceberg tables, and external tables.`}),`\n`,_jsxs(_components.p,{children:[`Note that the object path can be relative to the `,_jsx(_components.a,{href:`/governance/environments`,children:`environment`}),`.`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`If its source path is relative (only table name), it will refer to the object in the database and schema of the `,_jsx(_components.a,{href:`/governance/environments`,children:`current environment`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If its source path is absolute (`,_jsx(_components.code,{children:`db.schema.table`}),`) it always refers to that absolute path.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`custom-sql`,children:`Custom SQL`}),`\n`,_jsx(_components.p,{children:`Source data can be based on any SQL query. Note that the SQL query runs as-is on the data warehouse.`}),`\n`,_jsxs(_components.p,{children:[`The SQL query runs within the current `,_jsx(_components.a,{href:`/governance/environments`,children:`environment`}),`.`]}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`If a `,_jsx(_components.code,{children:`FROM`}),` statement of the SQL query is relative (only table name), it will refer to the table on the database and schema of the `,_jsx(_components.a,{href:`/governance/environments`,children:`current environment`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`If a `,_jsx(_components.code,{children:`FROM`}),` statement of the SQL query is absolute (`,_jsx(_components.code,{children:`db.schema.table`}),`) it always refers to that absolute path.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`The SQL query may use `,_jsx(_components.a,{href:`/parameters`,children:`parameters`}),` to adjust its execution.\nParameters can be set within a `,_jsx(_components.a,{href:`/domains`,children:`domain`}),` to create different data sources.`]}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:`Custom SQL may result in lower performance due to the following reasons:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Filters may not be pushed down into the query, leading to larger table scans.`}),`\n`,_jsx(_components.li,{children:`Column selection may not be pushed down, causing unnecessary data movement.`}),`\n`]}),_jsx(_components.p,{children:`If the source data is a large dataset that is frequently filtered for performance reasons, it’s recommended to encapsulate it in a table.\nIf the source data contains many columns, consider encapsulating it in a view.`}),_jsxs(_components.p,{children:[`In particular, it’s always better to reference a table directly rather than using a `,_jsx(_components.code,{children:`SELECT * FROM table`}),` custom SQL source.`]})]}),`\n`,_jsx(Heading,{level:`3`,id:`semi-structured-and-json-data`,children:`Semi-Structured and JSON Data`}),`\n`,_jsx(_components.p,{children:`Source data, whether it’s a query, table, or view, can include semi-structured columns (such as JSON, arrays, or maps).`}),`\n`,_jsx(_components.p,{children:`A Honeydew attribute can be of a semi-structured type and used directly as a structured object.\nHowever, most BI tools cannot process semi-structured data and require simple, structured columns.`}),`\n`,_jsx(_components.p,{children:`There are two approaches to normalize semi-structured data for BI:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Use the source as-is with semi-structured attributes and create `,_jsx(_components.a,{href:`/calculations/attributes#semi-structured-attributes`,children:`calculated attributes`}),`\nto unpack specific fields..`]}),`\n`,_jsx(_components.li,{children:`Unpack all fields with a custom SQL query source.`}),`\n`]}),`\n`,_jsxs(Tip,{children:[_jsx(_components.p,{children:`For a JSON column with different fields, a structured custom SQL query can look like this:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`sql`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`sql`,children:_jsxs(_components.code,{language:`sql`,numberOfLines:`9`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`-- the table JSON_TABLE has a column named json_data with different nested values`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`SELECT`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- unpack a field by key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json_data:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::string `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` id,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- unpack a sub-field in a properties by key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json_data:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"address\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"city\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::string `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` address_city,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` -- unpack a sub-field in an array by key`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json_data:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"visits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[0]:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"time\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`timestamp`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` AS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` first_visit_time,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` DATABASE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`SCHEMA`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.JSON_TABLE;`})]}),`\n`]})})}),_jsx(_components.p,{children:`Note that when unpacking semi-structured data, it is recommended to explicitly cast the columns to the appropriate types.`})]}),`\n`,_jsxs(Warning,{children:[_jsxs(_components.p,{children:[`In most cases, it is recommended to avoid using `,_jsx(_components.code,{children:`LATERAL FLATTEN`}),` join to flatten a JSON object.`]}),_jsxs(_components.p,{children:[`When using `,_jsx(_components.code,{children:`LATERAL FLATTEN`}),`, each key in the JSON object becomes a separate row with a key and a value,\nwhich can alter the granularity of the entity. If this behavior is desired, use the `,_jsx(_components.code,{children:`SEQ`}),` column,\nwhich provides a unique sequence number, as part of the entity key to maintain consistency and avoid issues with key duplication.`]})]}),`\n`,_jsx(Heading,{level:`2`,id:`yaml-schema`,children:`YAML Schema`}),`\n`,_jsx(_components.p,{children:`Each entity is based on a source table defined in a separate text file stored in Git.`}),`\n`,_jsx(_components.p,{children:`The schema for source table is:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`41`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`41`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`dataset`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`entity`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003centity name>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003csource table name>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`display_name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cdisplay name>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`sql`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \u003csql statement>`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`owner`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cowner>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`description`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`-`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \u003cdescription>`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`labels`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`label1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`label2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`tags`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003ckey>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cvalue>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003csnowflake/databricks/bigquery/honeydew/other>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`folder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cfolder>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`hidden`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cTrue/False/Yes/No>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`dataset_type`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003ctable/sql/entity>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`attributes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`column`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003csrc column name>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cattribute name>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` display_name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cdisplay name>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` datatype`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cbool / date / float / number / string / time / timestamp>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` timegrain`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cthe time grain for time attributes - hour/day/month/...>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` description`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cdescription>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` labels`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`label1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`label2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`...`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` tags`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`key`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003ckey>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cvalue>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` source`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003csnowflake/databricks/bigquery/honeydew/other>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` folder`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cfolder>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` hidden`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cTrue/False/Yes/No>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` metadata`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cmetadata section name>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` metadata`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cmetadata field name>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` value`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\u003cmetadata field value>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`...`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`...`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Fields:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`name`}),`: Name of source table`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`display_name`}),`, `,_jsx(_components.code,{children:`owner`}),`, `,_jsx(_components.code,{children:`description`}),`, `,_jsx(_components.code,{children:`labels`}),`, `,_jsx(_components.code,{children:`tags`}),`, `,_jsx(_components.code,{children:`folder`}),`, `,_jsx(_components.code,{children:`hidden`}),`: Metadata`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`dataset_type`}),`: Choose if a table, a SQL query or a virtual entity`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`sql`}),`: The name of table (when type is a table) / the base entity (virtual table) / SQL query (custom sql)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`attributes`}),`: List of attributes to bring from the source, with optional renaming.\nEach attribute supports a `,_jsx(_components.code,{children:`metadata`}),` field for tool-specific metadata\n(see examples for `,_jsx(_components.a,{href:`/integration/context-layer/ai-metadata#attributes-and-metrics`,children:`AI`}),`,\n`,_jsx(_components.a,{href:`/integration/bi-tools/tableau#tableau-specific-metadata`,children:`Tableau`}),`,\n`,_jsx(_components.a,{href:`/integration/bi-tools/powerbi#power-bi-specific-metadata`,children:`Power BI`}),`,\n`,_jsx(_components.a,{href:`/integration/bi-tools/lightdash#lightdash-specific-metadata`,children:`Lightdash`}),` and\n`,_jsx(_components.a,{href:`/integration/bi-tools/thoughtspot#thoughtspot-specific-metadata`,children:`ThoughtSpot`}),`)`]}),`\n`]})]})}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":{"config":{},"pageMetadata":{"title":"Source Data","description":null,"href":"/modeling/source-data"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Entity Source Data","slug":"entity-source-data","depth":2,"children":[]},{"title":"Columns","slug":"columns","depth":2,"children":[{"title":"Attribute Mapping and Renaming","slug":"attribute-mapping-and-renaming","depth":3,"children":[]},{"title":"Structure and Type Synchronization","slug":"structure-and-type-synchronization","depth":3,"children":[]},{"title":"Metadata Synchronization","slug":"metadata-synchronization","depth":3,"children":[]}]},{"title":"Data Mapping","slug":"data-mapping","depth":2,"children":[{"title":"Database Objects","slug":"database-objects","depth":3,"children":[]},{"title":"Custom SQL","slug":"custom-sql","depth":3,"children":[]},{"title":"Semi-Structured and JSON Data","slug":"semi-structured-and-json-data","depth":3,"children":[]}]},{"title":"YAML Schema","slug":"yaml-schema","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/honeydew/82b3c90683bc6a9d/script.js"],"subdomain":"honeydew","siteName":"Honeydew Documentation","title":"Source Data - Honeydew Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-04T18:00:49.815Z","originalFileLocation":"modeling/source-data.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=\"application-name\" content=\"Honeydew Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_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=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Source Data - Honeydew Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Honeydew Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://honeydew.ai/docs/modeling/source-data\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://honeydew.mintlify.app/_mintlify/api/og/v2?division=Entity+Modeling\u0026amp;title=Source+Data\u0026amp;theme=0b845200c1ca80fd78144b6a\u0026amp;signature=74f1885da62f277fa4b6d86d25b649aef6f490721a2f3c9848560e394e65b64d\">\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=\"Source Data - Honeydew Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://honeydew.mintlify.app/_mintlify/api/og/v2?division=Entity+Modeling\u0026amp;title=Source+Data\u0026amp;theme=0b845200c1ca80fd78144b6a\u0026amp;signature=74f1885da62f277fa4b6d86d25b649aef6f490721a2f3c9848560e394e65b64d\">\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=\"/docs/mintlify-assets/_mintlify/favicons/honeydew/RTEKSf7Pgej90ivg/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Honeydew Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#abcb1a\">\u003clink data-mint-head rel=\"canonical\" href=\"https://honeydew.ai/docs/modeling/source-data\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/modeling/source-data.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://honeydew.ai/#organization\",\"name\":\"Honeydew Documentation\",\"url\":\"https://honeydew.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/honeydew/FY_ZgBcPUZJ2-No3/logo/logo.svg?fit=max\u0026auto=format\u0026n=FY_ZgBcPUZJ2-No3\u0026q=85\u0026s=10dbf238c7bdb5bb1ee94e85eea8049f\"}},{\"@type\":\"WebSite\",\"@id\":\"https://honeydew.ai/docs#website\",\"name\":\"Honeydew Documentation\",\"url\":\"https://honeydew.ai/docs\",\"publisher\":{\"@id\":\"https://honeydew.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://honeydew.ai/docs/modeling/source-data#webpage\",\"url\":\"https://honeydew.ai/docs/modeling/source-data\",\"name\":\"Source Data\",\"dateModified\":\"2026-10-04T18:00:49.815Z\",\"isPartOf\":{\"@id\":\"https://honeydew.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://honeydew.ai/docs/modeling/source-data#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://honeydew.ai/docs/modeling/source-data#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Modeling Reference\",\"item\":\"https://honeydew.ai/docs/architecture\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Entity Modeling\",\"item\":\"https://honeydew.ai/docs/modeling/entities\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Source Data\",\"item\":\"https://honeydew.ai/docs/modeling/source-data\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://honeydew.ai/docs/modeling/source-data#article\",\"headline\":\"Source Data\",\"name\":\"Source Data\",\"url\":\"https://honeydew.ai/docs/modeling/source-data\",\"mainEntityOfPage\":{\"@id\":\"https://honeydew.ai/docs/modeling/source-data#webpage\"},\"dateModified\":\"2026-10-04T18:00:49.815Z\",\"publisher\":{\"@id\":\"https://honeydew.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://honeydew.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Honeydew Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Honeydew Documentation","nav":{"global":null,"groups":[{"group":"Quick Start","pages":[{"title":"Introduction","href":"/introduction"},{"title":"TPC-H Walkthrough","href":"/tpch-example"},{"title":"Evaluation Process","href":"/evaluation"},{"title":"Initial Setup","href":"/initial-setup"},{"title":"Support","href":"/support"}]},{"group":"Semantic Ecosystem","pages":[{"title":"Apache Ossie (OSI)","href":"/integration/apache-ossie-osi"},{"title":"From SQL to Honeydew","href":"/migration/sql-guide"},{"title":"From DAX to Honeydew","href":"/migration/dax-guide"},{"title":"From Tableau to Honeydew","href":"/migration/tableau-guide"},{"title":"Import Tools","href":"/migration/import-tools"}]},{"group":"Modeling Reference","pages":[{"title":"Architecture","href":"/architecture"},{"title":"Semantic Compiler","href":"/semantic-compiler"},{"group":"Entity Modeling","pages":[{"title":"Entities","description":null,"href":"/modeling/entities"},{"title":"Source Data","href":"/modeling/source-data"},{"title":"Relations","description":null,"href":"/modeling/relations"}]},{"title":"Domains","href":"/domains"},{"group":"Calculations","pages":[{"title":"Attributes","href":"/calculations/attributes"},{"title":"Metrics","href":"/calculations/metrics"},{"title":"Filters","href":"/calculations/filters"}]},{"title":"Datasets","href":"/dynamic-datasets"},{"title":"Parameters","href":"/parameters"},{"group":"Advanced Modeling","pages":[{"title":"Order of Filtering","href":"/advanced-modeling/order-of-computation"},{"title":"Multiple Facts and Shared Dimensions","href":"/advanced-modeling/shared-dimensions"},{"title":"Conditional Filtering","href":"/advanced-modeling/conditional-filtering"},{"title":"Multi-Grain Tables","href":"/advanced-modeling/multi-grain-tables"},{"title":"Slowly Changing Dimensions","href":"/advanced-modeling/slowly-changing-dimensions"},{"title":"Time Aware Metrics","href":"/advanced-modeling/time-metrics"},{"title":"Time Spines","href":"/advanced-modeling/time-spines"},{"title":"Handling Fan-Out and Chasm Joins","href":"/advanced-modeling/mixing-granularities"}]},{"group":"Recipes","pages":[{"title":"Overview","href":"/recipes/overview"},{"title":"How much revenue comes from a specific category?","sidebarTitle":"Metric for a specific category","href":"/recipes/category-revenue"},{"title":"What share of revenue comes from a specific category?","sidebarTitle":"Category share of total","href":"/recipes/category-revenue-share"},{"title":"Are our customers coming back?","sidebarTitle":"Active customers \u0026 stickiness","href":"/recipes/active-customers"},{"title":"Are we growing compared to last year?","sidebarTitle":"Period-over-period growth","href":"/recipes/yoy-revenue-growth"},{"title":"Are customers spending more per visit?","sidebarTitle":"Fixed level of detail metric","href":"/recipes/avg-order-value"},{"title":"What fraction of orders exceed a revenue threshold?","sidebarTitle":"Share above a threshold","href":"/recipes/high-value-order-share"},{"title":"Which truck has the most consistent daily sales?","sidebarTitle":"Average per day","href":"/recipes/avg-daily-revenue"},{"title":"Can one metric show different numbers to different teams?","sidebarTitle":"BI parameters","href":"/recipes/dynamic-bi-parameters"},{"title":"How do I give different teams their own governed view of the data?","sidebarTitle":"Domain hierarchy","href":"/recipes/domain-hierarchy"}]},{"title":"YAML Schema","href":"/yaml-schema"}]},{"group":"Context Layer","pages":[{"title":"Overview","href":"/integration/context-layer/overview"},{"title":"Deep Analysis","href":"/integration/context-layer/deep-analysis"},{"title":"Agents","href":"/integration/context-layer/agents"},{"title":"Context Management","href":"/integration/context-layer/context-management"},{"title":"AI Metadata","href":"/integration/context-layer/ai-metadata"},{"title":"Building with AI","href":"/integration/context-layer/building-with-ai"},{"title":"YAML Schema","href":"/integration/context-layer/yaml-schema"}]},{"group":"Management","pages":[{"group":"Performance","pages":[{"title":"Overview","href":"/performance/overview"},{"title":"Aggregate Aware Caching","href":"/performance/aggregate-awareness"},{"title":"Incremental Aggregate Updates","href":"/performance/aggregate-incremental-updates"},{"title":"Entity Caching","href":"/performance/entity-caching"},{"title":"Filtering and Sampling","href":"/performance/filtering-and-sampling"}]},{"group":"Governance","pages":[{"title":"Metadata","href":"/governance/metadata"},{"title":"Git Version Control","href":"/governance/git-version-control"},{"title":"Change Approval","href":"/governance/change-approval"},{"group":"CI/CD Workflow","pages":[{"title":"Overview","href":"/governance/ci-cd/overview"},{"title":"GitHub Actions","icon":"github","href":"/governance/ci-cd/github-actions"}]},{"title":"Workspaces","href":"/governance/workspaces"},{"title":"Environments","href":"/governance/environments"}]},{"group":"Monitoring","pages":[{"title":"Query history","href":"/monitoring/query-history"},{"title":"Question history","href":"/monitoring/question-history"}]},{"title":"User Access Control","href":"/access-control/user-access-control"},{"title":"Row-Level Security","href":"/security/row-level-security"}]},{"group":"Integrations","pages":[{"title":"MCP Server","href":"/integration/mcp"},{"group":"Interfaces","pages":[{"title":"SQL Interface","href":"/integration/sql-interface"},{"title":"GraphQL API","href":"/integration/graphql-api"},{"title":"XMLA Interface","href":"/integration/xmla-interface"},{"title":"Snowflake Native App","icon":"snowflake","href":"/integration/snowflake-native-app"}]},{"group":"AI","pages":[{"title":"Slack App","icon":"slack","href":"/integration/context-layer/slack-app"},{"title":"Microsoft Teams App","icon":"microsoft","href":"/integration/context-layer/teams-app"},{"title":"Build an Embedded AI Analyst UI","sidebarTitle":"Embedded UI","href":"/integration/context-layer/embedded-ui"},{"title":"Streamlit","href":"/integration/context-layer/streamlit"},{"title":"LLM Providers","href":"/integration/context-layer/llm-providers"}]},{"group":"BI Tools","pages":[{"title":"Supported Tools","href":"/integration/bi-tools/supported-tools"},{"title":"Power BI","href":"/integration/bi-tools/powerbi"},{"title":"Excel","href":"/integration/bi-tools/excel"},{"title":"Tableau","href":"/integration/bi-tools/tableau"},{"title":"Looker","href":"/integration/bi-tools/looker"},{"title":"ThoughtSpot","href":"/integration/bi-tools/thoughtspot"},{"title":"Databricks","href":"/integration/bi-tools/databricks"},{"title":"Sigma","href":"/integration/bi-tools/sigma"},{"title":"Domo","href":"/integration/bi-tools/domo"},{"title":"Qlik","href":"/integration/bi-tools/qlik"},{"title":"Amazon Quick","href":"/integration/bi-tools/amazon-quick"},{"title":"Hex","href":"/integration/bi-tools/hex"},{"title":"Deepnote","href":"/integration/bi-tools/deepnote"},{"title":"Superset/Preset","href":"/integration/bi-tools/superset-preset"},{"title":"Metabase","href":"/integration/bi-tools/metabase"},{"title":"Mode Analytics","href":"/integration/bi-tools/mode"},{"title":"Lightdash","href":"/integration/bi-tools/lightdash"},{"title":"Holistics","href":"/integration/bi-tools/holistics"},{"title":"Redash","href":"/integration/bi-tools/redash"}]},{"group":"Catalogs","pages":[{"title":"Data Catalogs","href":"/integration/catalogs/supported-tools"},{"title":"Atlan","href":"/integration/catalogs/atlan"},{"title":"Collibra","href":"/integration/catalogs/collibra"},{"title":"DataHub","href":"/integration/catalogs/datahub"}]},{"group":"SQL Clients","pages":[{"title":"Retool","href":"/integration/bi-tools/retool"},{"title":"Database Tools \u0026 IDEs","href":"/integration/bi-tools/sql-tools-ides"},{"title":"Jupyter","href":"/integration/bi-tools/jupyter"},{"title":"Python","href":"/integration/bi-tools/python"},{"title":"JavaScript","href":"/integration/bi-tools/javascript"}]},{"group":"Data Sources","pages":[{"title":"Snowflake","icon":"snowflake","href":"/integration/data-sources/snowflake"},{"title":"Databricks","href":"/integration/data-sources/databricks"},{"title":"Google BigQuery","icon":"google","href":"/integration/data-sources/bigquery"}]},{"group":"Git","pages":[{"title":"GitHub","icon":"github","href":"/integration/git/github"},{"title":"GitLab","icon":"gitlab","href":"/integration/git/gitlab"},{"title":"Bitbucket","icon":"bitbucket","href":"/integration/git/bitbucket"},{"title":"Azure DevOps","icon":"microsoft","href":"/integration/git/azure-devops"}]},{"group":"ELT Tools","pages":[{"title":"Data Pipeline Architecture","href":"/integration/etl-tools/pipeline-architecture"},{"title":"dbt","href":"/integration/etl-tools/dbt"}]}]},{"group":"Security","pages":[{"title":"Security \u0026 Compliance","href":"/security/security"},{"title":"API Keys","href":"/access-control/api-keys"},{"group":"Authentication","pages":[{"title":"Single Sign-On (SSO)","href":"/access-control/sso"},{"title":"Okta SSO Integration (OIDC)","href":"/access-control/okta"},{"title":"Microsoft Entra ID (formerly Azure Active Directory)","href":"/access-control/entra-id"},{"title":"PingIdentity SSO Integration (SAML)","href":"/access-control/ping-identity"},{"title":"OIDC Provider SSO Integration","href":"/access-control/oidc-provider"},{"title":"SAML Provider SSO Integration","href":"/access-control/saml-provider"},{"title":"Windows Authentication (Kerberos)","href":"/access-control/windows-authentication"}]},{"title":"IP Access Control","href":"/access-control/ip-access-control"},{"title":"Vulnerability Disclosure Policy","href":"/security/vulnerability-disclosure-policy"}]},{"group":"Release Notes","pages":[{"title":"Release Notes","href":"/release-notes"}]}]},"title":"Source Data - Honeydew Documentation","buildId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","deploymentId":"dpl_AUojGTPodKNPTVaxVPcxnNvkSVqo","dynamics":[],"chunks":[]}