pudl.convert.datapkg_to_sqlite module¶
Convert a set of datapackages to SQLite database.
This script will convert a bundle of datapackages into one SQLite database. First, it flattens that datapackages into one datapackage named ‘pudl-all’. Then, it converts that flattened pudl datapackage into a SQLite database.
You will need to give the name of the directory which contains datapackages that you want to flatten and convert. This directory needs to be in your “PUDL_OUT” and “datapackage” directory. To see more info on directory setup see the pudl_setup script (pudl_setup –help for more details).
-
pudl.convert.datapkg_to_sqlite.
parse_command_line
(argv)[source]¶ Parse command line arguments. See the -h option.
-
pudl.convert.datapkg_to_sqlite.
pkg_to_sqlite_db
(pudl_settings, pkg_bundle_name, pkg_name=None)[source]¶ Turn a data package into a sqlite database.
- Parameters
pudl_settings (dict) – a dictionary filled with settings that mostly describe paths to various resources and outputs.
pkg_name (str) – name of data package. this can be the flattened datapackge (by default named ‘pudl-all’) or any of the sub- datapackages.
pkg_bundle_name (str) – the name of the directory where the bundle of datapackages live that you want to convert.