简体   繁体   English

将 Azure blob 存储文件名保存到 Sql 表 - Azure 数据工厂

[英]Save Azure blob storage filename to Sql table - Azure Data Factory

I have a sales-2016-01.txt file which I upload once monthly to the Azure blob storage.我有一个sales-2016-01.txt文件,我每月上传一次到 Azure blob 存储。 I want to process the sales-2016-01.txt file and save them to sql table.我想处理sales-2016-01.txt文件并将它们保存到 sql 表中。 In addition to this I want to store the name of the file against each record in a separate column say ImportFileName.除此之外,我想将每个记录的文件名存储在一个单独的列中,比如ImportFileName。 This is to track the record, from which file it was imported.这是为了跟踪记录,它是从哪个文件导入的。

The filename will be dynamic based on the year and month.文件名将根据年和月动态变化。

I am using Azure Data Warehouse for storing the data.我正在使用 Azure 数据仓库来存储数据。

It is an old question, but just for the record, in DF v2 in Copy Data activity, it is possible to add a new column to the source with value $$FILEPATH, and then each record will have a name of the input file.这是一个老问题,但只是为了记录,在复制数据活动的 DF v2 中,可以向源添加一个值为 $$FILEPATH 的新列,然后每条记录都会有一个输入文件的名称。

Azure DF v2,CopyData 活动 -> 源

You can following the MS sample to achieve this.您可以按照MS 示例来实现此目的。 You might need to modify a bit on the input dataset part in that sample since you only need the filename to be stored in the target table.您可能需要对该示例中的输入数据集部分进行一些修改,因为您只需要将文件名存储在目标表中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 数据工厂到 Azure Blob 存储权限 - Azure Data Factory to Azure Blob Storage Permissions Azure数据工厂:将数据从表存储移动到SQL Azure - Azure Data Factory: Moving data from Table Storage to SQL Azure Azure Blob到Azure SQL数据库-数据工厂 - Azure Blob to Azure SQL Database - Data Factory Azure blob 存储 - SAS - 数据工厂 - Azure blob storage - SAS - Data Factory 如何为Azure数据工厂链接服务中的Azure表存储/ blob动态动态提供连接字符串 - How to provide connection string dynamically for azure table storage/blob storage in Azure data factory Linked service Azure 数据工厂在复制到 Blob 存储时指定自定义输出文件名 - Azure Data Factory specify custom output filename when copying to Blob Storage 如何使用数据工厂将数据从 Azure Blob 存储增量加载到 Azure SQL 数据库? - How to incrementally load data from Azure Blob storage to Azure SQL Database using Data Factory? 如何在没有 Azure 数据工厂的情况下将 csv 文件从 blob 存储加载到 azure sql 数据库 - How to load csv file from blob storage to azure sql database without Azure Data Factory 从Azure数据工厂访问Azure Blob存储帐户 - Access Azure Blob storage account from azure data factory 将Azure Blob存储帐户链接到Azure数据工厂时出错 - Error linking Azure Blob Storage account to Azure Data Factory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM