-
Notifications
You must be signed in to change notification settings - Fork 30
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
BUG - Too many partitions produced by query, allowed 4000, query produces at least 4272 partitions #39
Comments
It might not hurt to simply ignore data that is more than 4000 days old if the data warehouse is bigquery. |
hey there @csaroff -- you can expect a more formal solution released in the next week or so, but for the time being, this branch of the package should hopefully work for you without having to exclude any data # packages.yml
- git: https://github.com/fivetran/dbt_zendesk.git
revision: bq-partitions
warn-unpinned: false basically, i just changed the granularity of the |
^ did this work for you btw? @csaroff |
@fivetran-jamie I haven't gotten a chance to try it out yet, but will try soon and let you know. Thanks! |
@fivetran-jamie Looks like there might be a bug with this. Here's what I'm seeing when I do a Completed with 2 errors and 0 warnings:
Database Error in model int_zendesk__field_calendar_spine (models/ticket_history/int_zendesk__field_calendar_spine.sql)
PARTITION BY expression must be DATE(<timestamp_column>), DATE(<datetime_column>), DATETIME_TRUNC(<datetime_column>, DAY/HOUR/MONTH/YEAR), a DATE column, TIMESTAMP_TRUNC(<timestamp_column>, DAY/HOUR/MONTH/YEAR), DATE_TRUNC(<date_column>, MONTH/YEAR), or RANGE_BUCKET(<int64_column>, GENERATE_ARRAY(<int64_value>, <int64_value>[, <int64_value>]))
compiled SQL at target/run/zendesk/models/ticket_history/int_zendesk__field_calendar_spine.sql
Database Error in model int_zendesk__field_history_pivot (models/ticket_history/int_zendesk__field_history_pivot.sql)
PARTITION BY expression must be DATE(<timestamp_column>), DATE(<datetime_column>), DATETIME_TRUNC(<datetime_column>, DAY/HOUR/MONTH/YEAR), a DATE column, TIMESTAMP_TRUNC(<timestamp_column>, DAY/HOUR/MONTH/YEAR), DATE_TRUNC(<date_column>, MONTH/YEAR), or RANGE_BUCKET(<int64_column>, GENERATE_ARRAY(<int64_value>, <int64_value>[, <int64_value>]))
compiled SQL at target/run/zendesk/models/ticket_history/int_zendesk__field_history_pivot.sql Looks like the same error is showing on your circleci build for that branch. |
@csaroff ack somehow missed the circle error 🤦 it should be working now -- |
No worries. I'll try again today. Thanks! |
Looks like it cleared up the previous error, but now I'm getting: Database Error in model int_zendesk__field_calendar_spine (models/ticket_history/int_zendesk__field_calendar_spine.sql)
Query exceeded resource limits. This query used 19447 CPU seconds but would charge only 15M Analysis bytes. This exceeds the ratio supported by the on-demand pricing model. Please consider moving this workload to the flat-rate reservation pricing model, which does not have this limit. 19447 CPU seconds were used, and this query must use less than 3800 CPU seconds.
compiled SQL at target/run/zendesk/models/ticket_history/int_zendesk__field_calendar_spine.sql |
Ah shoot -- and are you trying to run a full refresh? Also it might be more efficient to troubleshoot this over a call if you'd like! You can book an office hours session here if that sounds good |
oh one idea .... this may be because
|
I don't think it ever successfully built I added the Completed with 1 error and 0 warnings:
Database Error in model int_zendesk__field_calendar_spine (models/ticket_history/int_zendesk__field_calendar_spine.sql)
Query exceeded resource limits. This query used 18210 CPU seconds but would charge only 20M Analysis bytes. This exceeds the ratio supported by the on-demand pricing model. Please consider moving this workload to the flat-rate reservation pricing model, which does not have this limit. 18210 CPU seconds were used, and this query must use less than 5100 CPU seconds.
compiled SQL at target/run/zendesk/models/ticket_history/int_zendesk__field_calendar_spine.sql I can confirm that |
Ok got a few more tricks up my sleeve.... currently, in the meantime, while i develop the above solution, could you try out this branch again? i've added a |
Hmm. Still getting Database Error in model int_zendesk__field_calendar_spine (models/ticket_history/int_zendesk__field_calendar_spine.sql)
Query exceeded resource limits. This query used 27133 CPU seconds but would charge only 15M Analysis bytes. This exceeds the ratio supported by the on-demand pricing model. Please consider moving this workload to the flat-rate reservation pricing model, which does not have this limit. 27133 CPU seconds were used, and this query must use less than 3800 CPU seconds.
compiled SQL at target/run/zendesk/models/ticket_history/int_zendesk__field_calendar_spine.sql |
ok that seems to have made it worse lol -- i will get back to ya soon with the other solution... |
@csaroff alright wanna try it out again? 🤞 |
I ran Completed with 1 error and 0 warnings:
Database Error in model int_zendesk__field_calendar_spine (models/ticket_history/int_zendesk__field_calendar_spine.sql)
Query exceeded resource limits. This query used 7891 CPU seconds but would charge only 30M Analysis bytes. This exceeds the ratio supported by the on-demand pricing model. Please consider moving this workload to the flat-rate reservation pricing model, which does not have this limit. 7891 CPU seconds were used, and this query must use less than 7600 CPU seconds.
compiled SQL at target/run/zendesk/models/ticket_history/int_zendesk__field_calendar_spine.sql Sooooo close! |
ahhh -- I think at this point it might be best / most efficient to troubleshoot this over a call if you're down! could you book one or two 15 minute slots of our office hours here? |
@csaroff if that doesn't work for you tho, i've also gone ahead and introduced a workaround to simply filter out old data. this happens via a this change lives on the happy to try to troubleshoot other solutions on a call, but i am thinking this is the route we'll probably have to take given the we are planning to release this at the end of our sprint (end of next week), so if you'd like to try it out/provide any feedback before then that'd be wonderful! thanks and sorry we couldn't come up with a more elegant fix.... |
@csaroff the latest release v0.7.0 (which includes this request) has just be cut!! You can expect this release to be live on the dbt hub at the top of the hour. I will leave this ticket open until the release is live. Once the latest release is live I will close the ticket and please feel free to open another Github issue if you have any further questions or requests for the package. 😄 |
Are you a current Fivetran customer?
Yes; Chaskin Saroff, Data Engineer at Bstock
Describe the bug
Too many partitions produced by
int_zendesk__field_calendar_spine
andint_zendesk__field_history_pivot
.Steps to reproduce
Have more than 4000 days worth of field history data in zendesk while using bigquery as your data warehouse.
Expected behavior
No error should occur.
Project variables configuration
Package Version
Warehouse
Please indicate the level of urgency
Not urgent, but the bug is frustrating because my build fails constantly if I leave this package installed.
Are you interested in contributing to this package?
The text was updated successfully, but these errors were encountered: