ods state build, then ods state retry --failed

0.0 s

Screenshots

scope          jaffle_ods/default                                                                                       
compared with  snapshot 1 in .ods/state.db                                                                              
plan           4 to build and test, 10 to reuse                                                                         
saved          ~2.5s of build time (estimate, serial: 10 of 14 nodes reused)                                            
dbt            target_dir target (default)                                                                              
target         dev (jaffle_ods, duckdb, fake-host, jaffle_ods)                                                          
ran            dbt build --select fqn:jaffle_ods.marts.customer_segments,resource_type:model                            
fqn:jaffle_ods.marts.customers,resource_type:model fqn:jaffle_ods.marts.customers_snapshot_view,resource_type:model     
fqn:jaffle_ods.marts.segment_summary,resource_type:model --target-path /tmp/ods-demo/jaffle_shop/target --write-json    
--partial-parse-file-diff --indirect-selection eager --log-format json --log-level debug                                
outcome        failed                                                                                                   
totals         21ms · 2 built · 1 failed · 1 skipped                                                                    
rows           at least 100 (2 nodes didn't report rows)                                                                
stats          reported as it ran                                                                                       
journal        .ods/state.db.runs/cb06ed7d-ae14-403b-8a67-416bbc0c3d50.jsonl                                            
recorded       snapshot 2: 2 nodes advanced                                                                             
                                                                                                                        
┏━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ node                    ┃ result                            ┃ took  ┃ rows ┃ why it ran                              ┃
┡━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ customers               │ success                           │ 250ms │ 100  │ code changed since run                  │
│                         │                                   │       │      │ f6fe28b2-58b2-4742-b0e2-a5e36e30d70d:   │
│                         │                                   │       │      │ sql                                     │
│ customer_segments       │ failed: KeyError: [value removed] │ 250ms │ —    │ upstream code changed: customers will   │
│                         │                                   │       │      │ be rebuilt                              │
│ customers_snapshot_view │ success                           │ 250ms │ —    │ upstream code changed: customers will   │
│                         │                                   │       │      │ be rebuilt                              │
│ segment_summary         │ skipped                           │ —     │ —    │ upstream code changed:                  │
│                         │                                   │       │      │ customer_segments will be rebuilt       │
└─────────────────────────┴───────────────────────────────────┴───────┴──────┴─────────────────────────────────────────┘
                                                                                                                        
Why it failed                                                                                                           
                                                                                                                        
error[python-exception]: customer_segments failed: The Python model raised KeyError                                     
  --> models/marts/customer_segments.py                                                                                 
note: python model · python exception (confidence: known pattern)                                                       
note: why ODS thinks so: It failed after 250ms, during execution (compile succeeded). [run stats]                       
note: why ODS thinks so: Its code didn't change since its last successful build, in run f6fe28b2. [fingerprints]        
note: compiled: target/compiled/jaffle_ods/models/marts/customer_segments.py                                            
note: blocks 1 downstream node (segment_summary was skipped). Its last good build is kept.                              
note: dbt said: KeyError: [value removed]  (Literal values and SQL removed.)                                            
note: full text: dbt's log file (logs/dbt.log in the project, unless --log-path)                                        
help: Read the traceback in the full log: it shows where in the model's code the exception was raised.                  
help: Then retry what failed: $ ods state retry --failed                                                                
                                                                                                                        
info: 2 nodes kept their last successful state and will be built next run                                               
error[ODS-E0404]: the run didn't fully succeed (2 nodes failed, were skipped or failed their tests; 0 checks failed)    
help: nodes that built and passed their tests were recorded; the others keep their last successful state and are built  
(and tested) next run                                                                                                   
❯                                                                                                                       
state-build-failed
❯ ods state retry --failed -q                                                                                           
fake dbt: source freshness                                                                                              
fake dbt: compile                                                                                                       
19:49:01  fake dbt: build                                                                                               
19:49:01  SUCCESS model.jaffle_ods.customer_segments                                                                    
19:49:01  SUCCESS model.jaffle_ods.segment_summary                                                                      
19:49:01  fake dbt: a warning after the nodes                                                                           
State run                                                                                                               
                                                                                                                        
scope          jaffle_ods/default                                                                                       
compared with  snapshot 2 in .ods/state.db                                                                              
plan           2 to build and test, 12 to reuse                                                                         
retrying       what failed in ods state build: 2 retried, 0 reused, 0 held back                                         
dbt            target_dir target (default)                                                                              
target         dev (jaffle_ods, duckdb, fake-host, jaffle_ods)                                                          
ran            dbt build --select fqn:jaffle_ods.marts.customer_segments,resource_type:model                            
fqn:jaffle_ods.marts.segment_summary,resource_type:model --target-path /tmp/ods-demo/jaffle_shop/target --write-json    
--partial-parse-file-diff --indirect-selection eager --log-format json --log-level debug                                
outcome        succeeded                                                                                                
totals         32ms · 2 built                                                                                           
rows           — (not reported: 2 nodes didn't report rows)                                                             
stats          reported as it ran                                                                                       
journal        .ods/state.db.runs/27847049-00f6-4cb2-bb04-f967870ee078.jsonl                                            
recorded       snapshot 3: 2 nodes advanced                                                                             
                                                                                                                        
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓                                 
┃ node              ┃ result  ┃ took  ┃ rows ┃ why it ran                             ┃                                 
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩                                 
│ customer_segments │ success │ 250ms │ —    │ new upstream data in customers         │                                 
│ segment_summary   │ success │ 250ms │ —    │ new upstream data in customer_segments │                                 
└───────────────────┴─────────┴───────┴──────┴────────────────────────────────────────┘                                 
❯                                                                                                                       
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
                                                                                                                        
state-retry-failed