pvw-cli 1.0.8__tar.gz → 1.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pvw-cli might be problematic. Click here for more details.

Files changed (65) hide show
  1. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/PKG-INFO +360 -18
  2. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/README.md +359 -17
  3. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/__init__.py +1 -1
  4. pvw_cli-1.0.9/purviewcli/cli/search.py +319 -0
  5. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/unified_catalog.py +188 -97
  6. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_unified_catalog.py +68 -22
  7. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/sync_client.py +6 -6
  8. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/pvw_cli.egg-info/PKG-INFO +360 -18
  9. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/pyproject.toml +1 -1
  10. pvw_cli-1.0.8/purviewcli/cli/search.py +0 -128
  11. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/__main__.py +0 -0
  12. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/__init__.py +0 -0
  13. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/account.py +0 -0
  14. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/cli.py +0 -0
  15. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/collections.py +0 -0
  16. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/domain.py +0 -0
  17. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/entity.py +0 -0
  18. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/glossary.py +0 -0
  19. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/insight.py +0 -0
  20. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/lineage.py +0 -0
  21. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/management.py +0 -0
  22. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/policystore.py +0 -0
  23. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/relationship.py +0 -0
  24. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/scan.py +0 -0
  25. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/share.py +0 -0
  26. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/types.py +0 -0
  27. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/cli/workflow.py +0 -0
  28. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/__init__.py +0 -0
  29. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_account.py +0 -0
  30. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_collections.py +0 -0
  31. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_domain.py +0 -0
  32. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_entity.py +0 -0
  33. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_glossary.py +0 -0
  34. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_insight.py +0 -0
  35. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_lineage.py +0 -0
  36. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_management.py +0 -0
  37. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_policystore.py +0 -0
  38. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_relationship.py +0 -0
  39. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_scan.py +0 -0
  40. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_search.py +0 -0
  41. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_share.py +0 -0
  42. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_types.py +0 -0
  43. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/_workflow.py +0 -0
  44. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/api_client.py +0 -0
  45. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/business_rules.py +0 -0
  46. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/config.py +0 -0
  47. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/data_quality.py +0 -0
  48. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/endpoint.py +0 -0
  49. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/endpoints.py +0 -0
  50. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/exceptions.py +0 -0
  51. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/lineage_visualization.py +0 -0
  52. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/monitoring_dashboard.py +0 -0
  53. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/rate_limiter.py +0 -0
  54. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/retry_handler.py +0 -0
  55. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/scanning_operations.py +0 -0
  56. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/client/settings.py +0 -0
  57. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/plugins/__init__.py +0 -0
  58. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/purviewcli/plugins/plugin_system.py +0 -0
  59. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/pvw_cli.egg-info/SOURCES.txt +0 -0
  60. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/pvw_cli.egg-info/dependency_links.txt +0 -0
  61. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/pvw_cli.egg-info/entry_points.txt +0 -0
  62. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/pvw_cli.egg-info/not-zip-safe +0 -0
  63. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/pvw_cli.egg-info/requires.txt +0 -0
  64. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/pvw_cli.egg-info/top_level.txt +0 -0
  65. {pvw_cli-1.0.8 → pvw_cli-1.0.9}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pvw-cli
3
- Version: 1.0.8
3
+ Version: 1.0.9
4
4
  Summary: Microsoft Purview CLI with comprehensive automation capabilities
5
5
  Author-email: AYOUB KEBAILI <keayoub@msn.com>
6
6
  Maintainer-email: AYOUB KEBAILI <keayoub@msn.com>
@@ -60,7 +60,7 @@ Requires-Dist: pytest-asyncio>=0.20.0; extra == "test"
60
60
  Requires-Dist: pytest-cov>=4.0.0; extra == "test"
61
61
  Requires-Dist: requests-mock>=1.9.0; extra == "test"
62
62
 
63
- # PURVIEW CLI v1.0.8 - Microsoft Purview Automation & Data Governance
63
+ # PURVIEW CLI v1.0.9 - Microsoft Purview Automation & Data Governance
64
64
 
65
65
  > **LATEST UPDATE (September 2025):**
