WebAccessアクテビティの出力 (Azure Data Factory)
あるWebAPIが jsonを返す場合に、レスポンスボディの内容によって、
Azure Data Factoryの WebAccessアクティビティに格納される情報が以下のように変わる。
1. 完全に空(0バイト)の場合のWebAccessの出力配下のようになる
{
"Response" :"",
"ADFWebActivityResponseHeader" : {
"Date" : ....
:
},
"effectiveIntegrationRuntime" : "xxxxx",
"executionDuration" : 0,
:
}
上記のような結果になるので、@activity(‘Web’).output.Responseで内容を取得可能
2. かっこしかない場合
ResopnseBodyの内容
{}
WebAccessの出力結果は、以下のように”Response”がないので@activity(‘Web’).output.Responseでアクセスできない。(落ちる)
{
"ADFWebActivityResponseHeader" : {
"Date" : ....
:
},
"effectiveIntegrationRuntime" : "xxxxx",
"executionDuration" : 0,
:
}
3.配列のフィールドが1つだけ
{ "data" : [ ] }
WebAccessの出力結果は、以下のようになる。@activity(‘Web’).output.dataで配列にアクセスできる。
{
"data" :[],
"ADFWebActivityResponseHeader" : {
"Date" : ....
:
},
"effectiveIntegrationRuntime" : "xxxxx",
"executionDuration" : 0,
:
}
4. 配列の中身がある
{
"data" : [
{
"name" :" aaa",
"score" : 30
}
]
}
WebAccessの出力結果は、以下のようになる。@activity(‘Web’).output.dataで配列にアクセスできる。
{
"data" : [
{
"name" :" aaa",
"score" : 30
}
],
"ADFWebActivityResponseHeader" : {
"Date" : ....
:
},
"effectiveIntegrationRuntime" : "xxxxx",
"executionDuration" : 0,
:
}