Forum Discussion

romank's avatar
romank
Regular Visitor
10 years ago

Wrong date cast in filter (Spark)

Hi,

I'm using PowerBi Service with Direct Query to Spark HDinsight. One of my fields in table is timestamp - but when I try to filter my report by specific date, I got blank values. 

I've checked the query sent to Spark and see next:

 

SELECT (...) `t4` WHERE ( `t4`.`tsday` = CAST( '4/21/2016' AS timestamp) )
or
SELECT (...) `t4` WHERE ( (`t4`.`tsday`) >= (CAST( '4/21/2016 12:00:01 AM' AS timestamp))

Both cases are unacceptable for Hive, it expects specific format: "yyyy-MM-dd HH:mm:ss.SSS"

 

I don't have any idea what to do, using time features is very powerful option and it seems like no walkarounds to do it

 

2 Replies

  • ankitpatira's avatar
    ankitpatira
    Icon for Community Champion rankCommunity Champion

    romank May I ask how were you able to check the query DirectQuery feature sents to HDInsight ?

    • romank's avatar
      romank
      Regular Visitor

      ankitpatira, I can see all queries that thrift server receives in Spark History