Cloud function error Cannot read properties of undefined (reading 'jobCompletedEvent')

It looks like the cloud function is working. However, i got an error in scheduled query history:

I removed the partitioning field in scheduled query setting and retry the query. The table events_19691231 was created. I think i need to specify the partitioning field to a field which has type TIMESTAMP, DATETIME or DATE but not string.

sysph_6-1697873928401.png

Here’s the GA4 raw data tables

The destination table in ga4_master dataset should be events_20231020. How do i fix it? thanks