<jupyter_start><jupyter_text>Policystore<jupyter_code># Install/Upgrade purviewcli package
%pip install --upgrade purviewcli
# Environment Variables
%env PURVIEW_NAME=pvdemod4z5v-pv
# %env PURVIEW_NAME=YOUR_PURVIEW_ACCOUNT
# %env AZURE_CLIENT_ID=YOUR_CLIENT_ID
# %env AZURE_TENANT_ID=YOUR_TENANT_ID
# %env AZURE_CLIENT_SECRET=YOUR_CLIENT_SECRET
# Commands
!pv policystore --help<jupyter_output><empty_output><jupyter_text>Get Metadata Roles<jupyter_code># Lists roles for Azure Purview account
!pv policystore readMetadataRoles<jupyter_output><empty_output><jupyter_text>Get Metadata Policy<jupyter_code># Get a metadata policy by collection name
!pv policystore readMetadataPolicy --collectionName "afwbxs"
# Get a metadata policy by policy id
!pv policystore readMetadataPolicy --policyId "d5281344-20e0-404a-bce8-def420380cbf"<jupyter_output><empty_output><jupyter_text>Get Metadata Policies<jupyter_code># List metadata policies
!pv policystore readMetadataPolicies<jupyter_output><empty_output><jupyter_text>Updata Metadata Policies<jupyter_code># Updates a metadata policy
!pv policystore putMetadataPolicy --policyId "d5281344-20e0-404a-bce8-def420380cbf" --payload-file "C:\Users\tarifat\Downloads\purviewcli\samples\json\policystore\policy.json"<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08641975308641975, 'fraction_numerical': 0.032407407407407406, 'mean_word_length': 8.75187969924812, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '32455', 'license': 'MIT', 'n_tokens_mistral': 516, 'n_tokens_neox': 480, 'n_words': 82, 'path': 'samples/notebooks (basic)/policystore.ipynb', 'repo_name': 'mdrakiburrahman/purviewcli', 'size': '1296'}