Author a subscription policy using the V2 API
/api/v2/policyname: Anyone
policyKey: subscription anyone
type
actions objectapprovals arrayentitlements objectcircumstances arraycertification objectname: Entitlement
policyKey: subscription entitlements
type: subscription
actions:
type: entitlements
entitlements:
operator: any
groups:
- Employee
attributes:
- name: auth1
value: SOMETHING_ELSE
automaticSubscription: true
allowDiscovery: false
description: Some description here
circumstances:
- type: columnRegex
regex: ssn
caseInsensitive: false
staged: falsename: Advanced Entitlement
policyKey: subscription entitlements advanced boolean
type: subscription
actions:
type: entitlements
advanced: "@isInGroups('Engineers', 'Founders') AND @hasAttribute('Auth1', 'Super Secret')"
automaticSubscription: true
allowDiscovery: false
description: Some description here
circumstances:
- type: columnRegex
regex: ssn
caseInsensitive: false
staged: falsename: Manual
policyKey: subscription manual
type: subscription
actions:
type: manual
description: Rationalename: Approval
policyKey: subscription approval
type: subscription
actions:
type: approval
approvals:
- specificApproverRequired: false
requiredPermissions: OWNER
- specificApproverRequired: true
requiredPermissions: GOVERNANCE
description: Rationale
circumstances:
- type: columnTags
columnTag: DiscoveredAuthor a data policy using the V2 API
/api/v2/policyname: Hashing
policyKey: data mask hashing
type
actions arrayconfig objectfields arraymaskingConfig objectexceptions objectcircumstances arraycertification objectname: Mask with Constant
policyKey: data mask constant
type: data
actions:
- rules:
- type: Masking
exceptions:
operator: any
attributes:
- name: auth
value: SOMETHING_ELSE
- name: auth1
value: super secret
config:
fields:
- type: columnTags
columnTag: Discovered.Country
- type: columnTags
columnTag: Discovered.Passport
maskingConfig:
type: Constant
constant: REDACTED
circumstanceOperator: any
circumstances:
- type: columnTags
columnTag: Discovered.Country
- type: columnTags
columnTag: Discovered.Passportname: Conditional Masking
policyKey: data conditional masking
type: data
actions:
- rules:
- type: Masking
config:
fields:
- type: columnTags
columnTag: Discovered.Passport
conditionalPredicate: "@columnTagged('Discovered.Country') = 'USA'"
maskingConfig:
type: Hash
circumstanceOperator: all
circumstances:
- type: columnTags
columnTag: Discovered.Passport
- type: columnTags
columnTag: Discovered.Countryname: Conditional
policyKey: data mask otherwise
type: data
actions:
- rules:
- type: Masking
config:
fields:
- type: columnTags
columnTag: Discovered.Country
maskingConfig:
type: "Null"
inclusions:
groups:
- Employee
- type: Masking
exceptions:
purposes:
- Re-identification Prohibited
config:
fields:
- type: columnTags
columnTag: Discovered.Country
maskingConfig:
type: Hash
circumstances:
- type: columnTags
columnTag: Discovered.Countryname: Format Preserving Masking
policyKey: data mask fpe
type: data
actions:
- rules:
- type: Masking
config:
fields:
- type: columnTags
columnTag: Discovered
maskingConfig:
type: Format Preserving Masking
circumstances:
- type: columnTags
columnTag: Discoveredname: Null using column regex
policyKey: data mask null
type: data
actions:
- rules:
- type: Masking
config:
fields:
- type: columnRegex
regex: ssn
caseInsensitive: true
maskingConfig:
type: Null
circumstances:
- type: columnRegex
regex: ssn
caseInsensitive: truename: Random Categorical
policyKey: data mask random response
type: data
actions:
- rules:
- type: Masking
config:
fields:
- type: allColumns
maskingConfig:
type: Randomized Response
replacementRatePercent: 10name: Random Numeric
policyKey: data mask random response specifying stddev
type
name: Regex
policyKey: data mask regex
type
name: Mask using Reversible
policyKey: data mask reversible
type
name: RoundingDate
policyKey: data mask rounding by date
type
name: RoundingFingerprint
policyKey: data mask round using fingerprint
type
name: RoundingNumeric
policyKey: data mask round numeric
type
name: Minimize
policyKey: data minimize
type
name: Purpose
policyKey: data purpose restriction
type
name: Row Level By Time
policyKey: data row-level
type
name: Row Level Where User
policyKey: data where user
type
name: Row Level Where
policyKey: data custom where
type
/api/v2/projectname: A Bare Bones Project
projectKey: simplest possible projectsubscriptionPolicy objectapprovals arrayentitlements objectworkspace objectname: Entitlement Project
projectKey: entitlement project
description: "Need specific entitlements to join this project"
subscriptionPolicy:
type: entitlements
automaticSubscription: false
allowDiscovery: true
entitlements:
operator: any
groups:
- Engineers
- Founders
attributes:
- name: Auth1
value: super secretname: Anyone Project
projectKey: Anyone project
documentation: "# Anyone Can See This"
description: "Anyone can join this project"
allowMaskedJoins: false
subscriptionPolicy:
type: anyone
automaticSubscription: true
description: "Auto-subscribe everyone"
tags:
- Discovered.Person Name
purposes:
- Use Purposes
- Purpose Hierarchy.Child 2.Grandchild 2name: Approval Project
projectKey: Approval project
description: "Need approval to join this project"
allowMaskedJoins: true
subscriptionPolicy:
type: approval
approvals:
- requiredPermission: GOVERNANCE
specificApproverRequired: true
- requiredPermission: ADMIN
specificApproverRequired: falsename: Databricks Spark Project
projectKey: databricks spark project
datasources:
- Crime Data
- Databricks Credit Card Transactions
- Databricks Hipaa Data
purposes:
- Use Purposes
workspace:
type: databricks
config:
database: native
directory: native
workspaceConfigurationName: S3name: Snowflake Project
projectKey: snowflake project
datasources:
- Snowflake Case
- Snowflake Customer
- Snowflake Web Sales
workspace:
type: snowflake
config:
schema:
SNOWFLAKE_NATIVE
warehouses:
- DEMO_WH
tags:
- Discovered.PassportRegister a data source using the V2 API
/api/v2/dataconnection objectnameTemplate objectoptions objectowners objectsources arraycolumns objectcolumnDescriptions arraytags objectdataSourceFormat: <schema> <tablename>
tableFormat: <tablename>
schemaFormat: <schema>
schemaProjectNameFormat: <schema>sources:
- all: truesources:
- table: name_of_table
schema: name_of_schema
tags:
table:
- Sensitive
- Marketing
columns:
- columnName: acct_num
tags:
- unique_id
columnDescriptions:
- columnName: acct_num
description: The account numberconnectionKey: my-databricks
connection:
hostname: your.databricks.hostname.com
port: 443
ssl: true
database: tpc
username: token
password: "${DATABRICKS_PASSWORD}"
httpPath: sql/protocolv1/o/0/11101101
handler: DatabricksconnectionKey: my-databricks
nameTemplate:
dataSourceFormat: Databricks <Tablename>
tableFormat: <tablename>
schemaFormat: databricks
connection:
hostname: your.databricks.hostname.com
port: 443
ssl: true
database: data
username: token
password: "${DATABRICKS_PASSWORD}"
httpPath: sql/protocolv1/o/0/1110-11123
handler: Databricks
sources:
- table: credit_card_transactions
schema: data
tags:
table:
- PCI
- SENSITIVE
columns:
- columnName: transaction_date
tags:
- PCI
- DATE
- table: crime_data
schema: data
naming:
datasource: Crime Data
table: crime_data
schema: databricksconnectionKey: my-databricks
nameTemplate:
dataSourceFormat: Databricks <Tablename>
tableFormat: <tablename>
schemaFormat: databricks
schemaProjectNameFormat: <schema>
connection:
hostname: your.databricks.hostname.com
port: 443
ssl: true
database: data
authenticationMethod: oAuthM2M
useCertificate: false
clientId: "${service_principal_clientId}"
audience: https://your.databricks.hostname.com/oidc/v1/token
scope: all-apis
clientSecret: "${clientSecret}"
httpPath: sql/protocolv1/o/0/1110-11123
handler: DatabricksconnectionKey: ebock-databricks
nameTemplate:
dataSourceFormat: Databricks <Tablename>
tableFormat: <tablename>
schemaFormat: databricks
connection:
hostname: your.databricks.hostname.com
port: 443
ssl: true
database: ebock
username: token
password: "${DATABRICKS_PASSWORD}"
httpPath: sql/protocolv1/o/0/1110-185737-wove
handler: Databricks
sources:
- table: credit_card_transactions
schema: ebock
- table: crime_data_delta
schema: ebock
naming:
datasource: Crime Data
table: crime_data
schema: databricks
- table: hipaa_data
schema: ebockconnectionKey: redshift
connection:
hostname: your-redshift-cluster.djie25k.us-east-1.redshift.amazonaws.com
port: 5439
ssl: true
database: your_database_with_external_schema
username: awsuser
password: your_password
handler: Redshift
schema: external_schema
nameTemplate:
dataSourceFormat: <Tablename>
schemaFormat: <schema>
tableFormat: <tablename>
schemaProjectNameFormat: <Schema>
nativeSchemaFormat: <schema>_immuta
nativeViewFormat: <tablename>
sources:
- all: trueconnectionKey: tpc-snowflake
nameTemplate:
dataSourceFormat: