Page 1 of 1

Posted: Sun Dec 20, 2009 4:21 pm
by ray.wurlod
I don't know that there's a solution but, as a workaround, convert your date to a Julian date (int32 or int64, perhaps) and take the minimum of that.

Posted: Sun Dec 20, 2009 5:21 pm
by igorbmartins
Really? It Is not have other way? I thought in use the function iconv, but I see that in the Parallel JOB it is not work. How can I convert this date to int?

Thanks.

Posted: Sun Dec 20, 2009 6:32 pm
by chulett
What about leaving it as a string (not a date) with the string in 'yyyy-mm-dd' format and then taking the minimum of that? That or an integer in 'yyyymmdd' format.

Posted: Mon Dec 21, 2009 4:10 am
by priyadarshikunal
probably you can try to set the additional option 'Preserve Type' to true.

Posted: Mon Dec 21, 2009 1:53 pm
by ray.wurlod
Preserve Type will work. I believe this is only available in version 8.1 and later.

Posted: Tue Dec 22, 2009 3:54 am
by samder76
Instead of using an aggregator stage to find a minimun date, you can use a "Remove Duplicates" sorting your date data with the "ascending" option (when you specify your partitioning). Finally, you have just to retain the first row (duplicate to retain : first). It works well with date type for each version.

Posted: Tue Dec 22, 2009 6:34 am
by ajay.vaidyanathan
Hi,

Your DATA basically contains "DATE" values and your aggregator gets your output in "DOUBLE" data type. So convert your DATA column to a format compatible with DOUBLE data type and then try using Aggregator.

Posted: Fri Mar 11, 2016 11:30 am
by TonyInFrance
Old topic (I know) but I had to go through this (and other similar ones) since I was looking for a solution.

On a hunch I tried the option Preserve type = True within the Aggregator itself....worked fine...:-) No more warnings / aborts.

Basically what happens I guess is on choosing to preserve the datatype the output of the aggregator remains in iys source format.

Posted: Fri Mar 11, 2016 11:48 am
by chulett
You really decided to spread the love around, eh?

It has been mentioned a number of times over the years, I got 40+ hits when searching for "preserve type" just now. Up by four from yesterday. :wink:

Posted: Sat Mar 12, 2016 4:20 am
by TonyInFrance
Ha ha @ Craig

But before you and the Ray discipline me for the misdemeanor, in my defense I found 4 hits when I searched for the error message - No default type conversion from type "date" to type "dfloat".

Thought I'd thus update all 4 since in neither of them was the "preserve type" suggested as a possible solution...:-)

Posted: Sat Mar 12, 2016 7:41 am
by chulett
Ha! There was no intent to discipline, I was just amused to keep finding your post as I worked my way through all the new posts that morning. :wink: