how-to-guides

No menu items for this category

Auto Classification Workflow Configuration

The Auto Classification Workflow enables automatic tagging of sensitive information within databases. Below are the configuration parameters available in the Service Classification Pipeline JSON.

ParameterDescriptionTypeDefault Value
typeSpecifies the pipeline type.StringAutoClassification
classificationFilterPatternRegex to compute metrics for tables matching specific tags, tiers, or glossary patterns.ObjectN/A
schemaFilterPatternRegex to fetch schemas matching the specified pattern.ObjectN/A
tableFilterPatternRegex to exclude tables matching the specified pattern.ObjectN/A
databaseFilterPatternRegex to fetch databases matching the specified pattern.ObjectN/A
includeViewsOption to include or exclude views during metadata ingestion.Booleantrue
useFqnForFilteringDetermines whether filtering is applied to the Fully Qualified Name (FQN) instead of raw names.Booleanfalse
storeSampleDataOption to enable or disable storing sample data for each table.Booleantrue
enableAutoClassificationEnables automatic tagging of columns that might contain sensitive information.Booleanfalse
confidenceConfidence level for tagging columns as sensitive. Value ranges from 0 to 100.Number80
sampleDataCountNumber of sample rows to ingest when Store Sample Data is enabled.Integer50
  • Set this to true to enable automatic detection of sensitive columns (e.g., PII).
  • Applies pattern recognition and tagging based on predefined criteria.
  • Confidence level for tagging sensitive columns:
    • A higher confidence value (e.g., 90) reduces false positives but may miss some sensitive data.
    • A lower confidence value (e.g., 70) identifies more sensitive columns but may result in false positives.
  • Controls whether sample rows are stored during ingestion.
  • If enabled, the specified number of rows (sampleDataCount) will be fetched for each table.
  • When set to true, filtering patterns will be applied to the Fully Qualified Name of a table (e.g., service_name.db_name.schema_name.table_name).
  • When set to false, filtering applies only to raw table names.

To execute the Auto Classification Workflow, follow the steps below:

Ensure you have the correct OpenMetadata ingestion package installed, including the PII Processor module:

Instead of using a YAML configuration, use the AutoClassificationWorkflow from OpenMetadata to trigger the ingestion process programmatically.

  • Automatically classifies and tags sensitive data based on predefined patterns and confidence levels.
  • Improves metadata enrichment and enhances data governance practices.
  • Provides visibility into sensitive data across databases. This approach ensures that the Auto Classification Workflow is executed correctly using the appropriate OpenMetadata ingestion framework.

The Auto Classification workflow will be using the orm-profiler processor.

After running a Metadata Ingestion workflow, we can run the Auto Classification workflow. While the serviceName will be the same to that was used in Metadata Ingestion, so the ingestion bot can get the serviceConnection details from the server.

This is a sample config for the Auto Classification Workflow:

You can find all the definitions and types for the sourceConfig here.

storeSampleData: Option to turn on/off storing sample data. If enabled, we will ingest sample data for each table.

enableAutoClassification: Optional configuration to automatically tag columns that might contain sensitive information.

confidence: Set the Confidence value for which you want the column to be tagged as PII. Confidence value ranges from 0 to 100. A higher number will yield less false positives but more false negatives. A lower number will yield more false positives but less false negatives.

databaseFilterPattern: Regex to only fetch databases that matches the pattern.

schemaFilterPattern: Regex to only fetch tables or databases that matches the pattern.

tableFilterPattern: Regex to only fetch tables or databases that matches the pattern.

Choose the orm-profiler. Its config can also be updated to define tests from the YAML itself instead of the UI:

tableConfig: tableConfig allows you to set up some configuration at the table level.

To send the metadata to OpenMetadata, it needs to be specified as type: metadata-rest.

The main property here is the openMetadataServerConfig, where you can define the host and security provider of your OpenMetadata installation.

Logger Level

You can specify the loggerLevel depending on your needs. If you are trying to troubleshoot an ingestion, running with DEBUG will give you far more traces for identifying issues.

JWT Token

JWT tokens will allow your clients to authenticate against the OpenMetadata server. To enable JWT Tokens, you will get more details here.

You can refer to the JWT Troubleshooting section link for any issues in your JWT configuration.

Store Service Connection

If set to true (default), we will store the sensitive information either encrypted via the Fernet Key in the database or externally, if you have configured any Secrets Manager.

If set to false, the service will be created, but the service connection information will only be used by the Ingestion Framework at runtime, and won't be sent to the OpenMetadata server.

Store Service Connection

If set to true (default), we will store the sensitive information either encrypted via the Fernet Key in the database or externally, if you have configured any Secrets Manager.

If set to false, the service will be created, but the service connection information will only be used by the Ingestion Framework at runtime, and won't be sent to the OpenMetadata server.

SSL Configuration

If you have added SSL to the OpenMetadata server, then you will need to handle the certificates when running the ingestion too. You can either set verifySSL to ignore, or have it as validate, which will require you to set the sslConfig.caCertificate with a local path where your ingestion runs that points to the server certificate file.

Find more information on how to troubleshoot SSL issues here.

ingestionPipelineFQN

Fully qualified name of ingestion pipeline, used to identify the current ingestion pipeline.

filename.yaml

After saving the YAML config, we will run the command the same way we did for the metadata ingestion:

  1. Create a Pipeline

    • Configure the Auto Classification JSON as demonstrated in the provided configuration example.
  2. Run the Ingestion Pipeline

    • Use OpenMetadata or an external scheduler like Argo to trigger the pipeline execution.
  3. Validate Results

    • Verify the metadata and tags applied to sensitive columns in the OpenMetadata UI.
  • Automatic Tagging:
    Columns containing sensitive information (e.g., names, emails, SSNs) are automatically tagged based on predefined confidence levels.

  • Enhanced Visibility: Gain improved visibility and classification of sensitive data within your databases.

  • Sample Data Integration:
    Store sample data to provide better insights during profiling and testing workflows.