diff --git a/src/pudl/extract/xbrl.py b/src/pudl/extract/xbrl.py index 521e6ab7be..1288fa8878 100644 --- a/src/pudl/extract/xbrl.py +++ b/src/pudl/extract/xbrl.py @@ -86,7 +86,9 @@ def xbrl2sqlite(context) -> None: logger.info(f"Dataset ferc{form}_xbrl is disabled, skipping") continue - sql_path = Path(urlparse(PudlPaths().sqlite_db(f"ferc{form.value}_xbrl")).path) + sql_path = Path( + urlparse(PudlPaths().sqlite_db(f"ferc{form.value}_xbrl")).path + ).resolve() if sql_path.exists(): if clobber: diff --git a/src/pudl/workspace/setup.py b/src/pudl/workspace/setup.py index 188b5572c8..7cf93b3cb7 100644 --- a/src/pudl/workspace/setup.py +++ b/src/pudl/workspace/setup.py @@ -84,7 +84,9 @@ def sqlite_db(self, name: str) -> str: suffix. E.g. pudl, ferc1 and so on. """ db_path = self.output_dir / f"{name}.sqlite" - return f"sqlite://{db_path}" + # SQLite URI has 3 slashes - 2 to separate URI scheme, 1 to separate creds + # sqlite://{credentials}/{db_path} + return f"sqlite:///{db_path}" def output_file(self, filename: str) -> Path: """Path to file in PUDL output directory."""