-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Excel plugin with output support #260
Conversation
dbt/adapters/duckdb/plugins/excel.py
Outdated
# Instead if we instantiated the writer in the constructor | ||
# with mode = 'w', this would result in an existing file getting | ||
# overwritten. This can happen if dbt test is executed for example. | ||
if not hasattr(self, '_excel_writer'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: does this bit need a lock? I'm assuming it's possible for multiple threads to hit it at the same time.
(don't worry about the MotherDuck test failure, that's expected until they upgrade to 0.9.0) |
fb0d1bc
to
a38d09e
Compare
@jwills the one thing this PR is missing are tests. If you can provide some guidance there I am happy to implement some. Also, thanks again for taking the time to chat this morning. |
@JCotton1123 hey sorry for the lag here, I'm at a conference this week. Re: testing, I think the best move would be to extract the Excel-related bits of https://github.com/duckdb/dbt-duckdb/blob/master/tests/functional/plugins/test_plugins.py into a new Take a look at the flow there and see if you're up for it; dbt functional tests are a little squirrely to understand, so if it's not clicking just let me know and I can add them in when I'm back around next week. |
a38d09e
to
e875a3a
Compare
@jwills just getting back to this...I attempted to follow your suggestion for implementing a test. LMK if this needs any additional changes? |
@JCotton1123 this looks great, thank you so much! The mypy linting error looks legit worth fixing and then I'm not totally sure what's up with the plugin test (maybe another dep needs to migrate from |
e875a3a
to
d77f5e6
Compare
@jwills I believe those issues should be resolved 🤞 |
@JCotton1123! Yay-- thanks again! |
Example profiles.yaml:
Example model: