简体   繁体   English

Azure数据工厂v2数据转换

[英]Azure Data Factory v2 Data Transformation

I am new to Azure Data Factory. 我是Azure Data Factory的新手。 And my question is, I have a requirement to move the data from an on-premise Oracle and on-premise SQL Server to a Blob storage. 我的问题是,我需要将数据从本地Oracle和本地SQL Server移至Blob存储。 The data need to be transformed into JSON format. 数据需要转换为JSON格式。 Each row as one JSON file. 每行作为一个JSON文件。 This will be moved to an Event Hub. 这将被移到事件中心。 How can I achieve this. 我该如何实现。 Any suggestions. 有什么建议么。

The Data copy tool as part of the azure data factory is an option to copy on premises data to azure. 作为天蓝色数据工厂一部分的数据复制工具是将场所数据复制到天蓝色的一种选择。 the data copy tool comes with a configuration wizard where you do all the required steps like configuring the source, sink, integration pipeline etc. In the source you need to write a custom query to fetch data from the tables you require in json format. 数据复制工具随附一个配置向导,您可以在其中执行所有必需的步骤,例如配置源,接收器,集成管道等。在源中,您需要编写一个自定义查询以从json格式的所需表中获取数据。

In case of SQL server to select json you would use the options OPENJSON, FOR JSON AUTO to convert the rows to json. 如果使用SQL Server选择json,则可以使用OPENJSON,FOR JSON AUTO选项将行转换为json。 Supported in SQL 2016. For older versions you need to explore the options available. SQL 2016支持。对于较旧的版本,您需要探索可用的选项。 Worst case you can write a simple console app in C#/java to fetch the rows and then convert them to json file. 最坏的情况是,您可以用C#/ java编写一个简单的控制台应用程序以获取行,然后将其转换为json文件。 And then you can upload the file to azure blob storage. 然后,您可以将文件上传到Azure Blob存储。 If this is an one time activity this option should work and you may not require a data factory. 如果这是一次活动,则此选项应该起作用,并且您可能不需要数据工厂。

In case of ORACLE you can use the JSON_OBJECT function. 如果是ORACLE,则可以使用JSON_OBJECT函数。

You could use lookup activity + foreach activity. 您可以使用查找活动+ foreach活动。 And inside the foreach, there is a copy activity. 在foreach内部,有一个复制活动。 Please reference this post. 请参考这篇文章。 How to copy СosmosDb docs to Blob storage (each doc in single json file) with Azure Data Factory 如何使用Azure Data Factory将СosmosDb文档复制到Blob存储(单个json文件中的每个文档)

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

相关问题 Azure 数据工厂 (v2) 中缺少 JSON 标头 - JSON Headers is missing in Azure Data Factory (v2) Azure数据工厂V2-解析JSON HTTP GET数据集 - Azure Data Factory V2 - Parsing JSON HTTP GET Dataset Azure 数据工厂 V2 复制数据问题 - 错误代码:2200 - Azure Data Factory V2 Copy data issue - Error code: 2200 带有 Rest API 的 Azure 数据工厂 V2 复制活动为嵌套的 JSON 提供一行 - Azure Data Factory V2 Copy Activity with Rest API giving one row for nested JSON 如何在Azure Data Factory V2上的Json中为此REST_API编写文件路径 - How to write a file path in Json for this REST_API on Azure Data Factory V2 如何使用PowerShell为Azure Data Factory V2数据集/管道获取有效的JSON? - How can you get valid JSON for Azure Data Factory V2 Datasets/Pipelines using PowerShell? Data Factory v2-每行生成一个json文件 - Data Factory v2 - Generate a json file per row 将选定的 excel 列转换为数据工厂 v2 中的 json 字符串 - Transform selected excel columns to json string in data factory v2 将活动数据工厂 V2 集合引用复制到字符串类型 - Copy Activity Data Factory V2 Collection Refrence to String type 在数据工厂 V2 数据流中使用列名和值将多列连接到单列 - Concat multiple columns to single columns with columname and values in Data Factory V2 Data Flow
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM