Azure数据工厂更改Azure表架构 [英] Azure Data factory changing Azure Table schema

查看:58
本文介绍了Azure数据工厂更改Azure表架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我计划使用Azure数据工厂创建Azure Tables存储的备份.我的Azure表中的实体可以更改其架构.每次更改架构时,Azure Pipeline是否可以通过无需手动干预的方式来解决此问题?

I am planning to use Azure Data factory for creating backup of Azure Tables storage. The entities in my Azure Table could change their schema. Is there a way Azure Pipeline could handle this without a manual intervention everytime schema changes ?

例如:让第一个条目成为

Eg : Let first entry be

  <entry>
    <content type="application/xml">
      <m:properties>
        <d:PartitionKey>P1</d:PartitionKey>
        <d:RowKey>R1</d:RowKey>
        <d:Timestamp m:type="Edm.DateTime">2017-05-22T20:37:34.8743000Z</d:Timestamp>
        <d:IsDefault m:type="Edm.Boolean">False</d:IsDefault>
      </m:properties>
    </content>
  </entry>

另一个条目可能是:

  <entry>
    <content type="application/xml">
      <m:properties>
        <d:PartitionKey>P2</d:PartitionKey>
        <d:RowKey>R2</d:RowKey>
        <d:Timestamp m:type="Edm.DateTime">2017-05-22T20:37:34.8743000Z</d:Timestamp>
        <d:IsDefault m:type="Edm.Boolean">False</d:IsDefault>
        **<d:IsTest m:type="Edm.Boolean">False</d:IsTest>**
      </m:properties>
    </content>
  </entry>

我不想每次实体更改时都更改数据集.

I don't want to change my Dataset everytime a entity change.

根据doc: https://docs.microsoft.com/zh-我们/azure/数据工厂/数据工厂常见问题解答

如果未在Data中定义结构和jsonPathDefinition工厂数据集,复制活动"从第一个开始检测架构对象并展平整个对象.

If the structure and jsonPathDefinition are not defined in the Data Factory dataset, the Copy Activity detects the schema from the first object and flatten the whole object.

这是解决此问题的方法.

Is their a workaround to this problem.

推荐答案

我的Azure表中的实体可以更改其架构.每次更改架构时,Azure Pipeline是否可以通过无需手动干预的方式来解决此问题?

The entities in my Azure Table could change their schema. Is there a way Azure Pipeline could handle this without a manual intervention everytime schema changes ?

本文,我们可以发现,对于无模式的数据存储(例如Azure Table),Data Factory服务可以通过以下方式之一来推断模式:

In this article, we could find that for schema-free data stores such as Azure Table, the Data Factory service infers the schema in one of the following ways:

1.如果您通过使用数据集定义中的structure属性指定数据结构,则Data Factory服务会将这种结构用作模式.在这种情况下,如果某行不包含某列的值,则会为其提供空值.

2.如果未通过使用数据集定义中的structure属性指定数据结构,则Data Factory将使用数据中的第一行来推断模式.在这种情况下,如果第一行不包含完整架构,则复制操作的结果会丢失某些列.

如果您不想在数据集定义中手动和显式指定结构属性,则可以在模式更改时在另一个表或Blob中存储/更新表模式,然后可以

If you do not want to manually and explicitly specify the structure property in the dataset definition, you could store/update the table schema in another table or blob when schema changes, and then you could create custom activity by using .NET SDK and dynamically&programmatically define structure property based on the stored schema when you create datasets.

这篇关于Azure数据工厂更改Azure表架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