feat(appliance): initial release of MERICA standalone appliance v1.0.0
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
from fastapi import APIRouter
|
||||
|
||||
router = APIRouter(prefix="/trino", tags=["Trino & Iceberg Discovery"])
|
||||
|
||||
@router.get("/catalogs")
|
||||
def get_trino_catalogs():
|
||||
"""List available Trino catalogs."""
|
||||
return {
|
||||
"catalogs": [
|
||||
{"id": "iceberg", "name": "Apache Iceberg Catalog", "type": "iceberg"},
|
||||
{"id": "nessie", "name": "Project Nessie Catalog (Git-for-Data)", "type": "nessie"},
|
||||
{"id": "polaris", "name": "Apache Polaris Catalog (REST Spec)", "type": "polaris"},
|
||||
{"id": "lakehouse", "name": "Trino Default Lakehouse", "type": "trino"}
|
||||
]
|
||||
}
|
||||
|
||||
@router.get("/schemas")
|
||||
def get_trino_schemas():
|
||||
"""List lakehouse medallion layers/schemas."""
|
||||
return {
|
||||
"schemas": [
|
||||
{"id": "bronze", "name": "Bronze Ingestion Raw Staging", "layer": "bronze"},
|
||||
{"id": "silver", "name": "Silver Cleansed & Normalized Models", "layer": "silver"},
|
||||
{"id": "gold", "name": "Gold Business Data Marts", "layer": "gold"}
|
||||
]
|
||||
}
|
||||
|
||||
@router.get("/tables")
|
||||
def get_trino_tables(catalog: str = "iceberg", schema: str = "bronze"):
|
||||
"""List tables registered under specific catalog and schema."""
|
||||
return {
|
||||
"catalog": catalog,
|
||||
"schema": schema,
|
||||
"tables": [
|
||||
{"table_name": "environmental_permits_cdc", "layer": "bronze", "format": "PARQUET"},
|
||||
{"table_name": "spku_api_raw", "layer": "bronze", "format": "JSON"},
|
||||
{"table_name": "gws_waste_reports", "layer": "bronze", "format": "CSV"},
|
||||
{"table_name": "stg_spku_realtime", "layer": "silver", "format": "ICEBERG"},
|
||||
{"table_name": "stg_environmental_permits_clean", "layer": "silver", "format": "ICEBERG"},
|
||||
{"table_name": "fct_spku_daily_mart", "layer": "gold", "format": "ICEBERG"},
|
||||
{"table_name": "fct_waste_management_summary", "layer": "gold", "format": "ICEBERG"}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user