SSIS: Create output file with specific name and a footer
Good day,
I have the following requirements - create a daily file with the filename in the pipe delimited format
using name like 'PDMAutomation_yyyy_mm_dd.txt. Also this file needs to have a footer, e.g.
source|request_type|change_type|Other columns
"Automation OHCS"|"Add"|"New NPI"|
FOOTER|0000000006||||||||||||||||||||||||||||||||||
This is a sample of the required file.
I am not sure how to make output file to generate into specific file. I've created a variable @User.outputDailyFile and how to add the footer in the specified format.
Here is what I have designed so far and I need help with there to make connection to to use my variable and how to create this footer.
I have the following for the file destination connection manager:
The problem is that I have format specified as delimited and Text qualifier set to ". The file it creates looks like this:
"source"|"request_type"|"change_type"|"exclusion_reason"|"provider_type"|"social_group"|"status"|"effective_date"|"earliest_effective_date"|"change_date"|"term_date"|"latest_term_date"|"tin"|"npi"|"provider_id"|"provider_last_name"|"provider_first_name"|"provider_middle_initial"|"clinic_name"|"t50_specialty"|"t50_provider_type"|"t15_taxonomy"|"license_number"|"license_state"|"license_issue_date"|"svc_address_line1"|"svc_address_line2"|"svc_city"|"svc_state"|"svc_zip"|"bus_address_line1"|"bus_address_line2"|"bus_city"|"bus_state"|"bus_zip"|"sub_specialtyr """
"Automation OHCS"|""|""|""|"Group"|""|""|"2019-06-26 00:00:00"|""|""|""|""|""|"1144625021"|"683601"|"ATHLETICO PHYSICAL THERAPY"|""|""|"ATHLETICO PHYSICAL THERAPY"|"70"|"24"|"193200000X"|""|""|""|"912 VIKING RD"|""|"CEDAR FALLS"|"IA"|"50613"|""|""|""|""|""|"".
Note that the header in the file (first tow) has column names with the text qualifier.
I want the header to look like this
source|request_type|change_type|exclusion_reason|provider_type|social_group|status|effective_date|earliest_effective_date|change_date|term_date|latest_term_date|tin|npi|provider_id|provider_last_name|provider_first_name|provider_middle_initial|clinic_name|t50_specialty|t50_provider_type|t15_taxonomy|license_number|license_state|license_issue_date|svc_address_line1|svc_address_line2|svc_city|svc_state|svc_zip|bus_address_line1|bus_address_line2|bus_city|bus_state|bus_zip|sub_specialty
Is there a way to not create header row at all or create it in the right format?
Thanks in advance