Reference for PDA Engine taxonomy mapping domain. Use when working with vendor product imports, CSV imports, taxonomy structures, category/attribute mappings, state hash change detection, or understanding the vendor→internal→marketplace mapping flow. Covers data models, workflows, API endpoints, and PostgreSQL bulk insert patterns.
Inherits all available tools
Additional assets for this skill
This skill inherits all available tools. When active, it can use any tool Claude has access to.
ENDPOINTS.mdENTITIES.mdMAPPINGS.mdWORKFLOWS.mdThe PDA Engine manages taxonomy mapping - a system for standardizing product attribute data from multiple vendors into a canonical structure that can then be mapped to marketplace-specific requirements.
Core Concept: Products from vendors have varied attribute structures. Taxonomy mapping creates a unified internal representation that can be transformed to meet any marketplace's requirements.
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ Vendor Taxonomy │ ──▶ │ Internal Taxonomy│ ──▶ │Marketplace Taxon.│
│ (TaxonomyType │ │ (TaxonomyType │ │ (TaxonomyType │
│ = Vendor) │ │ = Internal) │ │ = MarketPlace) │
└──────────────────┘ └──────────────────┘ └──────────────────┘
Auto-built Named "Bison" e.g., Amazon
from CSV imports (FUTURE)
| Type | Value | Purpose | Status |
|---|---|---|---|
Vendor | 0 | Auto-generated from vendor product imports | Implemented |
Internal | 1 | Canonical taxonomy (single, named "Bison") | FUTURE |
MarketPlace | 2 | Target marketplace structure (Amazon, etc.) | Implemented |
Note: Currently the system supports direct Vendor → Marketplace mapping. The Internal taxonomy layer will be added in the future to provide a canonical intermediate representation.
Taxonomy (TaxonomyType: Vendor|Internal|MarketPlace)
├── TaxonomyCategory (Name, StateHash)
│ └── TaxonomyCategoryAttribute (Name)
│
├── TaxonomyMapping (Source → Destination taxonomy)
│ └── TaxonomyCategoryMapping (SourceCategory → DestCategory)
│ └── TaxonomyCategoryAttributeMapping (SourceAttr → DestAttr)
│
├── InventoryTaxonomyMapping (Vendor → Taxonomy)
│ └── InventoryTaxonomyCategoryMapping (VendorCategory → TaxonomyCategory)
│ └── InventoryTaxonomyCategoryAttributeMapping (VendorAttr → TaxonomyAttr)
│
└── MarketplaceTaxonomyMapping (Marketplace → Taxonomy)
└── MarketplaceTaxonomyCategoryMapping (MarketplaceCat → TaxonomyCat)
└── MarketplaceTaxonomyCategoryAttributeMapping (MarketplaceAttr → TaxonomyAttr)
Vendor
├── VendorCategory (Category string, Attributes JSONB, StateHash)
├── VendorCategoryAttribute (Category, Attribute name)
├── ProductCategory (Sku, Category)
└── ProductAttribute (Sku, AttributeName, AttributeValue)
Marketplace
├── MarketplaceCategory (MarketplaceId, Category, StateHash)
└── MarketplaceCategoryAttribute (MarketplaceCategoryId, Attribute, Value)
Categories are stored as hierarchical strings using " -> " separator:
"Electronics -> Computers -> Laptops"
"Clothing -> Men -> Shirts -> Dress Shirts"
Each mapping level tracks state via MD5 hashes:
| Entity | Hash Contents |
|---|---|
TaxonomyCategory.StateHash | MD5(sorted attribute IDs) |
InventoryTaxonomyCategoryMapping.StateHash | MD5(InventoryStateHash | TaxonomyStateHash) |
TaxonomyCategoryMapping.StateHash | MD5(SourceStateHash | DestinationStateHash) |
Purpose: Efficiently detect when source or destination structures change, triggering re-mapping needs.
Vendor Attributes Internal Taxonomy Marketplace Taxonomy
───────────────── ────────────────── ────────────────────
"Product Name" ──▶ "Title" ──▶ "item_name"
"Brand Name" ──▶ "Brand" ──▶ "brand"
"Color Options" ──▶ "Color" ──▶ "color_name"
QuickInsertSession (10-100x faster)StateHash columns are indexed for efficient change detection