我有一个JSON源代码,如下所示:
{
"columnNames":[
"Screw",
"Type",
"Class_Region",
"Orders/Sales",
"Quarter-3",
"Previous Quarter %",
"Previous Year %",
"Quarter-2",
"Previous Quarter %",
"Previous Year %",
"Quarter-1",
"Previous Quarter %",
"Previous Year %",
"Quarter",
"Previous Quarter %",
"Previous Year %",
"Total",
"Previous Year %"
],
"analysisData":[
[
"Single Screw",
"Fields of Application (1.000€)",
"Blown film",
"Orders",
"146.700",
"119,4",
"39,7",
"147.088",
"0,3",
"17,0",
"166.429",
"13,1",
"54,6",
"119.562",
"-28,2",
"78,9",
"579.779",
"43,1"
],
[
"Single Screw",
"Fields of Application (1.000€)",
"Blown film",
"Sales",
"84.290",
"-16,9",
"-10,7",
"122.121",
"44,9",
"-17,4",
"102.930",
"-15,7",
"15,1",
"128.227",
"24,6",
"26,4",
"437.568",
"1,0"
],
[
"Single Screw",
"Fields of Application (1.000€)",
"Flat film",
"Orders",
"56.077",
"9,1",
"13,8",
"85.338",
"52,2",
"125,7",
"41.544",
"-51,3",
"-8,5",
"102.514",
"146,8",
"99,4",
"285.473",
"55,2"
]
],
"resCode":0,
"message":"OK!"
}我想通过数据流将其加载到Azure SQL表中。我尝试了“扁平化”,我认为这是正确的一步,但如何映射列?正确的语法是什么?
我需要的是这样的东西:
analysisData[0] -> Screw
analysisData[1] -> Type
analysisData[2] -> Class_Region数组中的索引的语法是什么(类似于analysisData)?
发布于 2021-09-17 07:42:56
而不是使用analysisData[]来调用值螺旋,类型,类-区域。请使用columnNames[]来获得相同的结果,或者请使用标记中提到的注释,其中您必须将列名展平为行值,并且您必须再次使用透视来转换这些值以映射列。
https://stackoverflow.com/questions/69164064
复制相似问题