mik-laj commented on a change in pull request #10081:
URL: https://github.com/apache/airflow/pull/10081#discussion_r464042433



##########
File path: airflow/cli/cli_parser.py
##########
@@ -626,6 +626,16 @@ def positive_int(value):
     ),
     action="store_true",
     default=False)
+ARG_CONN_EXPORT_FORMAT = Arg(
+    ('--format',),
+    help='Output format of the file for exporting the connections',
+    default='json',
+    type=str)
+ARG_CONN_EXPORT_FILE = Arg(
+    ('--output-file',),
+    help='Output file path for exporting the connections',
+    required=True,
+    type=str)

Review comment:
       Have you considered using argparse.Filetype?
   https://docs.python.org/3/library/argparse.html#argparse.FileType
   This way, you will be able to export data directly to stdout.
   ```
   airflow connections export - | grep MY_CON
   ```




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to