import json
import yaml


def loadModel(catalog_path, schema_path):
    """Loads the dbt catalog and schema. The schema selected is the one that will be used to generate the ERD diagram.

    Args:
        catalog_path (Path): Path to dbt catalog
        schema_path (Path): Path to dbt schema

    Returns:
        dict, dict: Return schema and catalog dicts.  
    """    
    with open(catalog_path) as f:
        catalog = json.load(f)


    with open(schema_path, 'r') as f:
        schema = yaml.safe_load(f)

    return catalog, schema