如何在Azure数据工厂的数据流中过滤时间戳列 [英] How to filter timestamp column in Data Flow of Azure Data Factory

查看:56
本文介绍了如何在Azure数据工厂的数据流中过滤时间戳列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个timestamp列,我在其中写了以下表达式来过滤该列:

  contact_date> = toTimestamp('2020-01-01')&&contact_date< = toTimestamp('2020-12-31') 

它不会抱怨语法,但是运行后不会根据指定的日期进行过滤.简而言之,逻辑不起作用.有什么主意吗?

数据集中的日期列:

解决方案

请不要使用 toTimestamp()函数.经过测试,您将得到空输出.

我使用了

I have timestamp column where I have written following expression to filter the column:

contact_date  >= toTimestamp('2020-01-01') && 
contact_date  <= toTimestamp('2020-12-31')

It doesn't complain about syntax but after run it doesn't filter based on date specified. Simply to say logic doesn't work. Any idea?

Date Column in Dataset:

解决方案

Please don't use toTimestamp() function. I tested and you will get null output.

I use a Filter active to filter the data. Please use the toString() and change the expression like bellow:

toString({contact_date })>= toString('2020-01-01') && toString({contact_date })<= toString('2020-12-31')

Ref my example, contact_date and output:

这篇关于如何在Azure数据工厂的数据流中过滤时间戳列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