Skip to content

Instantly share code, notes, and snippets.

View salomartin's full-sized avatar

Martin Salo salomartin

View GitHub Profile
"""
__author__ = "Martin Salo"
__email__ = "martin@yummy.eu"
The `sdmx_source` package is designed to facilitate the retrieval of statistical data from various SDMX
(Statistical Data and Metadata eXchange) data sources. It leverages the `sdmx` Python library to query and
fetch data and pass it on as dlt resource.
## Installation
import asyncpg
import dlt
import asyncio
from typing import Any, Dict, Optional
from dlt.common.schema.typing import TColumnSchema
"""Convert an asyncpg type to a dlt column schema type.
This maps asyncpg types to dlt types based on PostgreSQL to Python type mapping
provided by asyncpg and the dlt data types.