Thanks for using MS Q&A platform and posting your query.
The logs generated by the Copy activity are saved with a
.txt
extension but contain data in a CSV format. This can be confusing because the file extension doesn’t match the content format.
Here are a few points to consider:
File Extension vs. Content Format: The .txt
extension is used by default for Copy activity logs, but the content is structured as CSV. This is why your data looks like CSV even though the file extension is .txt
.
Parsing Issues: If you’re having trouble parsing these .txt
files as CSV, you might need to explicitly specify the format when reading the files. For example, if you’re using Azure Synapse Analytics, you can use the OPENROWSET
function to read the files as CSV.
Configuration: Ensure that your logging configuration in ADF is set correctly. The path and file extension for logs can sometimes be influenced by the settings in your pipeline. Double-check the settings to ensure they align with your expectations.
Workaround: If you need the files to have a .csv
extension, you might consider a post-processing step to rename the files after they are generated. This can be done using an Azure Function or a similar service to automate the renaming process.
Hope this helps. Do let us know if you any further queries.