Export Data with additional header row above main header row

Thank you for your analysis and response! The extra row needs to be above the actual data column headers (DATASET_NAME, TARGET_INDEX, etc) with column names like REQUIRED and OPTIONAL.

Your response gave me an idea for another approach... where I UNION the actual data with a dummy row containing strings of the data column names aliased as A-REQUIRED, B-REQUIRED, C-OPTIONAL, etc and those aliases become the first row in the export. Then the actual data query has to have matching aliases to satisfy the union.