ODCS Generator Reference#
The ODCS generator module provides integrations for generating ODCS YAML from supported catalog platforms.
Collibra Integration#
CollibraClient#
- class wxdi.odcs_generator.generate_odcs_from_collibra.CollibraClient(base_url: str, username: str, password: str)#
Bases:
objectClient for interacting with Collibra REST API
- HEADERS_JSON = {'Accept': 'application/json'}#
- HEADERS_CONTENT_JSON = {'Content-Type': 'application/json'}#
- DEFAULT_LIMIT = 1000#
ODCSGenerator#
- class wxdi.odcs_generator.generate_odcs_from_collibra.ODCSGenerator(collibra_client: CollibraClient)#
Bases:
objectGenerate ODCS YAML from Collibra asset metadata
- Parameters:
collibra_client (CollibraClient)
- UTC_TIMEZONE_SUFFIX = '+00:00'#
- EXCLUDED_ATTRIBUTES = {'Description'}#
- LOGICAL_TYPE_MAPPING = {'array': 'array', 'date': 'date', 'date time': 'timestamp', 'decimal number': 'number', 'geographical': 'string', 'integer': 'integer', 'n/a': None, 'number': 'number', 'object': 'object', 'string': 'string', 'text': 'string', 'time': 'time', 'true/false': 'boolean', 'whole number': 'integer'}#
- NUMERIC_TYPES = ['DECIMAL', 'NUMERIC', 'NUMBER']#
- generate_odcs(asset_id: str)#
Generate ODCS structure from a single Collibra asset
- Parameters:
asset_id (
str) – Collibra asset ID to include in the contract- Return type:
- Returns:
ODCS data contract dictionary with single asset in schema array
- Raises:
ValueError – If asset is not a table
Informatica Integration#
InformaticaClient#
- class wxdi.odcs_generator.generate_odcs_from_informatica.InformaticaClient(base_url, username, password)#
Bases:
objectClient for interacting with Informatica CDGC API.
- CONTENT_TYPE_JSON = 'application/json'#
- HEADERS_JSON = {'Accept': 'application/json'}#
- HEADERS_CONTENT_JSON = {'Content-Type': 'application/json'}#
- get_auth_token()#
Get authentication token with caching to avoid repeated auth calls.
- Return type: