2017-10-12 14 views
0

私のJSONオブジェクト:AWSアテナでJSON Serde解析アレイ構造体の問題

{ 
    "_total": 4, 
    "values": [ 
     { 
      "total-follower-count": 63911, 
      "organic-follower-count": 6000, 
      "paid-follower-count": 3911, 
      "time": 1399334400000 
     }, 
     { 
      "total-follower-count": 64023, 
      "organic-follower-count": 6000, 
      "paid-follower-count": 4023, 
      "time": 1399420800000 
     }, 
     { 
      "total-follower-count": 64023, 
      "organic-follower-count": 6000, 
      "paid-follower-count": 4023, 
      "time": 1399507200000 
     }, 
     { 
      "total-follower-count": 64048, 
      "organic-follower-count": 6000, 
      "paid-follower-count": 4048, 
      "time": 1399593600000 
     } 
    ] 
} 

、私は以下のような表を作成しました。

「Total_Follower_count」のような配列の値にアクセスできません。助けてください。ありがとう

答えて

0

あなたはあなたの配列を平坦化し、その上で選択を実行する必要があります。ここでの明確な例で文書化

http://docs.aws.amazon.com/athena/latest/ug/flattening-arrays.html

はそれがお役に立てば幸いです。

+0

以下のスクリプトを試しましたが、何も返しません。 \t _Totalを選択し、 \t unnested_series.valuesentry.total_follower_count \t linkedindataさt \t から\tクロスUNNEST(t.values)unnested_series(valuesentry)に参加 –