From 1f23ef6692c46cf982cfa275690c227ca8a2aefa Mon Sep 17 00:00:00 2001 From: matttriano Date: Sun, 18 Aug 2024 16:35:25 -0500 Subject: [PATCH] Updates deprecated syntax. --- .../make_and_run_dbt_models_for_a_data_set.py | 2 +- airflow/dbt/models/clean/schema.yml | 22 +++++++++---------- airflow/dbt/models/data_raw/schema.yml | 6 ++--- airflow/dbt/models/dwh/schema.yml | 12 +++++----- airflow/dbt/models/feature/schema.yml | 8 +++---- ...tifam_parcel_improvements_standardized.sql | 2 +- 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/airflow/dags/make_and_run_dbt_models_for_a_data_set.py b/airflow/dags/make_and_run_dbt_models_for_a_data_set.py index 1a9f254..445f3b7 100644 --- a/airflow/dags/make_and_run_dbt_models_for_a_data_set.py +++ b/airflow/dags/make_and_run_dbt_models_for_a_data_set.py @@ -19,7 +19,7 @@ ) from tasks.socrata_tasks import highlight_unfinished_dbt_standardized_stub -from sources.tables import COOK_COUNTY_PARCEL_SALES as SOCRATA_TABLE +from sources.tables import COOK_COUNTY_MULTIFAM_PARCEL_IMPROVEMENTS as SOCRATA_TABLE task_logger = logging.getLogger("airflow.task") diff --git a/airflow/dbt/models/clean/schema.yml b/airflow/dbt/models/clean/schema.yml index 48a69d3..672ee65 100644 --- a/airflow/dbt/models/clean/schema.yml +++ b/airflow/dbt/models/clean/schema.yml @@ -9,23 +9,23 @@ models: - name: parcel_sale_id - name: pin description: '{{ doc("parcels_cc_sales__pin") }}' - tests: + data_tests: - not_null - name: year - name: township_code - name: class description: '{{ doc("parcels_cc_sales__class") }}' - name: sale_date - tests: + data_tests: - not_null description: '{{ doc("parcels_cc_sales__sale_date") }}' - name: is_mydec_date description: '{{ doc("parcels_cc_sales__is_mydec_date") }}' - name: sale_price - tests: + data_tests: - not_null - name: sale_document_num - tests: + data_tests: - not_null description: '{{ doc("parcels_cc_sales__sale_document_num") }}' - name: sale_deed_type @@ -44,28 +44,28 @@ models: description: '{{ doc("parcels_cc_sales") }}' columns: - name: parcel_sale_id - tests: + data_tests: - unique - not_null - name: pin description: '{{ doc("parcels_cc_sales__pin") }}' - tests: + data_tests: - not_null - name: year - name: township_code - name: class description: '{{ doc("parcels_cc_sales__class") }}' - name: sale_date - tests: + data_tests: - not_null description: '{{ doc("parcels_cc_sales__sale_date") }}' - name: is_mydec_date description: '{{ doc("parcels_cc_sales__is_mydec_date") }}' - name: sale_price - tests: + data_tests: - not_null - name: sale_document_num - tests: + data_tests: - not_null description: '{{ doc("parcels_cc_sales__sale_document_num") }}' - name: sale_deed_type @@ -85,7 +85,7 @@ models: columns: - name: pin description: Property Index Number (uniquely defines a parcel of property). - tests: + data_tests: - not_null - name: cook_county_parcel_locations_clean @@ -95,7 +95,7 @@ models: columns: - name: pin description: '{{ doc("parcels_cc_locations__pin") }}' - tests: + data_tests: - unique - not_null - name: property_address diff --git a/airflow/dbt/models/data_raw/schema.yml b/airflow/dbt/models/data_raw/schema.yml index be135a6..f28d50d 100644 --- a/airflow/dbt/models/data_raw/schema.yml +++ b/airflow/dbt/models/data_raw/schema.yml @@ -6,7 +6,7 @@ models: columns: - name: pin description: Property Index Number (uniquely defines a parcel of property). - tests: + data_tests: # - unique - not_null @@ -15,7 +15,7 @@ models: columns: - name: assessment_id description: Uniquely defines the assessments for a parcel for one tax-year. - tests: + data_tests: # - unique - not_null - name: pin @@ -47,7 +47,7 @@ models: columns: - name: nbhd_id description: Uniquely identifies a neighborhood boundary. - tests: + data_tests: - unique - not_null - name: triad_name diff --git a/airflow/dbt/models/dwh/schema.yml b/airflow/dbt/models/dwh/schema.yml index e3c05d7..ecf8321 100644 --- a/airflow/dbt/models/dwh/schema.yml +++ b/airflow/dbt/models/dwh/schema.yml @@ -7,28 +7,28 @@ models: description: '{{ doc("parcels_cc_sales") }}' columns: - name: parcel_sale_id - tests: + data_tests: - unique - not_null - name: pin description: '{{ doc("parcels_cc_sales__pin") }}' - tests: + data_tests: - not_null - name: year - name: township_code - name: class description: '{{ doc("parcels_cc_sales__class") }}' - name: sale_date - tests: + data_tests: - not_null description: '{{ doc("parcels_cc_sales__sale_date") }}' - name: is_mydec_date description: '{{ doc("parcels_cc_sales__is_mydec_date") }}' - name: sale_price - tests: + data_tests: - not_null - name: sale_document_num - tests: + data_tests: - not_null description: '{{ doc("parcels_cc_sales__sale_document_num") }}' - name: sale_deed_type @@ -48,7 +48,7 @@ models: columns: - name: pin description: '{{ doc("parcels_cc_locations__pin") }}' - tests: + data_tests: - unique - not_null - name: property_address diff --git a/airflow/dbt/models/feature/schema.yml b/airflow/dbt/models/feature/schema.yml index c2f03fb..be8412f 100644 --- a/airflow/dbt/models/feature/schema.yml +++ b/airflow/dbt/models/feature/schema.yml @@ -7,18 +7,18 @@ models: description: '{{ doc("parcels_cc_sales") }}' columns: - name: parcel_sale_id - tests: + data_tests: - unique - not_null - name: pin description: '{{ doc("parcels_cc_sales__pin") }}' - tests: + data_tests: - not_null - name: sale_price - tests: + data_tests: - not_null - name: sale_date - tests: + data_tests: - not_null description: '{{ doc("parcels_cc_sales__sale_date") }}' - name: last_sale_price diff --git a/airflow/dbt/models/standardized/cook_county_multifam_parcel_improvements_standardized.sql b/airflow/dbt/models/standardized/cook_county_multifam_parcel_improvements_standardized.sql index d96b5cd..f6eba72 100644 --- a/airflow/dbt/models/standardized/cook_county_multifam_parcel_improvements_standardized.sql +++ b/airflow/dbt/models/standardized/cook_county_multifam_parcel_improvements_standardized.sql @@ -19,7 +19,7 @@ WITH records_with_basic_cleaning AS ( pin_num_landlines::smallint AS pin_num_landlines, year_built::smallint AS year_built, building_sqft::int AS building_sqft, - land_sqft::int AS land_sqft, + land_sqft::bigint AS land_sqft, num_bedrooms::smallint AS num_bedrooms, num_rooms::smallint AS num_rooms, num_full_baths::smallint AS num_full_baths,