66
66
  > - **🚀 MAJOR: Complete Microsoft Purview Unified Catalog (UC) Support** (see new `uc` command group)
@@ -74,7 +74,7 @@ Requires-Dist: requests-mock>=1.9.0; extra == "test"
74
74
 
75
75
  ## What is PVW CLI?
76
76
 
77
- **PVW CLI v1.0.8** is a modern, full-featured command-line interface and Python library for Microsoft Purview. It enables automation and management of *all major Purview APIs* including:
77
+ **PVW CLI v1.0.9** is a modern, full-featured command-line interface and Python library for Microsoft Purview. It enables automation and management of *all major Purview APIs* including:
78
78
 
79
79
  - **NEW Unified Catalog (UC) Management** - Complete governance domains, glossary terms, data products, OKRs, CDEs (NEW)
80
80
  - Entity management (create, update, bulk, import/export)
@@ -100,10 +100,15 @@ Get started with PVW CLI in minutes:
100
100
  pip install pvw-cli
101
101
  ```
102
102
 
103
- 2. **Set Environment Variables**
103
+ 2. **Set Required Environment Variables**
104
104
 
105
105
  ```bash
106
+ # Required for Purview API access
106
107
  set PURVIEW_ACCOUNT_NAME=your-purview-account
108
+ set PURVIEW_ACCOUNT_ID=your-purview-account-id-guid
109
+ set PURVIEW_RESOURCE_GROUP=your-resource-group-name
110
+
111
+ # Optional
107
112
  set AZURE_REGION= # (optional, e.g. 'china', 'usgov')
108
113
  ```
109
114
 
@@ -137,7 +142,7 @@ For more advanced usage, see the sections below or visit the [documentation](htt
137
142
 
138
143
  ## Overview
139
144
 
140
- **PVW CLI v1.0.8** is a modern command-line interface and Python library for Microsoft Purview, enabling:
145
+ **PVW CLI v1.0.9** is a modern command-line interface and Python library for Microsoft Purview, enabling:
141
146
 
142
147
  - Advanced data catalog search and discovery
143
148
  - Bulk import/export of entities, glossary terms, and lineage
@@ -190,10 +195,15 @@ pip install -e .
190
195
  pip install pvw-cli
191
196
  ```
192
197
 
193
- 2. **Set Environment Variables**
198
+ 2. **Set Required Environment Variables**
194
199
 
195
200
  ```bash
201
+ # Required for Purview API access
196
202
  set PURVIEW_ACCOUNT_NAME=your-purview-account
203
+ set PURVIEW_ACCOUNT_ID=your-purview-account-id-guid
204
+ set PURVIEW_RESOURCE_GROUP=your-resource-group-name
205
+
206
+ # Optional
197
207
  set AZURE_REGION= # (optional, e.g. 'china', 'usgov')
198
208
  ```
199
209
 
