uranusjr commented on code in PR #29058:
URL: https://github.com/apache/airflow/pull/29058#discussion_r1090142830


##########
airflow/utils/db_cleanup.py:
##########
@@ -370,3 +382,19 @@ def run_cleanup(
                 session=session,
             )
             session.commit()
+
+
+@provide_session
+def export_archived_records(export_format, output_path, session: Session = 
NEW_SESSION):
+    """Export cleaned data to the given output path in the given format."""
+    inspector = inspect(session.bind)
+    table_names = inspector.get_table_names()
+    for table_name in table_names:
+        if table_name.startswith(ARCHIVE_TABLE_PREFIX):
+            _dump_db(
+                target_table=table_name,
+                file_path=f"{output_path}/{table_name}",

Review Comment:
   Better to use `os.path.join`. Why is the `.csv` suffix addition not done 
here?



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to