使用Azure Data Factory使用DateTime参数化查询将Azure Table存储转换为Azure Table存储

问题描述 投票:0回答:1

我有一个Azure Table存储,每天都会添加一些记录(通常是3-5个)。有时候无法添加任何记录,因此数量非常少。这是带有预定义的PartitionKey,RowKey和Timestamp列的表的结构:

Screenshot showing Data in Azure Table

我需要从Azure数据工厂查询此表以获取前一天的记录。因此,对于下面显示的示例数据,我可能正在查询2019-04-26的2019-04-25数据。原因是,一天的陈旧不会产生任何变化,这样,我就不必担心“水印”等问题。我只需查询前一天的数据并将其复制到Azure数据中的同一Azure表中Lake Storage Gen 2。

我知道我需要根据前一天的'时间戳'列指定一个参数化查询,但是不知道如何指定它。

请咨询。

parameter-passing azure-table-storage azure-data-factory
1个回答
0
投票

您可以在复制活动表存储源中设置查询sql。根据您的需要,它应该类似于:

time gt datetime'2019-04-25T00:00:00' and time le datetime'2019-04-2T00:00:00'

我的示例数据如下:

enter image description here

预览数据如下:

enter image description here

请参阅此文档中的一些示例:https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-table-storage#azuretablesourcequery-examples

© www.soinside.com 2019 - 2024. All rights reserved.