5 Replies Latest reply on Jun 23, 2016 11:49 AM by Gustavo Villarreal

    Convert date string from Hive to a date data type on Tableau

    Gustavo Villarreal



      I have encountered a problem when try to convert a date string from a Hive extracted table (through Custom SQL) to a date format in Tableau. Any type of calculation, such as DATE(), gives me a set of Nulls. I did research on the topic and found that there was a forum that had a similar question, though it was not answered (I placed the link below).


      To give an example, the string that I get from the data is only a year number, ie. "1981", and I try to convert it to a date using a calculated field with the formula DATE([Year]+"/01/01"). Though the calculated field window says is a valid expression, when I drag the field into the viz, I only get Nulls.


      Through research it seems that HiveQL does not currently support a date data type that Tableau recognizes. Is there some way to convert the string from Hive to a date data type on Tableau so I can use date visualizations?


      I would love to include a file example, but it only happens when I connect directly to the server. I posted two images showing the problem, though.


      Thank you so much.


      LINK to forum: Custom SQL and Date Conversion