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.

Install

pip install datahub-ai-classifier

Configure

Complete recipe with all available options:

source:
  type: postgres
  config:
    host_port: "<host>:<port>"
    database: "<database>"
    username: "<user>"
    password: "<password>"
    include_tables: true
    include_views: true
    profiling:
      enabled: false
    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.

sink:
  type: datahub-rest
  config:
    server: "<datahub-gms-url>"

Development

pip install -e '.[dev]'
pytest

Metadata

Release files for datahub-ai-classifier 0.1.1

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.1
File Size Uploaded Provenance Actions
datahub_ai_classifier-0.1.1.tar.gz 13.4 kB Without provenance Details for datahub_ai_classifier-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 23.4 kB

Release files / datahub_ai_classifier-0.1.1.tar.gz

Download URL datahub_ai_classifier-0.1.1.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
72135ff76f03ef1b7955ca392bbeb7f795e2c0f553b0e04fcff58d37b794814a
BLAKE2b-256 checksum
How to use checksums
c25c26d93882c16d93cef746c4a65be70213fa03105c81fa97de1fc79ef453d8
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.1-py3-none-any.whl

Download URL datahub_ai_classifier-0.1.1-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
569a5138fea37849bba3624adf874bdca6fd47ebea283d8d3b0da95c57724f17
BLAKE2b-256 checksum
How to use checksums
02f72fd8d5718866003e1e1a91ca2cf2f3cc3e00b936a37ffc46ed014e5b10b1
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.1

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