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:

You can run these queries directly on the ASSETS and README tables (and related metadata tables) in your Lakehouse 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, -- Asset-level documentation
A.STATUS, -- Lifecycle status: ACTIVE, DELETED
A.CERTIFICATE_STATUS, -- Certification state: VERIFIED, DRAFT, DEPRECATED
A.OWNER_USERS, -- Array of asset owners
A.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
ASSETS A
LEFT JOIN
README R
ON A.README_GUID = R.GUID -- Join README content to the asset
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_TYPEDESCRIPTIONSTATUSCERTIFICATE_STATUSOWNER_USERSTAGSHAS_LINEAGE
instacart_ordersTableTransaction log with order timing and reorder patternsACTIVEVERIFIEDandrewAttribute, 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 ATLAN_GOLD;
-- ============================================
-- ASSET ENRICHMENT WITH CUSTOM METADATA SCORES
-- ============================================

WITH CM_DETAILS AS (
SELECT
CM.ASSET_GUID,

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

FROM CUSTOM_METADATA CM
WHERE
CM.STATUS = 'ACTIVE'
AND CM.CUSTOM_METADATA_NAME = 'AI Readiness' -- 🔧 CUSTOMIZE
AND CM.ATTRIBUTE_VALUE IS NOT NULL
GROUP BY CM.ASSET_GUID
)

SELECT
A.ASSET_NAME,
A.GUID,
A.ASSET_QUALIFIED_NAME,
A.ASSET_TYPE,
A.DESCRIPTION,
R.DESCRIPTION AS README_TEXT,
A.STATUS,
A.CERTIFICATE_STATUS,
A.OWNER_USERS,
A.TAGS,
A.POPULARITY_SCORE,
A.HAS_LINEAGE,

-- All Custom Metadata attributes as JSON
CMS.CM_ATTRIBUTES_JSON,


FROM ASSETS A
LEFT JOIN README R ON A.README_GUID = R.GUID
LEFT JOIN CM_DETAILS CMS ON A.GUID = CMS.ASSET_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