Skip to main content

Metadata export

Organizations need to export metadata from Atlan to support AI applications, internal data marketplaces, and governance workflows across source systems. Use Lakehouse as a single place to query enriched metadata and feed it into downstream tools and applications.

Before you begin

Before you run these queries, make sure:

  • Your Lakehouse setup is complete and Lakehouse is enabled for your organization. If setup isn't complete, see Get started with Lakehouse.

The Gold namespace is built natively into the catalog -- no additional setup is needed. You can run these queries directly on the gold.ASSETS table and the raw tables in entity_metadata (such as entity_metadata.Readme, entity_metadata.CustomMetadata, and entity_metadata.TagRelationship) to export metadata for AI assistants, data marketplaces, and reverse sync workflows.

Retrieve asset metadata

Use this query to retrieve assets from Atlan with enrichment metadata that you can export to external tools. It's particularly useful for:

  • Finding assets with good documentation. Update the WHERE clause to filter assets that match your use case. Several examples are shown in the section below.
  • Powering data discovery, quality, or governance dashboards. Update the <database> placeholder to match your environment.
  • Identifying certified and actively used assets.
USE <database>;

SELECT
A.asset_name, -- Human-readable name of the asset
A.guid, -- Unique identifier for the asset
A.asset_qualified_name, -- Fully qualified name (e.g., db.schema.table)
A.asset_type, -- Type of asset: Table, Column, View, etc.
A.description, -- System description
A.user_description, -- User-authored description
A.status, -- Lifecycle status: ACTIVE, DELETED
A.certificate_status, -- Certification state: VERIFIED, DRAFT, DEPRECATED
A.owner_users, -- Array of asset owners
tr.TAGS, -- Array of tags applied to the asset
R.description AS README_TEXT,-- Rich documentation from README (if present)
A.popularity_score, -- Usage-based popularity metric
A.has_lineage -- Boolean indicating if lineage exists
FROM
gold.assets A
LEFT JOIN
entity_metadata.Readme R
ON A.readme_guid = R.GUID -- Join README content to the asset
LEFT JOIN (
SELECT guid, ARRAY_AGG(tagName) AS TAGS
FROM entity_metadata.TagRelationship
WHERE status = 'ACTIVE'
GROUP BY guid
) tr ON A.guid = tr.guid
WHERE
A.asset_type IN ('Table', 'Column', 'View') -- Focus on core data assets
AND A.connector_name IN ('snowflake', 'redshift', 'bigquery') -- Cloud warehouses
AND R.description IS NOT NULL -- Only return assets with README documentation
LIMIT 10; -- Sample output for inspection
Sample output
ASSET_NAMEASSET_TYPEDESCRIPTIONUSER_DESCRIPTIONSTATUSCERTIFICATE_STATUSOWNER_USERSTAGSHAS_LINEAGE
instacart_ordersTableTransaction log with order timing and reorder patternsKey dataset for reorder analysisACTIVEVERIFIEDandrewAttribute, Finance, Cost_center, ConfidentialTRUE
dwh_dmatrizcampanaTableCentral source of truth for date, holiday, and fiscal periodsACTIVEVERIFIEDAttribute, Customer Service, ConfidentialFALSE

Retrieve asset enrichment with custom metadata

USE <database>;
-- ============================================
-- ASSET ENRICHMENT WITH CUSTOM METADATA SCORES
-- ============================================

WITH CM_DETAILS AS (
SELECT
CM.GUID,

-- Create JSON object using LISTAGG and PARSE_JSON
PARSE_JSON(
'{' ||
LISTAGG(
'"' || CM.attributeName || '":"' ||
REPLACE(COALESCE(CM.attributeValue, ''), '"', '\\"') || '"',
','
) WITHIN GROUP (ORDER BY CM.attributeName)
|| '}'
) AS CM_ATTRIBUTES_JSON

FROM entity_metadata.CustomMetadata CM
WHERE
CM.STATUS = 'ACTIVE'
AND CM.customMetadataSetName = 'AI Readiness' -- 🔧 CUSTOMIZE
AND CM.attributeValue IS NOT NULL
GROUP BY CM.GUID
)

SELECT
A.asset_name,
A.guid,
A.asset_qualified_name,
A.asset_type,
A.description,
A.user_description,
R.description AS README_TEXT,
A.status,
A.certificate_status,
A.owner_users,
tr.TAGS,
A.popularity_score,
A.has_lineage,

-- All Custom Metadata attributes as JSON
CMS.CM_ATTRIBUTES_JSON

FROM gold.assets A
LEFT JOIN entity_metadata.Readme R ON A.readme_guid = R.GUID
LEFT JOIN CM_DETAILS CMS ON A.guid = CMS.GUID
LEFT JOIN (
SELECT guid, ARRAY_AGG(tagName) AS TAGS
FROM entity_metadata.TagRelationship
WHERE status = 'ACTIVE'
GROUP BY guid
) tr ON A.guid = tr.guid

WHERE
A.asset_type IN ('Table', 'Column', 'View')
AND A.connector_name IN ('snowflake', 'redshift', 'bigquery')
AND A.status = 'ACTIVE'
AND CMS.CM_ATTRIBUTES_JSON IS NOT NULL
AND A.owner_users IS NOT NULL

LIMIT 5;

Replace the owner value, such as [email protected], to match your environment.

Sample output
ASSET_NAMEASSET_TYPEDESCRIPTIONSTATUSCERTIFICATE_STATUSOWNER_USERSHAS_LINEAGECM_ATTRIBUTES_JSON
ACCOUNTSViewACTIVEFALSEpii_risk_level_for_ai: medium
POSITIONSTableProvides details of job roles or positionsACTIVEVERIFIEDraviFALSEai_certification_status: In Review, pii_risk_level_for_ai: medium
average_sale_price_per_model_per_year_apacTableACTIVEVERIFIEDchristopher.perro, esthephany.ayalaTRUEpii_risk_level_for_ai: medium
INSTACART_ALL_ORDER_PRODUCTS_USERTableComprehensive record of customer ordersACTIVEVERIFIEDbryanTRUErepresentativeness_checked: True
CLIENT_BRANCH_LOAN_CLEANSEDTableInformation on individual loans and branch revenueACTIVEVERIFIEDsean.uptigroveTRUEpii_risk_level_for_ai: high, representativeness_checked: True