【问题标题】:Data factory data flow expressions vs dynamic expressions数据工厂数据流表达式与动态表达式
【发布时间】:2021-09-16 08:42:54
【问题描述】:

我正在尝试在通配符路径数据流表达式中找到与此等效的方法。我在我的数据工厂动态查询中使用它

@concat(  pipeline().parameters.source,
              '/dirName/year=',
              formatDateTime(utcnow(), 'yyyy'),
              '/month=',
              formatDateTime(utcnow(), 'MM'),
              '/day=',
              formatDateTime(utcnow(), 'dd')
          )

我以为会是这样的

concat( $source,'/dirName/year=',toTimestamp(currentUTC(), 'YYYY', UTC),
              '/month=',
              toTimestamp(currentUTC(), 'MM', UTC),
              '/day=',
             toTimestamp(currentUTC(), 'dd', UTC)
          )

我正在尝试做的是来自使用 UTC 日期创建的 blob 路径 示例 废话/年=2021/月=07/日=05/.csv

【问题讨论】:

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


    【解决方案1】:

    像 toString(year(currentUTC())) 这样更简单的方法会更容易工作。或者没有 concat 的字符串插值也可以工作

    "/dirName/year={year(currentUTC())}/month={month(currentUTC())}/day={day(currentUTC())}"

    【讨论】:

    • 谢谢我实际上选择了 concat('dirName/year=', toString(currentUTC(), 'yyyy'), '/month=',toString(currentUTC(), 'MM'), '/day=',toString(currentUTC(), 'dd') )
    猜你喜欢
    • 2022-11-18
    • 2021-11-25
    • 1970-01-01
    • 2020-11-22
    • 1970-01-01
    • 2021-12-08
    • 2021-09-30
    • 1970-01-01
    • 2019-11-20
    相关资源
    最近更新 更多