This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
__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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |