You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: 'Failed to copy Non partitioned table to Column partitioned table: not supported.' #38017
I have a Python Dataflow streaming pipeline which reads from PubSub, does some processing, and writes to BigQuery. Using STORAGE_WRITE_API works fine but I'm trying to use FILE_LOADS to reduce costs, and I get the following exception:
Error message from worker: generic::unknown: Traceback (most recent call last):
File "apache_beam/runners/common.py", line 1498, in apache_beam.runners.common.DoFnRunner.process
File "apache_beam/runners/common.py", line 912, in apache_beam.runners.common.PerWindowInvoker.invoke_process
File "apache_beam/runners/common.py", line 1057, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
File "/usr/local/lib/python3.12/site-packages/apache_beam/io/gcp/bigquery_file_loads.py", line 528, in process
self.process_one(element, job_name_prefix)
File "/usr/local/lib/python3.12/site-packages/apache_beam/io/gcp/bigquery_file_loads.py", line 575, in process_one
self.bq_wrapper.wait_for_bq_job(job_reference, sleep_duration_sec=10)
File "/usr/local/lib/python3.12/site-packages/apache_beam/io/gcp/bigquery_tools.py", line 690, in wait_for_bq_job
raise RuntimeError(
RuntimeError: BigQuery job beam_bq_job_COPY_pipenmeafileloads_COPY_STEP_e2c58135db064a1e869f3633a7a1b037_0b8da1df1d54f6591407114d91108002 failed. Error Result: <ErrorProto
message: 'Failed to copy Non partitioned table to Column partitioned table: not supported.'
reason: 'invalid'>
I've done this successfully in the past, and I think it could be related to high volume of incoming messages.
I'm using DAY partitioning in the output table, and a triggering_frequency of 5 minutes. Does anyone know why this could be happening? Is there a set of parameters that could help resolve this issue?
I think you get "Failed to copy Non partitioned table to Column partitioned table: not supported" when FILE_LOADS tries to load a large volume of data into your DAY-partitioned BigQuery table via additional copy to temp non-partitioned table. And this is probably what cases the error (on small data size no need to copy to temp non-partitioned table). So assuming you wan to keep using FILE_LOADS you would rather change triggering_frequency to lower value (sorry cannot give you right value, might need to play with it).
One more alternative is to set withNumFileShards() - forcing it lower, maybe can help to keep direct copy. But I would not pursue this option - requires even more tuning to get good results.
Finally please keep in mind that STORAGE_WRITE_API is the recommended way (while in some cases it is less cost effective, yet it is more reliable)
I think you get "Failed to copy Non partitioned table to Column partitioned table: not supported" when FILE_LOADS tries to load a large volume of data into your DAY-partitioned BigQuery table via additional copy to temp non-partitioned table. And this is probably what cases the error (on small data size no need to copy to temp non-partitioned table). So assuming you wan to keep using FILE_LOADS you would rather change triggering_frequency to lower value (sorry cannot give you right value, might need to play with it).
One more alternative is to set withNumFileShards() - forcing it lower, maybe can help to keep direct copy. But I would not pursue this option - requires even more tuning to get good results.
Finally please keep in mind that STORAGE_WRITE_API is the recommended way (while in some cases it is less cost effective, yet it is more reliable)
Yes, I know STORAGE_WRITE_API is the recommended way, and it works well for me. But it is too expensive for our use case.
I will try to play with those parameters.
@apanich Reducing triggering_frequency to 60 seconds helped temporarily, but the issue started occurring again after a while. I’m concerned that lowering it further could cause us to hit the daily job quota.
Hey @tomaslink, the BQ sink takes the copy job route when it accumulates either 10K files or 15TB of data (check here).
If the time interval is just 60seconds and it still triggers copy jobs, my guess is we're just creating too many files. Can you try reducing max_files_per_bundle (default is 20) ? That will reduce the number of writers created per bundle and hopefully get you below the 10K limit
Hey @tomaslink, the BQ sink takes the copy job route when it accumulates either 10K files or 15TB of data (check here).
If the time interval is just 60seconds and it still triggers copy jobs, my guess is we're just creating too many files. Can you try reducing max_files_per_bundle (default is 20) ? That will reduce the number of writers created per bundle and hopefully get you below the 10K limit
@ahmedabu98 Hi! Thanks for the suggestion, I will try it.
Activity
apanich commentedon Apr 3, 2026
I think you get "Failed to copy Non partitioned table to Column partitioned table: not supported" when FILE_LOADS tries to load a large volume of data into your DAY-partitioned BigQuery table via additional copy to temp non-partitioned table. And this is probably what cases the error (on small data size no need to copy to temp non-partitioned table). So assuming you wan to keep using FILE_LOADS you would rather change triggering_frequency to lower value (sorry cannot give you right value, might need to play with it).
One more alternative is to set withNumFileShards() - forcing it lower, maybe can help to keep direct copy. But I would not pursue this option - requires even more tuning to get good results.
Finally please keep in mind that STORAGE_WRITE_API is the recommended way (while in some cases it is less cost effective, yet it is more reliable)
tomaslink commentedon Apr 6, 2026
@apanich Thanks!
Yes, I know
STORAGE_WRITE_APIis the recommended way, and it works well for me. But it is too expensive for our use case.I will try to play with those parameters.
tomaslink commentedon Apr 6, 2026
@apanich Reducing
triggering_frequencyto 60 seconds helped temporarily, but the issue started occurring again after a while. I’m concerned that lowering it further could cause us to hit the daily job quota.ahmedabu98 commentedon Apr 13, 2026
Hey @tomaslink, the BQ sink takes the copy job route when it accumulates either 10K files or 15TB of data (check here).
If the time interval is just 60seconds and it still triggers copy jobs, my guess is we're just creating too many files. Can you try reducing
max_files_per_bundle(default is 20) ? That will reduce the number of writers created per bundle and hopefully get you below the 10K limittomaslink commentedon Apr 14, 2026
@ahmedabu98 Hi! Thanks for the suggestion, I will try it.