<jupyter_start><jupyter_text>If you want to generate the package for just ferc as an example, you can use the commented out ferc options below.<jupyter_code>name = "pudl-test"
title = "All tables integrated into PUDL."
tbls = tbls

#name = "pudl-ferc1"
#title =  "FERC Form 1 tables integrated into PUDL."
#tbls = ferc_tbls
# we need this as the main info regarding this iteration of packaging
pkg_skeleton = {
    "name": name,
    "title": title,
    "description": "A full metadat description of all PUDL tables.",
    "keywords": [
        "ferc",
        "form 1",
        "energy",
        "electricity",
        "utility",
        "fuel",
        "expenses",
        "coal",
        "natural gas",
        "generation",
        "regulation"
    ]
}<jupyter_output><empty_output><jupyter_text>this will generate metadata and csv's for every table in pudl. they will live in `results/data_pkgs`<jupyter_code>#pkg = pudl.output.export.data_package(tbls,
#                                      pkg_skeleton,
#                                      pudl_settings, 
#                                      dry_run=True)<jupyter_output><empty_output><jupyter_text>the following cells generate data data packages based on the metadata<jupyter_code>with pathlib.Path(pudl_settings['settings_dir'], 'settings_datapackage_example.yml').open() as f:
    pkg_bundle_settings = yaml.safe_load(f)
pkg_name = 'pudl_pkg_test'
metas = pudl.etl_pkg.generate_data_packages(pkg_bundle_settings, pudl_settings, pkg_name, debug=True,clobber=True)<jupyter_output><empty_output><jupyter_text>flatten the data packages and generate a sqlite db<jupyter_code>report = pudl.convert.flatten_datapkgs.flatten_pudl_datapackages(pudl_settings,pkg_name)
pudl.convert.datapkg_to_sqlite.pkg_to_sqlite_db(pudl_settings,pkg_name)<jupyter_output><empty_output><jupyter_text>check whether or not there are foreign keys..<jupyter_code>pudl_engine = sa.create_engine(pudl_settings["pudl_sqlite_url"])
insp = reflection.Inspector.from_engine(pudl_engine)
insp.get_foreign_keys('boiler_fuel_eia923')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09856459330143541, 'fraction_numerical': 0.0028708133971291866, 'mean_word_length': 3.9432624113475176, 'pattern_counts': {'":': 4, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '291221', 'license': 'MIT', 'n_tokens_mistral': 738, 'n_tokens_neox': 701, 'n_words': 147, 'path': 'results/notebooks/data_packaging_prep.ipynb', 'repo_name': 'claytonpbarrows/pudl', 'size': '2090'}