Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-31269

hammer --csv --csv --csv-separator does not display the separator between empty fields.

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.19.0
    • Hammer
    • False
    • sat-rocket
    • None
    • None
    • None
    • None

      Problem Statement

      When using the hammer CLI tool to export data in CSV format, attributes with no values are not displayed clearly. Even when the --csv-separator option is explicitly specified, empty values are not represented with separators, making it difficult to process the output in scripts. This lack of clarity affects automation workflows and data parsing.

      For example, the expected output for:

      $ hammer --csv --csv-separator "," user info --id 16 --fields id,locations,organizations

      should be:

       

      Id,Locations::1,Organizations::1
      16,,
      

      However, the current output only displays:

       

      Id
      16
      

       

      This inconsistency makes it harder to handle missing values in automated scripts.

       

      Requirements

      The CSV output should include separators for empty attributes, ensuring consistency across all rows.

      Ensure that missing attribute values are represented as empty fields in CSV output.

      Business Impact

      Automation Challenges: The current behavior makes it difficult to process CSV exports in scripts, increasing the risk of errors in data handling.

              Unassigned Unassigned
              rhn-support-talkanan Tarik Alkanan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: