Fundraising/techops/docs/analytics stack/troubleshooting
dbt changes not showing in Dagster after running fundraising_code_update
sometimes dbt and dagster will complain that a column doesn't exist if you add both a new column and a macro referencing the column in the same PR. To see if this is happening, check the dbt/ dagster logs in fran2001:/var/log/syslog or fran2001:/srv/dagster_data/dbt_log/ by greping for Trino errors. e.g. grep -ri 'COLUMN_NOT_FOUND' /srv/dagster_data/dbt_log/. If you see an error with the newly added column then this is likely your issue. You can fix the issue by materializing the model with the changes and then rerunning fundraising_code_update.
Here's an example of the error you might find:
/srv/dagster_data/dbt_log/dbt.log: TrinoUserError(type=USER_ERROR, name=COLUMN_NOT_FOUND, message="line 11:17: Column 'relative_fiscal_year' cannot be resolved", query_id=20251113_163022_41496_7cbe8). In this case, the newly added relative_fiscal_year column in int_date_spine is causing the issue. So materialize that asset in dagster and then rerun fundraising_code_update.
dbt error 'No factory for location' when building a new schema
sometimes when running dbt commands for models in a new schema, you'll get an error like:
Database Error in model forecast_actuals_recurring_amount_usd (models/marts/core/reports/forecast_actuals_recurring_amount_usd.sql)
TrinoQueryError(type=INTERNAL_ERROR, name=GENERIC_INTERNAL_ERROR, message="No factory for location: file:/user/hive/warehouse/dev_user_core_reports.db/forecast_actuals_recurring_amount_usd-4625b15c7167481cbbb0a94fd6a81ce9", query_id=20260213_163538_40711_yg4cb)
compiled code at ~/target/run/analytics_dbt/models/marts/core/reports/forecast_actuals_recurring_amount_usd.sql
This error occurs because when dbt tries to create a new schema, it does so with the wrong configs. To fix this, you need to drop the schema and recreate it with the proper DDL. For example:
trino> DROP SCHEMA iceberg.dev_astein_core_reports;
trino> CREATE SCHEMA iceberg.dev_astein_core_reports
WITH (location = 's3a://tiny/dev_astein_core_reports/');
make sure the last part of the location parameter matches the name of the schema you're creating