Source code for pudl.metadata.resources

"""A subpackage to define and organize PUDL database tables by data group."""

import importlib
import pkgutil
from typing import Dict, List

from pudl.metadata.helpers import build_foreign_keys

for module_info in pkgutil.iter_modules(__path__):
[docs] module = importlib.import_module(f"{__name__}.{}")
resources = module.RESOURCE_METADATA for key in resources: if "group" not in resources[key]: resources[key].update({'group':}) RESOURCE_METADATA.update(resources)
[docs]FOREIGN_KEYS: Dict[str, List[dict]] = build_foreign_keys(RESOURCE_METADATA)
""" Generated foreign key constraints by resource name. See :func:`pudl.metadata.helpers.build_foreign_keys`. """