Skip to main content
Loading navigation
Back to prompt library

Build a Cross-Border Supplier Document Schema Mapper — implementation

Linked challenge: Build a Cross-Border Supplier Document Schema Mapper

Prompt source

implementation101 lines11 sectionsNo variables1 code block
## Build
Map localized vendor credential formats to standardized Frictionless Data schemas based on jurisdiction. Translate divergent operational license data into a unified global compliance format.

## User
Third-Party Risk Operations Manager

## Workflow
1. Ingest localized tabular supplier compliance data containing jurisdiction-specific license and tax identifiers.
2. Use a reasoning agent to map local header names and data types to a canonical Frictionless Data schema.
3. Apply Frictionless schema validation to ensure the mapped data conforms to global corporate compliance standards.
4. Output a normalized schema definition file and a transformation report detailing field adaptations.

## Interface
Terminal CLI and local web queue displaying mapped credential records, canonical schema comparisons, and validation reports.

## Data
Create synthetic supplier onboarding CSVs with disparate column headers and test mapping them to a defined Frictionless resource schema.
Starter examples below are synthetic. They are not downloaded records.

## Source
[Frictionless data validation](https://raw.githubusercontent.com/frictionlessdata/frictionless-py/main/README.md)
Applies the Frictionless Data validation framework and tabular resource schema conventions described in the frictionless-py documentation.

## Tools
agno, frictionless, pandas, pydantic.
Agno orchestrates intelligent LLM mapping of tabular headers into a unified canonical schema before standard procedural validation.
Local or hosted LLM with tool calling capability and low temperature for deterministic header translation.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Successfully maps disparate local table headers to a standard Frictionless schema using the AI agent.
- Validates the transformed data against the generated canonical schema without uncaught exceptions.
- Generates a JSON transformation report documenting mapping decisions and validation status.

## Starter Examples
```json
[
  {
    "input": {
      "jurisdiction": "DE",
      "local_data": [
        {
          "firmenname": "GmbH Tech",
          "steuernummer": "123456789",
          "ablaufdatum": "2025-12-31"
        }
      ],
      "canonical_target_fields": [
        "supplier_name",
        "tax_id",
        "expiry_date"
      ]
    },
    "expected_output": {
      "jurisdiction": "DE",
      "mapping": {
        "firmenname": "supplier_name",
        "steuernummer": "tax_id",
        "ablaufdatum": "expiry_date"
      },
      "schema_compliant": true,
      "normalized_records": [
        {
          "supplier_name": "GmbH Tech",
          "tax_id": "123456789",
          "expiry_date": "2025-12-31"
        }
      ]
    }
  },
  {
    "input": {
      "jurisdiction": "FR",
      "local_data": [
        {
          "nom_entreprise": "Societe SA",
          "num_tva": "FR987654321",
          "date_fin": "2024-10-15"
        }
      ],
      "canonical_target_fields": [
        "supplier_name",
        "tax_id",
        "expiry_date"
      ]
    },
    "expected_output": {
      "jurisdiction": "FR",
      "mapping": {
        "nom_entreprise": "supplier_name",
        "num_tva": "tax_id",
        "date_fin": "expiry_date"
      },
      "schema_compliant": true,
      "normalized_records": [
        {
          "supplier_name": "Societe SA",
          "tax_id": "FR987654321",
          "expiry_date": "2024-10-15"
        }
      ]
    }
  }
]
```

## Safety
Operates entirely on synthetic simplified supplier data schema definitions; produces internal transformation reports and does not execute actual commercial mapping.
Use mock external writes. Require human review before any real deployment.