Troubleshooting Guide
Common issues, solutions, and debugging strategies for dbt-nexus implementation.
Installation Issues
Package Not Found
Problem: Package 'nexus' not found
Solutions:
- Verify
packages.ymlconfiguration:packages: - git: 'https://github.com/sliderule-analytics/dbt-nexus.git' version: main - Run
dbt depsto install dependencies - Check network connectivity to GitHub
Submodule Issues
Problem: Submodule not updating or showing as modified
Solutions:
- Update submodule:
git submodule update --remote dbt-nexus - Initialize if needed:
git submodule update --init --recursive - Check submodule status:
git submodule status
Configuration Issues
Models Not Building
Problem: Model 'nexus_persons' not found
Solutions:
- Check
sourcesvariable configuration indbt_project.yml - Verify source model naming conventions
- Ensure source models exist and compile successfully
- Run
dbt list --select package:nexusto see available models
Schema Configuration Errors
Problem: Multiple 'models:' keys found
Solutions:
- Ensure only ONE
models:section indbt_project.yml - Use correct package name (
nexus, notdbt-nexus) - Check YAML indentation and structure
Identity-Resolution Depth
Configure how deep traversal walks the identifier graph:
vars:
nexus_max_recursion: 3 # default is 5
Each level renders one more per-hop CTE at Jinja compile time and adds one self-join over the edges table. Reducing depth reduces per-build cost proportionally. For most datasets 3 is sufficient.
As of v0.10.0 the macro uses Jinja-unrolled per-hop CTEs rather than
WITH RECURSIVE, so the old Recursive CTE exceeded maximum recursion depth and Snowflake Recursive Join ran out of memory (error 100298)
failure modes are gone. If identity resolution is unexpectedly slow,
inspect nexus_entity_identifiers_edges for hub identifiers — see
Edge Quality.
Data Quality Issues
Missing Identities
Problem: Persons not resolving across sources
Solutions:
- Verify source model schema compliance
- Check identifier column names and types
- Ensure proper data types (strings for identifiers)
- Review data quality in source systems
Duplicate Entities
Problem: Same person appearing multiple times in final tables
Solutions:
- Check entity resolution logic
- Verify edge creation in
nexus_entity_identifiers_edges - Review per-hop CTE expansion in compiled SQL (
target/compiled/.../nexus_resolved_*_identifiers.sql) - Test with smaller dataset to isolate issues
State Timeline Gaps
Problem: Missing or incorrect state transitions
Solutions:
- Verify
occurred_attimestamps in events - Check state model logic for proper timeline handling
- Ensure state models are added to
nexus_statesunion - Review derived state calculations
Performance Issues
Slow Entity Resolution
Problem: Entity resolution models taking too long to run
Solutions:
- Reduce
nexus_max_recursionvalue - Add incremental materialization:
models: nexus: nexus-models: identity-resolution: +materialized: incremental - Consider partitioning for large datasets
- Review data volume and complexity
Memory Issues
Problem: Out of memory errors during model execution
Solutions:
- Reduce batch sizes in incremental models
- Add partitioning to large tables
- Reduce
nexus_max_recursion(fewer per-hop CTEs rendered) - Consider materializing intermediate models
Incremental Model Issues
Problem: Incremental models not updating correctly
Solutions:
- Check
_ingested_atvalues in source data - Verify incremental strategy configuration
- Review watermark logic in models
- Consider full refresh if logic changes
Demo Data Issues
Demo Data Not Building
Problem: Demo models failing to compile or run
Solutions:
- Ensure you haven't overridden package
varsconfiguration - Check BigQuery permissions for demo schema creation
- Verify service account has proper access
- Run from package directory:
cd dbt_packages/nexus dbt build
Missing Demo Models
Problem: Expected demo models not appearing
Solutions:
- Run
dbt list --select package:nexusto see available models - Check if demo data configuration is active
- Verify package installation with
dbt deps - Review package version and compatibility
Database-Specific Issues
BigQuery Issues
Problem: BigQuery-specific errors or performance issues
Solutions:
- Check service account permissions
- Verify project ID and dataset configuration
- Review BigQuery-specific optimizations in models
- Consider partitioning and clustering strategies
Snowflake Issues
Problem: Snowflake-specific errors or performance issues
Solutions:
- Verify warehouse configuration and sizing
- Check Snowflake-specific optimizations
- As of v0.10.0, identity resolution renders as plain per-hop CTEs (not
WITH RECURSIVE) — inspect compiled SQL if a single step is unexpectedly slow - Consider clustering keys for large tables
PostgreSQL Issues
Problem: PostgreSQL compatibility issues
Solutions:
- Check PostgreSQL version compatibility
- Verify standard CTE /
UNIONsupport (no longer requiresWITH RECURSIVE) - Review data type mappings
- Consider performance tuning for PostgreSQL
Common Error Messages
"Column 'X' not found"
Cause: Source model schema mismatch Solution: Verify column names and types in source models
"Recursive Join ran out of memory" (Snowflake error 100298)
Cause: Pre-v0.10.0 WITH RECURSIVE identity-resolution macro on large
identifier graphs. Solution: Upgrade dbt-nexus to v0.10.0+ — the Jinja-
unrolled per-hop CTE rewrite removes this failure mode entirely.
"Model 'nexus_X' not found"
Cause: Package not installed or configured Solution: Run dbt deps and
check packages.yml
"Multiple models with name 'X'"
Cause: Naming conflicts between project and package models Solution: Use unique model names or proper namespacing
Debugging Strategies
Enable Debug Logging
dbt run --debug
dbt test --debug
Check Model Lineage
dbt docs generate
dbt docs serve
Verify Data Quality
-- Check for null identifiers
SELECT COUNT(*) FROM nexus_person_identifiers
WHERE identifier_value IS NULL;
-- Check for duplicate events
SELECT event_id, COUNT(*) FROM nexus_events
GROUP BY event_id HAVING COUNT(*) > 1;
Test with Minimal Dataset
# Run specific source only
dbt run --select source:your_source
dbt run --select package:nexus --models tag:identity-resolution
Getting Help
Documentation Resources
Community Support
Professional Support
- SlideRule Analytics
- Custom implementation and consulting services