Allow for a Date Type in the Data Designer Case Statement

Related products: None

If you add a Case Field in a Data Designer Transformation step, the only data types in the drop down are String, Number and Boolean.  I would like to see a Date type.

 

My use case is that I have two dates in my setup, Date1 and Date2.  I only want to pass one date to the next step in the setup (Date3).  The logic I wanted to use involved a case statement as follows:

If Date1 is null, set Date3 to Date2, else Date1

But because I had to define Date3 as a String, I don’t see Date1 and Date2 in the ‘THEN’ drop down.

Thank you Mary! Totally agree.


Or at least allow dates to be concatenated. It would allow the same thing as the case if statement when one of the dates is always null.


Thanks for posting this. 

Will work on the best possible path to solve these usecases. 

@jivanova => If we give data type transformation functions like To String (Date), would that solve this problem? Can you share some more details on what you want to do and how you would do it ideally?


@rakesh - making the date string may work in that it will allow it to then be passed for transformation, but if the end goal is to insert a date in a custom object, then you’d have to convert it back to a date after the transformation. In addition, if further down the rule you need to filter on it as a date, ie date is <rule date, then you would lose that as well. Unless you also introduce To_date(string)

My use case was merging 2 data sets where one had a date and the other didn’t. Ideally, this would be an append function given it’s the same data and structure, it just lives in 2 different tables. I wanted to merge with a case statement where if the date was null in the first dataset I would pull the date from the 2nd dataset, thus making a single date column instead of having 2. I was able to merge everything except the dates, and then had to abandon the merge altogether. 


@jivanova 

We have released Union functionality in Data Designer and it looks like your usecase will be better solved with Union. 


@jivanova did you get a chance to view the comments here.