Hello Team, I am encountering persistent issues wi...
# community-support
n
Hello Team, I am encountering persistent issues with on run end hooks with -
The query too large
in multiple env. This is BQ+DBT I have set these vars in dbt project yml config
Copy code
# elementary limits
  dbt_artifacts_chunk_size: 500
  insert_rows_method: "chunk"
  query_max_size: 1000000
  disable_dbt_columns_autoupload: true
I did a full reset as well multiple times. I am on version -
Copy code
elementary-data[bigquery]==0.16.1
j
Can you share the exact config? It needs to sit under vars like this:
Copy code
vars:
  # elementary limits
  dbt_artifacts_chunk_size: 500
  insert_rows_method: "chunk"
  query_max_size: 1000000
  disable_dbt_columns_autoupload: true
Also try to make the
dbt_artifacts_chunk_size
smaller if the issue persists
n
I have like that as you mentioned. Reducing
dbt_artifacts_chunk_size
will help with -
Copy code
The query is too large. The maximum standard SQL query length is 1024.00K characters, including comments and white space characters.
j
That's the idea yes. You can have a look at the actual query being executed in your target folder
n
It is publishing the job_id, but since its not able to load it, its not collecting the logs. My project is really big, it has north of 2k models + views. While reading the git history I think I am stuck in the bottleneck for these 2 variables -
insert_rows_method
and
query_max_size
I have reduced the dbt_artifacts_chunk_size to 350. Will do a test run to see if it even collects the data.
Still no luck, I am getting -
Copy code
The query is too large. The maximum standard SQL query length is 1024.00K characters, including comments and white space characters.
Also, it shares an on-end hook BQ adapter but when I search for the that job_id, I find no results.
j
I would say try around and play with the chunk_size, at some point it should work. Just make sure the performance is still ok. See more info here: https://github.com/elementary-data/elementary/issues/1689 (if you haven't) Not sure why you can't find the query in the logs. You should be able to find the logs in the gcp console for that error. Alternatively you should find the actual query being executed in your target folder. Hope it helps! Let me know 🙂
n
I think I found the issue and created a PR for the fix. Can you please review and approve? Trying to get some eyes from the maintainers so that this can be merged and released. Link - https://github.com/elementary-data/dbt-data-reliability/pull/763
j
Amazing! 🙂 We will have a look at it, but highly appreciate it
Hi Niteesh, I think you already saw the PR, but it is now merged. Thanks a lot for initiating this! Here you find the full PR (I think you are well aware): https://github.com/elementary-data/dbt-data-reliability/pull/765 Would you mind testing this? It is not released in a version yet but you could test maybe straight from master?
n
I am testing it now, do you think any var changes from here that needs to be changed?
Copy code
# elementary limits
  dbt_artifacts_chunk_size: 150
  insert_rows_method: "chunk"
  query_max_size: 100000
  disable_dbt_columns_autoupload: true
j
No I think these should be fine as is!
Any luck @Niteesh Kanungo?
n
Yes, I don't see the error further. Its working properly in prod. I move the package to git link with the latest # available. Thanks for the same.
j
Amazing! Thanks for letting me know 🙂