How to read .TXT files in Azure Data Factory?

Alan Gutierrez Encizo 41 Reputation points
2021-10-09T00:15:52.987+00:00

I'm trying to load data from a file .TXT type to a SQL Data Base by using a Data Flow or Copy Data activity in Azure Data Factory, but I'm not being capable to do it, down below is my try:

File configuration (as you see guys, I'm using the csv option cause' is the unique way that Azure allows me to read it):

139062-data-set-configuration.png

Here is the Preview Data shows:

139016-preview-data.png

Everything looks fine, but once I use the Data Set in a Data Flow, I get as follow:

138978-data-flow-result.png

It is possible to read a .TXT file with Azure? What I'm doing wrong?

Thanks by the way, hope you can help me, best regards.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,228 questions
Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
4,692 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,187 questions
{count} votes

Accepted answer
  1. KranthiPakala-MSFT 46,442 Reputation points Microsoft Employee
    2021-10-11T01:55:44.417+00:00

    Hi @Alan Gutierrez Encizo ,

    Welcome to Microsoft Q&A forum and thanks for reaching out here.

    You can use either Azure Data Factory Copy activity to copy TXT data as-is to your destination SQL database or Mapping Data flow if you would like to transform your data before loading it to your destination SQL database.

    By looking at the Preview data of your copy activity, seems like your TXT file has tab delimited columns, but your dataset configuration has column delimiter as comma(,) which is why your data preview all columns data in a single column.

    I would recommend you to please update the dataset configuration with appropriate values for column delimiter, row delimiter and also Escape character and Quote character if you have any in your source data. (Note: You will have to check First row as header if your source file has a header row )

    139200-image.png

    I would recommend you to please refer to this doc for detailed info about how you want to parse the delimited text files or write the data into delimited text format in Azure data factory: Delimited text format in Azure Data Factory and Azure Synapse Analytics

    Hope this clarifies. Do let us know if you have further query.

    ----------

    • Please don't forget to click on 130616-image.png and upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful