airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] Fokko commented on a change in pull request #3898: [AIRFLOW-3059] PostgresToGCS Log the number of rows read
Date Sat, 15 Sep 2018 19:03:58 GMT
Fokko commented on a change in pull request #3898: [AIRFLOW-3059] PostgresToGCS Log the number
of rows read
URL: https://github.com/apache/incubator-airflow/pull/3898#discussion_r217892908
 
 

 ##########
 File path: airflow/contrib/operators/postgres_to_gcs_operator.py
 ##########
 @@ -155,6 +156,9 @@ def _write_local_data_files(self, cursor):
                 file_no += 1
                 tmp_file_handle = NamedTemporaryFile(delete=True)
                 tmp_file_handles[self.filename.format(file_no)] = tmp_file_handle
+            row_no += 1
+
+        self.log.info('Received %s rows over %s files', row_no, file_no + 1)
 
 Review comment:
   The `file_no` indicates how many files are being written, to avoid that files grow too
big. The `row_no` should indicate how many lines are being written. So I understand the confusion.
The thing is, if no files are being rolled, `file_no` will still be 0. But if no rows are
being written it will say, `written 0 rows over 1 file`. Let me make this more clear.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message