question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

update macro statement error handling to provide helpful messaging to user

See original GitHub issue

Howdy partner,

I ran into an error creating a minimal dbt-duckdb example. I wish I could give more information but I’m a dbt newbie. Below is a repository that (hopefully) recreates this issue w/ a couple of essentially trivial model files:

https://github.com/hamilton/dbt-duckdb-test

dbt run gives this output:

00:08:05  Running with dbt=1.0.1
00:08:05  Found 2 models, 4 tests, 0 snapshots, 0 analyses, 165 macros, 0 operations, 0 seed files, 0 sources, 0 exposures, 0 metrics
00:08:05  
00:08:05  Concurrency: 1 threads (target='dev')
00:08:05  
00:08:05  1 of 2 START table model main.ingest............................................ [RUN]
00:08:05  1 of 2 ERROR creating table model main.ingest................................... [ERROR in 0.08s]
00:08:05  2 of 2 SKIP relation main.second................................................ [SKIP]
00:08:05  
00:08:05  Finished running 1 table model, 1 view model in 0.34s.
00:08:05  
00:08:05  Completed with 1 error and 0 warnings:
00:08:05  
00:08:05  Compilation Error in macro statement (macros/etc/statement.sql)
00:08:05    cannot unpack non-iterable NoneType object
00:08:05    
00:08:05    > in macro materialization_table_default (macros/materializations/models/table/table.sql)
00:08:05    > called by macro statement (macros/etc/statement.sql)
00:08:05  
00:08:05  Done. PASS=0 WARN=0 ERROR=1 SKIP=1 TOTAL=2

My profiles.yml:

duckdb_test:
  outputs:
    dev:
      path: /Users/hamiltonulmer/Code/tmp/duckdb_test/db.duckdb
      type: duckdb
  target: dev

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hamiltoncommented, Jan 12, 2022

what a mensch! thanks for the fix.

1reaction
jwillscommented, Jan 11, 2022

Thank you @hamilton ! pretty sure this is some API update I missed when I did the upgrade, will dig into it and figure it out

Read more comments on GitHub >

github_iconTop Results From Across the Web

VBA Error Handling - A Complete Guide - Excel Macro Mastery
Error Handling is used to handle errors that occur when your application is running. You write specific code to handle expected errors. You...
Read more >
Excel VBA Error Handling - All You Need to Know!
Learn all about Excel VBA errors and how make sure these are handled properly in your VBA code. Covers all the error types...
Read more >
VBA On Error - Error Handling Best Practices - Automate Excel
VBA Error Handling. VBA Error Handling refers to the process of anticipating, detecting, and resolving VBA Runtime Errors.
Read more >
VBA On Error Statement – Handling Errors in Excel Macros
Error handling is an important part of every code and VBA On Error Statement is an easy way for handling unexpected exceptions in...
Read more >
Error Handling in VBA - My Online Training Hub
Understand how Excel VBA generates errors, how to control what Excel does when an error occurs, and how to write your own error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found