[英]Azure Data Pipeline Copy Activity loses column names when copying from SAP Hana to Data Lake Store
I am trying to copy data from SAP Hana to Azure Data Lake Store (DLS) using a Copy Activity in a Data Pipeline via Azure Data Factory. 我正在尝试使用数据管道中的复制活动通过Azure数据工厂将数据从SAP Hana复制到Azure数据湖存储(DLS)。
Our copy activity runs fine and we can see that rows made it from Hana to the DLS, but they don't appear to have column names (instead they are just given 0-indexed numbers). 我们的复制活动运行良好,我们可以看到从Hana到DLS的行都行了,但是它们似乎没有列名(相反,它们只是被赋予了0索引的数字)。
This link says “For structured data sources, specify the structure section only if you want map source columns to sink columns, and their names are not the same .” 该链接显示 “对于结构化数据源,仅当您希望将映射源列映射到接收器列并且它们的名称不同时 ,才指定结构部分。”
We are fine using the original column names from the SAP Hana table, so it seems like we shouldn't need to specify the structure
section in our dataset. 我们可以很好地使用SAP Hana表中的原始列名,因此似乎不需要在数据集中指定structure
部分。 However, even when we do, we still just see numbers for column names. 但是,即使这样做,我们仍然只能看到列名称的数字。
We have also seen the translator
property at this link , but are not sure if that is the route we need to go. 我们还在此链接上看到了translator
属性,但是不确定这是否是我们需要走的路。
Can anyone tell me why we aren't seeing the original column names copied into DLS and how we can change that? 谁能告诉我为什么我们看不到原始列名复制到DLS中以及如何更改它? Thank you! 谢谢!
Setting the firstRowAsHeader
property of the format
section on our dataset to true
basically solved the problem. 将数据集上format
部分的firstRowAsHeader
属性设置为true
基本上解决了这个问题。 The console still shows the numerical indices, but now includes the headers we are after as the first row. 控制台仍显示数字索引,但现在包括我们作为第一行使用的标题。 Upon downloading and opening the file, we can see the numbers are not there (the console just shows them for whatever reason), and it is a standard comma-delimeted file with a header row and one row entry per line. 下载并打开文件后,我们可以看到没有数字(控制台出于任何原因仅显示了数字),并且它是标准的逗号分隔文件,标题行且每行一行。
COLUMNA,COLUMNB aVal1,bVal1 aVal2,bVal2
We can now tell our sources and sinks to write and expect this format when reading. 现在,我们可以告诉我们的源和接收端写入并在读取时期望使用这种格式。
To get rid of the numerical indices and see the proper column headers in the console, click Format in the top-left corner, and then check the " First row is a header " box toward the bottom of the resulting blade 要摆脱数字索引并在控制台中查看正确的列标题,请单击左上角的“ 格式 ”,然后选中结果刀片底部的“ 第一行是标题 ”框
See the update above. 请参阅上面的更新。
The format.firstRowAsHeader
property needed to be set to true
需要将format.firstRowAsHeader
属性设置为true
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.