@@ -269,6 +279,119 @@ For more details, see the [Azure Identity documentation](https://learn.microsoft
269
279
 
270
280
  ---
271
281
 
282
+ ## Required Purview Configuration
283
+
284
+ Before using PVW CLI, you need to set three essential environment variables. Here's how to find them:
285
+
286
+ ### 🔍 **How to Find Your Purview Values**
287
+
288
+ #### **1. PURVIEW_ACCOUNT_NAME**
289
+ - This is your Purview account name as it appears in Azure Portal
290
+ - Example: `kaydemopurview`
291
+
292
+ #### **2. PURVIEW_ACCOUNT_ID**
293
+ - This is the GUID that identifies your Purview account for Unified Catalog APIs
294
+ - **✅ Important: For most Purview deployments, this is your Azure Tenant ID**
295
+
296
+ - **Method 1 - Get your Tenant ID (recommended):**
297
+
298
+ **Bash/Command Prompt:**
299
+ ```bash
300
+ az account show --query tenantId -o tsv
301
+ ```
302
+
303
+ **PowerShell:**
304
+ ```powershell
305
+ az account show --query tenantId -o tsv
306
+ # Or store directly in environment variable:
307
+ $env:PURVIEW_ACCOUNT_ID = az account show --query tenantId -o tsv
308
+ ```
309
+
310
+ - **Method 2 - Azure CLI (extract from Atlas endpoint):**
311
+ ```bash
312
+ az purview account show --name YOUR_ACCOUNT_NAME --resource-group YOUR_RG --query endpoints.catalog -o tsv
313
+ ```
314
+ Extract the GUID from the URL (before `-api.purview-service.microsoft.com`)
315
+
316
+ - **Method 3 - Azure Portal:**
317
+ 1. Go to your Purview account in Azure Portal
318
+ 2. Navigate to Properties → Atlas endpoint URL
319
+ 3. Extract GUID from: `https://GUID-api.purview-service.microsoft.com/catalog`
320
+
321
+ #### **3. PURVIEW_RESOURCE_GROUP**
322
+ - The Azure resource group containing your Purview account
323
+ - Example: `fabric-artifacts`
324
+
325
+ ### 📋 **Setting the Variables**
326
+
327
+ **Windows Command Prompt:**
328
+ ```cmd
329
+ set PURVIEW_ACCOUNT_NAME=your-purview-account
330
+ set PURVIEW_ACCOUNT_ID=your-purview-account-id
331
+ set PURVIEW_RESOURCE_GROUP=your-resource-group
332
+ ```
333
+
334
+ **Windows PowerShell:**
335
+ ```powershell
336
+ $env:PURVIEW_ACCOUNT_NAME="your-purview-account"
337
+ $env:PURVIEW_ACCOUNT_ID="your-purview-account-id"
338
+ $env:PURVIEW_RESOURCE_GROUP="your-resource-group"
339
+ ```
340
+
341
+ **Linux/macOS:**
342
+ ```bash
343
+ export PURVIEW_ACCOUNT_NAME=your-purview-account
344
+ export PURVIEW_ACCOUNT_ID=your-purview-account-id
345
+ export PURVIEW_RESOURCE_GROUP=your-resource-group
346
+ ```
347
+
348
+ **Permanent (Windows Command Prompt):**
349
+ ```cmd
350
+ setx PURVIEW_ACCOUNT_NAME "your-purview-account"
351
+ setx PURVIEW_ACCOUNT_ID "your-purview-account-id"
352
+ setx PURVIEW_RESOURCE_GROUP "your-resource-group"
353
+ ```
354
+
355
+ **Permanent (Windows PowerShell):**
356
+ ```powershell
357
+ [Environment]::SetEnvironmentVariable("PURVIEW_ACCOUNT_NAME", "your-purview-account", "User")
358
+ [Environment]::SetEnvironmentVariable("PURVIEW_ACCOUNT_ID", "your-purview-account-id", "User")
359
+ [Environment]::SetEnvironmentVariable("PURVIEW_RESOURCE_GROUP", "your-resource-group", "User")
360
+ ```
361
+
362
+ ### 🔧 **Debug Environment Issues**
363
+
364
+ If you experience issues with environment variables between different terminals, use these debug commands:
365
+
366
+ **Command Prompt/Bash:**
367
+ ```bash
368
+ # Run this to check your current environment
369
+ python -c "
370
+ import os
371
+ print('PURVIEW_ACCOUNT_NAME:', os.getenv('PURVIEW_ACCOUNT_NAME'))
372
+ print('PURVIEW_ACCOUNT_ID:', os.getenv('PURVIEW_ACCOUNT_ID'))
373
+ print('PURVIEW_RESOURCE_GROUP:', os.getenv('PURVIEW_RESOURCE_GROUP'))
374
+ "
375
+ ```
376
+
377
+ **PowerShell:**
378
+ ```powershell
379
+ # Check environment variables in PowerShell
380
+ python -c "
381
+ import os
382
+ print('PURVIEW_ACCOUNT_NAME:', os.getenv('PURVIEW_ACCOUNT_NAME'))
383
+ print('PURVIEW_ACCOUNT_ID:', os.getenv('PURVIEW_ACCOUNT_ID'))
384
+ print('PURVIEW_RESOURCE_GROUP:', os.getenv('PURVIEW_RESOURCE_GROUP'))
385
+ "
386
+
387
+ # Or use PowerShell native commands
388
+ Write-Host "PURVIEW_ACCOUNT_NAME: $env:PURVIEW_ACCOUNT_NAME"
389
+ Write-Host "PURVIEW_ACCOUNT_ID: $env:PURVIEW_ACCOUNT_ID"
390
+ Write-Host "PURVIEW_RESOURCE_GROUP: $env:PURVIEW_RESOURCE_GROUP"
391
+ ```
392
+
393
+ ---
394
+
272
395
  ## Search Command (Discovery Query API)
273
396
 
274
397
  The PVW CLI provides advanced search using the latest Microsoft Purview Discovery Query API:
@@ -279,6 +402,28 @@ The PVW CLI provides advanced search using the latest Microsoft Purview Discover
279
402
 
280
403
  ### CLI Usage Examples
281
404
 
405
+ #### 🎯 **Multiple Output Formats**
406
+
407
+ ```bash
408
+ # 1. Table Format (Default) - Quick overview
409
+ pvw search query --keywords="customer" --limit=5
410
+ # → Clean table with Name, Type, Collection, Classifications, Qualified Name
411
+
412
+ # 2. Detailed Format - Human-readable with all metadata
413
+ pvw search query --keywords="customer" --limit=5 --detailed
414
+ # → Rich panels showing full details, timestamps, search scores
415
+
416
+ # 3. JSON Format - Complete technical details with syntax highlighting (WELL-FORMATTED)
417
+ pvw search query --keywords="customer" --limit=5 --json
418
+ # → Full JSON response with indentation, line numbers and color coding
419
+
420
+ # 4. Table with IDs - For entity operations
421
+ pvw search query --keywords="customer" --limit=5 --show-ids
422
+ # → Table format + entity GUIDs for copy/paste into update commands
423
+ ```
424
+
425
+ #### 🔍 **Search Operations**
426
+
282
427
  ```bash
283
428
  # Basic search for assets with keyword 'customer'
284
429
  pvw search query --keywords="customer" --limit=5
@@ -286,12 +431,29 @@ pvw search query --keywords="customer" --limit=5
286
431
  # Advanced search with classification filter
287
432
  pvw search query --keywords="sales" --classification="PII" --objectType="Tables" --limit=10
288
433
 
434
+ # Pagination through large result sets
435
+ pvw search query --keywords="SQL" --offset=10 --limit=5
436
+
289
437
  # Autocomplete suggestions for partial keyword
290
438
  pvw search autocomplete --keywords="ord" --limit=3
291
439
 
292
440
  # Get search suggestions (fuzzy matching)
293
441
  pvw search suggest --keywords="prod" --limit=2
294
442
 
443
+ **⚠️ IMPORTANT - Command Line Quoting:**
444
+ ```cmd
445
+ # ✅ CORRECT - Use quotes around keywords
446
+ pvw search query --keywords="customer" --limit=5
447
+
448
+ # ✅ CORRECT - For wildcard searches, use quotes
449
+ pvw search query --keywords="*" --limit=5
450
+
451
+ # ❌ WRONG - Don't use unquoted * (shell expands to file names)
452
+ pvw search query --keywords=* --limit=5
453
+ # This causes: "Error: Got unexpected extra arguments (dist doc ...)"
454
+ ```
455
+
456
+ ```bash
295
457
  # Faceted search with aggregation
296
458
  pvw search query --keywords="finance" --facetFields="objectType,classification" --limit=5
297
459
 
@@ -302,9 +464,16 @@ pvw search browse --entityType="Tables" --path="/root/finance" --limit=2
302
464
  pvw search query --keywords="audit" --createdAfter="2024-01-01" --limit=1
303
465
 
304
466
  # Entity type specific search
305
- pvw search query --entityTypes="Files,Tables" --limit=2
467
+ pvw search query --keywords="finance" --entityTypes="Files,Tables" --limit=2
306
468
  ```
307
469
 
470
+ #### 💡 **Usage Scenarios**
471
+
472
+ - **Daily browsing**: Use default table format for quick scans
473
+ - **Understanding assets**: Use `--detailed` for rich information panels
474
+ - **Technical work**: Use `--json` for complete API data access
475
+ - **Entity operations**: Use `--show-ids` to get GUIDs for updates
476
+
308
477
  ### Python Usage Example
309
478
 
310
479
  ```python
@@ -341,26 +510,199 @@ See [`doc/commands/unified-catalog.md`](doc/commands/unified-catalog.md) for com
341
510
 
342
511
  ### Quick UC Examples
343
512
 
513
+ #### 🏛️ **Governance Domains Management**
514
+
344
515
  ```bash
345
- # Governance Domains
516
+ # List all governance domains
346
517
  pvw uc domain list
347
- pvw uc domain create --name "Finance" --description "Financial governance"
348
518
 
349
- # Glossary Terms
519
+ # Create a new governance domain
520
+ pvw uc domain create --name "Finance" --description "Financial data governance domain"
521
+
522
+ # Get domain details
523
+ pvw uc domain get --domain-id "abc-123-def-456"
524
+
525
+ # Update domain information
526
+ pvw uc domain update --domain-id "abc-123" --description "Updated financial governance"
527
+ ```
528
+
529
+ #### 📖 **Glossary Terms in UC**
530
+
531
+ ```bash
532
+ # List all terms in a domain
350
533
  pvw uc term list --domain-id "abc-123"
351
- pvw uc term create --name "Customer" --domain-id "abc-123"
352
534
 
353
- # Data Products
535
+ # Create a new glossary term
536
+ pvw uc term create --name "Customer" --domain-id "abc-123" --definition "A person or entity that purchases products"
537
+
538
+ # Get term details with relationships
539
+ pvw uc term get --term-id "term-456" --domain-id "abc-123"
540
+
541
+ # Link terms to data assets
542
+ pvw uc term assign --term-id "term-456" --asset-id "asset-789" --domain-id "abc-123"
543
+ ```
544
+
545
+ #### 📦 **Data Products Management**
546
+
547
+ ```bash
548
+ # List all data products in a domain
354
549
  pvw uc dataproduct list --domain-id "abc-123"
355
- pvw uc dataproduct create --name "Customer Analytics" --domain-id "abc-123"
356
550
 
357
- # Objectives & Key Results (OKRs)
358
- pvw uc objective list --domain-id "abc-123"
359
- pvw uc objective create --definition "Improve data quality by 20%" --domain-id "abc-123"
551
+ # Create a comprehensive data product
552
+ pvw uc dataproduct create \
553
+ --name "Customer Analytics Dashboard" \
554
+ --domain-id "abc-123" \
555
+ --description "360-degree customer analytics with behavioral insights" \
556
+ --owner "data-team@company.com"
557
+
558
+ # Get detailed data product information
559
+ pvw uc dataproduct get --product-id "prod-789" --domain-id "abc-123"
560
+
561
+ # Update data product metadata
562
+ pvw uc dataproduct update \
563
+ --product-id "prod-789" \
564
+ --domain-id "abc-123" \
565
+ --status "active" \
566
+ --version "v2.1.0"
567
+
568
+ # Add data assets to a data product
569
+ pvw uc dataproduct add-asset \
570
+ --product-id "prod-789" \
571
+ --domain-id "abc-123" \
572
+ --asset-id "ece43ce5-ac45-4e50-a4d0-365a64299efc"
573
+ ```
574
+
575
+ #### 🎯 **Objectives & Key Results (OKRs)**
576
+
577
+ ```bash
578
+ # List objectives for a domain
579
+ pvw uc objective list --domain-id "abc-123"
580
+
581
+ # Create measurable objectives
582
+ pvw uc objective create \
583
+ --definition "Improve data quality score by 25% within Q4" \
584
+ --domain-id "abc-123" \
585
+ --target-value "95" \
586
+ --measurement-unit "percentage"
587
+
588
+ # Track objective progress
589
+ pvw uc objective update \
590
+ --objective-id "obj-456" \
591
+ --domain-id "abc-123" \
592
+ --current-value "87" \
593
+ --status "in-progress"
594
+ ```
595
+
596
+ #### 🔑 **Critical Data Elements (CDEs)**
360
597
 
361
- # Critical Data Elements (CDEs)
598
+ ```bash
599
+ # List critical data elements
362
600
  pvw uc cde list --domain-id "abc-123"
363
- pvw uc cde create --name "SSN" --data-type "String" --domain-id "abc-123"
601
+
602
+ # Define critical data elements with governance rules
603
+ pvw uc cde create \
604
+ --name "Social Security Number" \
605
+ --data-type "String" \
606
+ --domain-id "abc-123" \
607
+ --classification "PII" \
608
+ --retention-period "7-years"
609
+
610
+ # Associate CDEs with data assets
611
+ pvw uc cde link \
612
+ --cde-id "cde-789" \
613
+ --domain-id "abc-123" \
614
+ --asset-id "ea3412c3-7387-4bc1-9923-11f6f6f60000"
615
+ ```
616
+
617
+ #### 🔄 **Integrated Workflow Example**
618
+
619
+ ```bash
620
+ # 1. Discover assets to govern
621
+ pvw search query --keywords="customer" --detailed
622
+
623
+ # 2. Create governance domain for discovered assets
624
+ pvw uc domain create --name "Customer Data" --description "Customer information governance"
625
+
626
+ # 3. Define governance terms
627
+ pvw uc term create --name "Customer PII" --domain-id "new-domain-id" --definition "Personal customer information"
628
+
629
+ # 4. Create data product from discovered assets
630
+ pvw uc dataproduct create --name "Customer Master Data" --domain-id "new-domain-id"
631
+
632
+ # 5. Set governance objectives
633
+ pvw uc objective create --definition "Ensure 100% PII classification compliance" --domain-id "new-domain-id"
634
+ ```
635
+
636
+ ---
637
+
638
+ ## Entity Management & Updates
639
+
640
+ PVW CLI provides comprehensive entity management capabilities for updating Purview assets like descriptions, classifications, and custom attributes.
641
+
642
+ ### 🔄 **Entity Update Examples**
643
+
644
+ #### **Update Asset Descriptions**
645
+
646
+ ```bash
647
+ # Update table description using GUID
648
+ pvw entity update-attribute \
649
+ --guid "ece43ce5-ac45-4e50-a4d0-365a64299efc" \
650
+ --attribute "description" \
651
+ --value "Updated customer data warehouse table with enhanced analytics"
652
+
653
+ # Update dataset description using qualified name
654
+ pvw entity update-attribute \
655
+ --qualifiedName "https://app.powerbi.com/groups/abc-123/datasets/def-456" \
656
+ --attribute "description" \
657
+ --value "Power BI dataset for customer analytics dashboard"
658
+ ```
659
+
660
+ #### **Bulk Entity Operations**
661
+
662
+ ```bash
663
+ # Read entity details before updating
664
+ pvw entity read-by-attribute \
665
+ --guid "ea3412c3-7387-4bc1-9923-11f6f6f60000" \
666
+ --attribute "description,classifications,customAttributes"
667
+
668
+ # Update multiple attributes at once
669
+ pvw entity update-bulk \
670
+ --input-file entities_to_update.json \
671
+ --output-file update_results.json
672
+ ```
673
+
674
+ #### **Column-Level Updates**
675
+
676
+ ```bash
677
+ # Update specific column descriptions in a table
678
+ pvw entity update-attribute \
679
+ --guid "column-guid-123" \
680
+ --attribute "description" \
681
+ --value "Customer unique identifier - Primary Key"
682
+
683
+ # Add classifications to sensitive columns
684
+ pvw entity add-classification \
685
+ --guid "column-guid-456" \
686
+ --classification "MICROSOFT.PERSONAL.EMAIL"
687
+ ```
688
+
689
+ ### 🔍 **Discovery to Update Workflow**
690
+
691
+ ```bash
692
+ # 1. Find assets that need updates
693
+ pvw search query --keywords="customer table" --show-ids --limit=10
694
+
695
+ # 2. Get detailed information about a specific asset
696
+ pvw entity read-by-attribute --guid "FOUND_GUID" --attribute "description,classifications"
697
+
698
+ # 3. Update the asset description
699
+ pvw entity update-attribute \
700
+ --guid "FOUND_GUID" \
701
+ --attribute "description" \
702
+ --value "Updated description based on business requirements"
703
+
704
+ # 4. Verify the update
705
+ pvw search query --keywords="FOUND_GUID" --detailed
364
706
  ```
365
707
 
366
708
  ---