Python Script Data Source Template

Prev Next

Overview

The Python Script data source template is a generic base template for any data source accessible through Python. It provides the foundation for connecting Validatar to REST APIs, custom databases, cloud services, and any other platform with a Python library.

This template is intentionally minimal — it provides the framework and expects customization for each specific use case.

Platform: Any (Python-accessible)
Connection Category: Script
Template Category: Built-in / Marketplace

What's Included

Connection Configuration

  • Connection type: Python Script
  • Parameters-driven configuration (no traditional connection string)

Default Parameters

Parameter Type Description
connection_string String Generic connection string or URL
api_key Secret Authentication credential

Note: These are starting parameters. Customize them for your specific data source.

Data Type Mappings

Includes mappings for common Python/JSON data types:

  • string → String
  • integer, int → Integer
  • number, float, double → Decimal
  • boolean, bool → Boolean
  • date → Date
  • datetime → DateTime
  • object, array → Other

Metadata Ingestion

Provides a template Python ingestion script that returns empty DataFrames with the expected structure. Customize this script for your specific data source.

Profiling

Provides a template Python profiling script. Customize to calculate relevant metrics for your data source.

Installation

If not already available, import from the Validatar Marketplace or create from scratch using the Script connection category.

Customization

This template is designed to be customized. Key areas:

  1. Parameters — Add parameters specific to your data source (URLs, credentials, configuration options)
  2. Ingestion script — Write the Python script that discovers your data source's structure
  3. Profiling script — Write the Python script that calculates data quality metrics
  4. Data types — Map your data source's types to Validatar's internal types

See Metadata Ingestion Scripts — Python Templates and Profiling Configuration — Python Templates for detailed guidance.

Related Articles