Skip to main content

DataHub Classifier

Classify DataHub fields against a customer-provided tag list using an OpenAI-compatible LLM, then apply those tags.

Both plugins must be in the same recipe, with the same taxonomy map. Classifier alone leaves glossary terms and does not create tags. Missing tags are created. Existing tags are not overwritten.

In the DataHub UI recipe, last step (Advanced), put datahub-ai-classifier in Extra Pip Libraries so the UI executor can load this package.

Install

pip install datahub-ai-classifier

Configure

Complete recipe with all available options:

source:
  type: postgres
  config:
    ...
    classification:
      enabled: true
      sample_size: 10 # How many values DataHub reads from each column.
      max_workers: 1 # Required. DataHub's default uses extra processes and this classifier breaks.

      classifiers:
        - type: datahub_classifier.classifier:AIPIIClassifier
          config:
            llm_model: gpt-4.1-mini # Provider model id.
            llm_base_url: https://api.openai.com/v1 # Any OpenAI-compatible endpoint.
            llm_api_key: "<your-api-key>" # DataHub secret; never hardcode.
            llm_timeout_seconds: 60
            llm_max_retries: 0
            confidence_threshold: 0.6 # Ignore weaker matches.
            taxonomy: &taxonomy
              C1: >
                Restricted identifiers. National IDs, tax numbers, and SSN
                values such as 123-45-6789, often in columns named ssn.
              C2: >
                Confidential personal and payment data. Names, emails, phone
                numbers, home addresses, dates of birth, and money amounts
                such as order_total.
              C3: >
                Internal operational data. Surrogate ids, loyalty tiers,
                currency codes, order status, and timestamps such as
                created_at and shipped_at.

transformers:
  - type: datahub-classifier
    config:
      taxonomy: *taxonomy # Must match the classifier map.

Development

pip install -e '.[dev]'
pytest

Metadata

Release files for datahub-ai-classifier 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datahub-ai-classifier 0.1.2
File Size Uploaded Provenance Actions
datahub_ai_classifier-0.1.2.tar.gz 13.3 kB Without provenance Details for datahub_ai_classifier-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datahub-ai-classifier 0.1.2
File Interpreter ABI Platform Actions
datahub_ai_classifier-0.1.2-py3-none-any.whl Python 3 none any Details for datahub_ai_classifier-0.1.2-py3-none-any.whl

Total release size: 23.3 kB

Release files / datahub_ai_classifier-0.1.2.tar.gz

Download URL datahub_ai_classifier-0.1.2.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
380bfa461236a2a45465f580d0fd67e3360a2735789633352646ddbed9639c10
BLAKE2b-256 checksum
How to use checksums
076ff66141e6a2f5909d12ef8d11a5cc61f23020cb23eabadedd628720ccf7b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / datahub_ai_classifier-0.1.2-py3-none-any.whl

Download URL datahub_ai_classifier-0.1.2-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d3fc1f3916bbce357613fe920dc8a22255b427ef596f2020efdd0c7840a2087
BLAKE2b-256 checksum
How to use checksums
894517cb65873867a7c5681f3ddc61864e9ac1d389daba30c7ff40ddf9b560a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Security for datahub-ai-classifier 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page