You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "renzepost (via GitHub)" <gi...@apache.org> on 2024/01/15 13:38:10 UTC

[I] Change SQL to GCS operators default row group size when output is Parquet [airflow]

renzepost opened a new issue, #36793:
URL: https://github.com/apache/airflow/issues/36793

   ### Description
   
   When using an operator that is derived from `BaseSQLToGCSOperator` with `output_format=parquet`, the default `parquet_row_group_size` is 1. This seems like a very strange default setting and with these settings (in my experience) it leads to some very unwanted results: enormous Parquet files, workers running out of memory and long task durations.
   
   I know this parameter is configurable, but my point is that this default setting should be changed to something more usable out of the box.
   
   ### Use case/motivation
   
   I looked up some other Parquet writing system's default settings. Spark seems to default to 128MB row groups. DuckDB has a default setting of 122.880 rows per row group according to the [docs](https://duckdb.org/docs/data/parquet/tips.html), and Polars uses a default setting of [512^2 rows](https://docs.pola.rs/py-polars/html/reference/api/polars.DataFrame.write_parquet.html).
   
   So I think considering this and the unwanted effects I noticed of having 1 row per row group, I'd say the default setting should be changed. However, I'm not sure what would be a good default setting instead for this Airflow operator.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Change SQL to GCS operators default row group size when output is Parquet [airflow]

Posted by "renzepost (via GitHub)" <gi...@apache.org>.
renzepost commented on issue #36793:
URL: https://github.com/apache/airflow/issues/36793#issuecomment-1893253889

   @Taragolis you can assign this to me!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Change SQL to GCS operators default row group size when output is Parquet [airflow]

Posted by "Taragolis (via GitHub)" <gi...@apache.org>.
Taragolis commented on issue #36793:
URL: https://github.com/apache/airflow/issues/36793#issuecomment-1892614742

   > I'm not sure what would be a good default setting instead for this Airflow operator.
   
   That is a very difficult question which value should be default, my personal thoughts that this values should be small enough which will allow to run in most cases without OOM, so something like 100 or 1000. This is because nobody except end users could decide which value suits to their requirements and available resources, but I think it should be greater than just 1.
   
   Anyway feel free to make a PR, because better discussions happen in the PR rather than into issue. If you would like, I could assign this issue to you otherwise I could mark it as **Good First Issue**
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Change SQL to GCS operators default row group size when output is Parquet [airflow]

Posted by "eladkal (via GitHub)" <gi...@apache.org>.
eladkal closed issue #36793: Change SQL to GCS operators default row group size when output is Parquet
URL: https://github.com/apache/airflow/issues/36793


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org