Skip to content

Templates & Downloads

Use these ready-made templates to speed up bulk operations in Microsoft Purview with pvw-cli. Each file matches the exact column format expected by the corresponding CLI import command, so you can start from a known-good structure, fill in your data, and avoid format errors on first import.

Quick workflow

Download a template → fill in your data → run the matching pvw import command → validate with --dry-run before committing.


CSV Templates

Unified Catalog Terms

Template Purpose Download Key Columns
uc_terms_bulk_example.csv Import UC terms in bulk (8 sample rows) Download name, description, status, acronym, owner_id, resource_name, resource_url
uc_terms_all_fields_example.csv UC term import with all optional fields populated Download name, description, status, acronym, owner_id, resource_name, resource_url
uc_terms_bulk_update_example.csv Bulk update attributes of existing UC terms Download term_id, name, description, status
uc_terms_multivalue_example.csv Terms with multi-value fields (synonyms, contacts) Download name, status, synonyms, contacts

Import command:

# Dry run first — validates format without making changes
pvw uc term import-csv --csv-file samples/csv/uc_terms_bulk_example.csv --domain-id "your-domain-guid" --dry-run

# Live import
pvw uc term import-csv --csv-file samples/csv/uc_terms_bulk_example.csv --domain-id "your-domain-guid"

owner_id field

The owner_id column requires an Entra ID Object ID (GUID), not an email address. Retrieve it with: az ad user show --id user@company.com --query id -o tsv


Lineage

Template Purpose Download Key Columns
lineage_example.csv Table-level lineage import Download source_entity_guid, target_entity_guid, relationship_type, process_name, description, confidence_score, owner, metadata
lineage_example_with_columns.csv Column-level lineage import Download source_entity_guid, target_entity_guid, source_column, target_column, process_name
basic_lineage_sample.csv Minimal lineage starter — two entities and a process Download source_entity_guid, target_entity_guid, process_name
column_lineage_sample.csv Sample for column-level tracking Download source_entity_guid, target_entity_guid, source_column, target_column

Import command:

pvw lineage validate lineage_example.csv
pvw lineage import lineage_example.csv


Entities

Template Purpose Download Key Columns
entity_bulk_update_example.csv Bulk update entity attributes Download typeName, qualifiedName, displayName, description, owner, source, collection
dataset_import_sample.csv Dataset entity onboarding Download name, description, owner_email, source_system, tags, location, format
bulk_create_with_classifications.csv Create entities with classifications Download name, typeName, qualifiedName, classifications
table_import_sample.csv Table-type entity import Download name, typeName, qualifiedName, description

Import command:

pvw entity bulk-update-csv --csv-file entity_bulk_update_example.csv


Classic Glossary

Template Purpose Download Key Columns
glossary_terms_sample.csv Classic glossary term import Download name, glossary_guid, description, short_description, status, definition, examples
term_assignments_sample.csv Assign glossary terms to entities Download term_guid, entity_guid

JSON Templates

Terms & Glossary

Template Purpose Download
term/uc_terms_bulk_example.json UC term bulk import (JSON format) Download
term/uc_terms_bulk_update_example.json Bulk update UC terms (JSON format) Download
glossary/term.json Single classic glossary term payload Download
glossary/terms.json Multiple classic glossary terms Download

Entities

Template Purpose Download
entity/entity.json Single entity create/update payload Download
entity/entities.json Bulk entity payload Download
entity/column_entities.json Column-type entities Download

Scan Configuration

Template Purpose Download
scan/scan_source.json Register a data source for scanning Download
scan/scan.json Scan definition payload Download
scan/scan_trigger.json Scheduled scan trigger Download
scan/classification_rule.json Custom classification rule Download

Relationships

Template Purpose Download
relationship/create.json Create a relationship between two entities Download
relationship/update.json Update an existing relationship Download

Business Metadata

These templates define business metadata attribute sets for different governance domains:

Template Purpose Download
business_metadata/business_metadata_universal.json Universal business metadata (applies to any asset type) Download
business_metadata/business_metadata_governance.json Governance-focused metadata attributes Download
business_metadata/business_metadata_privacy.json Privacy and classification metadata Download
business_metadata/business_metadata_quality.json Data quality attributes Download
business_metadata/business_metadata_dataproduct.json Data product metadata Download

Usage:

# Create business metadata type definition from template
pvw types createTypeDefs --payload-file samples/json/business_metadata/business_metadata_governance.json

# Apply business metadata to an entity
pvw entity add-business-metadata \
  --guid "entity-guid" \
  --bm-name "Governance" \
  --attr-name "DataOwner" \
  --attr-value "data-team"


PowerShell Scripts

These scripts combine multiple CLI calls into complete workflows. Download and customise for your environment.

Script Purpose Download
Complete-Sync-Example.ps1 Full end-to-end UC → Classic Glossary sync with logging Download
Sync-UCToClassicGlossary.ps1 Sync Unified Catalog terms to Classic Glossary Download
create_lineage_interactive.ps1 Interactive lineage creation with guided prompts Download
create_business_metadata.ps1 Create and apply business metadata in batch Download
delete-all-uc-terms.ps1 Remove all UC terms from a domain (use carefully) Download
Remove-PurviewAsset-Batch.ps1 Batch-delete Purview assets by filter Download
List-AllPurviewCollections.ps1 List the full collections hierarchy Download

Usage Examples

Example 1 — Import UC terms from a CSV template

# 1. Download the template
curl -L "https://github.com/Keayoub/pvw-cli/raw/main/samples/csv/uc_terms_bulk_example.csv" -o terms_template.csv

# 2. Edit the CSV with your data (name, description, status, owner_id...)
# 3. Dry-run to validate
pvw uc term import-csv --csv-file terms_template.csv --domain-id $DOMAIN_ID --dry-run

# 4. Run the live import
pvw uc term import-csv --csv-file terms_template.csv --domain-id $DOMAIN_ID

Example 2 — Import lineage from a CSV template

# 1. Get GUIDs for your source and target entities
pvw search query --keywords "sales table" --output json | jq '.[].id'

# 2. Download template and fill in the GUIDs
curl -L "https://github.com/Keayoub/pvw-cli/raw/main/samples/csv/lineage_example.csv" -o lineage.csv

# 3. Validate
pvw lineage validate lineage.csv

# 4. Import
pvw lineage import lineage.csv

Example 3 — Bulk update entities from a CSV template

# 1. Download and populate the entity update template
curl -L "https://github.com/Keayoub/pvw-cli/raw/main/samples/csv/entity_bulk_update_example.csv" -o entity_update.csv

# 2. Import
pvw entity bulk-import --csv-file entity_update.csv

Example 4 — Register a data source using a JSON template

# 1. Download the scan source template
curl -L "https://github.com/Keayoub/pvw-cli/raw/main/samples/json/scan/scan_source.json" -o scan_source.json

# 2. Edit: set name, kind (e.g., AzureSqlDatabase), scanResults endpoint
# 3. Register
pvw scan putDataSource --data-source-name "my-sql-db" --payload-file scan_source.json

Example 5 — Apply business metadata using a JSON template (PowerShell)

# Download and customise the universal template
Invoke-WebRequest "https://github.com/Keayoub/pvw-cli/raw/main/samples/json/business_metadata/business_metadata_universal.json" -OutFile business_metadata_universal.json

# Create the type definition
pvw types createTypeDefs --payload-file business_metadata_universal.json

# Apply to an entity
pvw entity add-business-metadata `
  --guid "4fae348b-e960-42f7-834c-38f6f6f60000" `
  --bm-name "Universal" `
  --attr-name "DataSteward" `
  --attr-value "governance-team"