Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion dcpy/models/lifecycle/ingest.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,13 @@ class ProcessingResult(SortedSerializedBase, arbitrary_types_allowed=True):


class SparseConfig(BaseModel, extra="allow"):
id: str = Field(validation_alias=AliasChoices("id", AliasPath("dataset", "name")))
id: str = Field(
validation_alias=AliasChoices(
"id", # ingest
"name", # ingest - outdated
AliasPath("dataset", "name"), # library
)
)
version: str = Field(
validation_alias=AliasChoices(
"timestamp", # ingest - raw
Expand Down
1 change: 0 additions & 1 deletion dcpy/test/lifecycle/builds/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ def test_df_from_df(self):
@patch("dcpy.utils.postgres.PostgresClient")
def test_df_from_pg(self, pg_client):
_df = load.get_imported_df(self.load_result, "pg_dump")
print(pg_client.return_value.read_table_df)
pg_client.return_value.read_table_df.assert_called_with("pg_dump")

def test_df_from_csv(self):
Expand Down
7 changes: 7 additions & 0 deletions products/factfinder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ Code in this repo primarily:
2. Runs pipelines to build Decennial and ACS datasets.
You'll probably want to run both `products/factfinder/run.py` for both 'acs' and 'decennial'

## QA

Run the PFF QA dbt project by using the `recipe_qa.yml` recipe file to load data into the build DB and then running the `factfinder_dbt_qa` dbt project using `dbt build`.
1. `python3 -m dcpy.lifecycle.builds.plan recipe --recipe-path products/factfinder/recipe_qa.yml`
2. `cd products/factfinder`
3. `python -m dcpy lifecycle builds load load --recipe-path products/factfinder/recipe_qa.lock.yml`
4. [build]

## Cheatsheet On The Data Sources

Expand Down
8 changes: 2 additions & 6 deletions products/factfinder/acs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: PFF - ACS
version: 2023
version: 2024
product: db-factfinder
inputs:
dataset_defaults:
Expand All @@ -15,10 +15,9 @@ inputs:
- name: dcp_pop_acs2010_social
version: 20240524
- name: dcp_pop_acs
version: 2024
destination: file
file_type: xlsx
missing_versions_strategy: find_latest


stage_config:
builds.build:
Expand All @@ -27,6 +26,3 @@ stage_config:
connector_args:
- name: acl
value: public-read
- name: build_note
value_from:
env: "BUILD_NOTE"
Loading
Loading