[英]How to transform the excel file which doesn't have the column header in Azure Data Factory
I am getting one excel file every day in the data lake.我每天在数据湖中收到一个 excel 文件。 My requirement is to export the excel file into an SQL database using ADF.
我的要求是使用 ADF 将 excel 文件导出到 SQL 数据库中。 I have five sheets in the excel file.
我在 excel 文件中有五张纸。 Among the five, I have one excel sheet that doesn't have one column header. I successfully exported all four sheets into the SQL database.
在这五个中,我有一张 excel 表没有一列 header。我成功地将所有四张表导出到 SQL 数据库中。
I stuck with the above one sheet which doesn't have a column header. Below is the data for this excel sheet我坚持使用上面一张没有列 header 的表格。下面是这张 excel 表格的数据
See, the first column doesn't have a header. When I tried to use copy activity, the schema is neglecting the first column as it doesn't have a header. When I untick the first row as a header, then it's recognised.看,第一列没有 header。当我尝试使用复制活动时,架构忽略了第一列,因为它没有 header。当我取消第一行为 header 时,它被识别了。 However, I don't want to use this because the column header for other columns considers a row value which is difficult as everyday new excel file is getting added.
但是,我不想使用它,因为其他列的列 header 认为行值很难,因为每天都会添加新的 excel 文件。
Any advice on how to address this issue?关于如何解决这个问题的任何建议? Tried a lot, with no success.
尝试了很多,没有成功。
I tried to reproduce this issue.我试图重现这个问题。 But initially I got below error.
但最初我遇到了以下错误。
ErrorCode=DelimitedTextColumnNameNotAllowNull,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The name of column index 1 is empty.
ErrorCode=DelimitedTextColumnNameNotAllowNull,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=列索引 1 的名称为空。 Make sure column name is properly specified in the header row.,Source=Microsoft.DataTransfer.Common,'
确保在 header 行中正确指定了列名称。,Source=Microsoft.DataTransfer.Common,'
Source File:源文件:
So I used DataFlow activity and resolved the issue.所以我使用了 DataFlow 活动并解决了这个问题。
Follow below steps.请按照以下步骤操作。
Step1: Select Excel as Source.第一步: Select Excel 作为来源。
Step2: Select transformation settings. Step2: Select改造设置。
Step3: Execute Pipeline. Step3:执行流水线。
Data stored in SQL DB.数据存储在 SQL DB 中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.