Skip to main content

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.

Pipeline Configuration Parameters

Key Parameters Explained

enableAutoClassification

  • Set this to true to enable automatic detection of sensitive columns (e.g., PII).
  • Applies pattern recognition and tagging based on predefined criteria.

confidence

  • 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.

storeSampleData

  • Controls whether sampled rows are persisted to OpenMetadata after classification.
  • Rows are always sampled for classification regardless of this setting — up to 50 rows, or fewer if sampleDataCount is set lower. storeSampleData only decides whether those rows are also saved to OpenMetadata.
  • Defaults to false.

classificationFilterPattern

Use this to scope the auto-classification run to only tables carrying a specific tag. The value you provide must match the tag name or tag FQN depending on the useFqnForFiltering setting:
  • Default (useFqnForFiltering: false) — match against the tag name only. For example, if your tag is POV.Key Data Asset, use key data asset:
  • When useFqnForFiltering: true — match against the full tag FQN in the format Classification.TagName:
Important: Passing the FQN format (for example, POV.Key Data Asset) when useFqnForFiltering is false (the default) will cause the filter to match nothing — all records will be skipped and the run will report zero classified results.

useFqnForFiltering

  • When set to true, filtering patterns — including classificationFilterPattern — are matched against the Fully Qualified Name (for example, Classification.TagName).
  • When set to false (default), filtering matches against raw names only (for example, the tag name without the classification prefix).

Auto Classification Workflow Execution

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

1. Install the Required Python Package

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

2. Define and Execute the Python Workflow

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

Sample Auto Classification Workflow yaml

3. Expected Outcome

  • 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.

Auto Classification

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.

1. Define the YAML Config

This is a sample config for the Auto Classification Workflow:

2. Run with the CLI

After saving the YAML config, we will run the command the same way we did for the metadata ingestion:
Now instead of running ingest, we are using the classify command to select the Auto Classification workflow.

Workflow Execution

To Execute the Auto Classification Workflow:

  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.

Expected Outcomes

  • 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.