I am trying to load data in to a abc.txt file form an .csv file which is stored in delta lake.
Example : Data load with | separation in abc.txt file
id|name|address|contact_no
1|abc|xyz1|123
2|efg|xyz2|456
3|hij|xyz3|789
4|klmn|xyz4|91011
Header data Example:
Table_Name|Employee_details
Execution Date|28.07.2021
Execution Time|13:30:06
Execution Date Range|01.01.2021 To 28.07.2021
Total Number of Records Extracted|1 To 59 of 59
Key Fields: id
how can i append these two in to one .txt file by using azure data bricks pyspark, or python.
Could any one of you assist here.
I need abc.txt file to be loaded as below format
Table_Name|Employee_details
Execution_Date|28.07.2021
Execution_Time|13:30:06
Execution_Date_Range|01.01.2021 To 28.07.2021
Total_Number_of_Records_Extracted|1 To 59 of 59
Key_Fields|id
id|name|address|contact_no
1|abc|xyz1|123
2|efg|xyz2|456
3|hij|xyz3|789
4|klmn|xyz4|91011
I am able to generate two separate files, but not able to do these in one file.