-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Feature] Faster, if unsafe, dbt-compile please! (perhaps without connectors) #10155
Comments
Hey @guyr-ziprecruiter! First: Are you regularly running As far as your proposal:
|
Hello again! $ dbt compile --no-introspect --profiles-dir=profiles/ --profile=athena --models foo But it still took a couple of minutes. So seems like that's not what I was looking for. Ideally I would like to work with no connector, just get the jinja templates to render and get my query back. Is that possible? Thanks! |
@guyr-ziprecruiter Thanks for giving it a try! In that case, I'm not sure what the source of slowness would be. Two questions:
|
I'm not using
This did seem to help a bit - thanks! It might be nice if
I executed: $ dbt --debug --log-cache-events --log-path ~/dbtlogs/ compile \
--threads 12 \
--profiles-dir=profiles/ --profile=athena \
--models itm_applies_revenue_attribution > /dev/null and got me 55MB worth of logs (8.1MB gzipped). So let me get back to you about it :) Again - a built in profiler seems like a worthy addition if these are the questions arising. I'll post my results soon. Thanks! |
I wrote a dbt logs parser in Python (dbtlogs.py.txt) and came up with this:
Not sure if this doesn't represent some kind of cached run where things happen faster. |
That was actually pretty dumb of me, I could just Or could I...? Trying to run with Traceback (most recent call last):
File "/Users/guyr/miniconda3/envs/sections/lib/python3.10/site-packages/dbt/events/functions.py", line 217, in msg_to_dict
msg_dict = MessageToDict(
TypeError: MessageToDict() got an unexpected keyword argument 'including_default_value_fields'
During handling of the above exception, another exception occurred:
(repeat until `RecursionError: maximum recursion depth exceeded`) Attached is the output file: dbt-log-json-format-stderr.txt.gz. Since $ locale
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL= Thanks! |
@guyr-ziprecruiter could you open a bug report for the "maximum recursion depth exceeded" you mentioned in #10155 (comment) ? That way we can handle that unexpected error separately than your feature request. I gave |
Will do. For the meantime, let me rephrase my question differently: During a |
@dbeatty10 my versions seem to be: $ pip list | grep -i dbt
dbt 1.0.0.35.1
dbt-artifacts-parser 0.5.1
dbt-athena-community 1.5.1
dbt-core 1.5.0
dbt-duckdb 1.5.1
dbt-extractor 0.4.1
dbt-semantic-interfaces 0.4.2
dbt-spark 1.5.0
dbterd 1.12.0
sqlfluff-templater-dbt 2.3.5 So I believe this bug has already been fixed - it's my bad working with older versions 🤷 |
Even a simple expansion such as $ dbt compile --profile athena --profiles-dir=profiles/ --inline '{{ source("foo", "bar") }}' (real |
@guyr-ziprecruiter apologies for the long silence! I had a chance to look at this briefly with @jtcohen6 today. These ones look related to the relational cache:
Could you try using |
This issue has been marked as Stale because it has been open for 180 days with no activity. If you would like the issue to remain open, please comment on the issue or else it will be closed in 7 days. |
Although we are closing this issue as stale, it's not gone forever. Issues can be reopened if there is renewed community interest. Just add a comment to notify the maintainers. |
Is this your first time submitting a feature request?
Describe the feature
A simple
dbt compile
run may take several minutes. I gather this is since the connectors are applied and things are verified for correctness (e.g. are the tables and columns referenced really are there). That's wonderful! But if I'm running the samedbt-compile
multiple times, I'm willing to take the risk and assume nothing has changed. Hence I suggest a run mode in which whatever collected by the connectors gets cached, and I can reuse it instead of waiting 3 minutes every time I try to compile my model to Athena. Thanks!Describe alternatives you've considered
Writing a jinja2 template rendered myself, and using jinja2 without dbt. Both did not work.
Who will this benefit?
DBT users compiling their queries to test (e.g. in the Athena console) and wishing not to spend hours waiting (it adds up!).
Are you interested in contributing this feature?
Not impossible if no one better is willing to!
Anything else?
No response
The text was updated successfully, but these errors were encountered: