在Azure SQL数据流任务中从JSON映射列 [英] Mapping columns from JSON in an Azure SQL Data Flow task

查看:49
本文介绍了在Azure SQL数据流任务中从JSON映射列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试对Azure数据工厂数据流中的源JSON数据集执行简单的SELECT操作,但是却收到一条错误消息,表明源中的所有列均无效.我使用确切的配置作为视频,除了使用JSON文件而不是CSV文件之外.

I am attempting a simple SELECT action on a Source JSON dataset in an Azure Data Factory data flow, but I am getting an error message that none of the columns from my source are valid. I use the exact configuration as the video, except instead of a CSV file, I use a JSON file.

在视频中,在1:12,您可以看到在配置了源数据集之后,源投影显示了源模式中的所有列.以下是教程视频的屏幕截图:image.png

In the video, at 1:12, you can see that after configuring the source dataset, the source projection shows all of the columns from the source schema. Below is a screen shot from the tutorial video: image.png

下面是我的尝试的屏幕截图:(我模糊了列名,因为它们与供应商应用程序中的列名匹配)

And below is a screen shot from my attempt: (I blurred the column names because they match column names from a vendor app)

请注意,我无法修改数据类型或格式.我不确定为什么不这样做,但是我也不需要进行任何修改,因此我继续前进.我确实尝试了CSV,并且能够修改数据类型.我以为这是JSON的东西,但是我在这里注意的是,以防万一我需要看一下一些配置.

Note in my projection, I am unable to modify the data types or the format. I'm not sure why not, but I don't need to modify either so I moved on. I did try with a CSV and I was able to modify the data types. I'm assuming this is a JSON thing, but I'm noting here just in case there is some configuration that I should take a look at.

在视频中的6:48,您将看到用户添加了一个选择任务,就像我已经做的一样.以下是添加任务后,本教程中的选择任务的屏幕快照:

At 6:48 in the video, you'll see the user add a select task, exactly as I have done. Below is a screen shot of the select task in the tutorial immediately following adding the task:

请注意,所有的源列均会出现.以下是我的选择任务的屏幕截图:

Notice the source columns all appear. Below is a screen shot of my select task:

我很好奇为什么缺少列名?如果我手动输入它们,则会收到错误消息:找不到列"

I'm curious why the column names are missing? If I type them in manually, I get an error: "Column not found"

作为参考,以下是我的数据源设置的屏幕截图.我正在使用通过Managed Identity和AutoResolvingIntegrationRuntime连接的Data Lake Storage Gen2链接服务.请注意,我也尝试使用CSV来做到这一点.我可以在CSV上编辑数据类型和格式,但在下一步中出现相同的列,但未发现错误.

For reference, below are screen shots of my Data Source setup. I'm using a Data Lake Storage Gen2 Linked Service connected via Managed Identity and the AutoResolvingIntegrationRuntime. Note that I tried to do this with a CSV as well. I was able to edit the datatype and format on a CSV, but I get the same column not found error on the next step.

推荐答案

尝试在其他浏览器中执行此操作,或清除浏览器缓存.它可能只是自动生成的JSON中的一种格式化内容.这以前发生在我身上.

Try doing this in a different browser or clear your browser cache. It may just be a formatting thing in the auto-generated JSON. This has happened to me before.

这篇关于在Azure SQL数据流任务中从JSON映射列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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