【问题标题】:ADF Parse Transformation with JSON使用 JSON 进行 ADF 解析转换
【发布时间】:2021-05-20 15:15:23
【问题描述】:

我有以下 JSON 对象:

    {
    "comments_count": 0,
    "impressions": 2838,
    "lifetime_snapshot.followers_count": 14993,
    "likes": 10,
    "net_follower_growth": -3,
    "post_content_clicks": 19,
    "post_media_views": 415,
    "shares_count": 1,
    "video_views": 415
    }

在 Azure 数据工厂解析转换中,我正在使用以下表达式创建一个复杂对象:

    (impressions as integer,
    likes as integer,
    comments_count as integer,
    lifetime_snapshot as (snap as (followers_count as integer)),
    net_follower_growth as integer,
    post_content_clicks as integer,
    post_media_views as integer,
    shares_count as integer,
    video_views as integer)

在“数据预览”选项卡中,我得到了所有正确的整数值,但为 NULL 的 follower_count 除外。

获取lifetime_snapshot.followers_count 字段值的正确语法是什么?

【问题讨论】:

    标签: azure azure-data-factory-2 azure-data-factory-pipeline


    【解决方案1】:

    请试试这个语法:

    (
        impressions as integer,
        likes as integer,
        comments_count as integer,
        {lifetime_snapshot.followers_count} as integer,
        net_follower_growth as integer,
        post_content_clicks as integer,
        post_media_views as integer,
        shares_count as integer,
        video_views as integer
    )
    

    数据预览:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-05-05
      • 2015-07-28
      • 1970-01-01
      • 2016-06-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多