Forum

This content is now out of date.

Visit Our Community

Problem with MAX function on timestap datatpe in PostgreSQL

hi,

I uploaded a csv file to yellowfin (to PostgreSQL DB) and converted a column from varchar to TimeStamp.

I tried to make a calculated field that will show me MAX(date) but unfortunately yellowfin does not like it and i get an error message

"Oh no! An error has occurred during processing, please try again later "

i tried the following : computer restart , restart to Tomcat service but nothing helped.

attached is the CSV file.

I am using Yellowfin Version 7.1 20141223

I would appreciate any help in the matter,

thanks in advance

Saul
Hello Saul,

I've responded to you via email. I will update this forum
thread accordingly.

Thank you for your patience.

Kyle
Hi Kyle,

I did not get any email on the subject.

Can you please send it again.

Shaul
Hi Shaul,

I've pasted the email that I sent you below.....

Hello Shaul,

I understand that you did post your question on the forum and thank you for doing that!

However, I did notice that the video you mentioned did not come through on the forum
and was wondering if it was possible for you to attach that to this email thread?

We would like to see the steps you took to input the CSV, how you converted the Varchar
to a TImeStamp, your attempt at the calculated field, and lastly, the version and build
of YF that you are currently using.

Is this possible? Please let us know.

Thank you.

Hi,

Here is the link to the video.

LINK

I am using Yellowfin Version 7.1 20141223


Shaul
Hi Shaul,

Thank you very much for linking in your video for
added clarification.

I will have a look at this and respond
accordingly.

Thank you for your continued patience.

Kyle
Hi Shaul,

thanks for the video link, what you showed looks like an issue and I will certainly follow up on it with the developers. However, in the meanwhile I've found a workaround which I'll show you now:

1) paste the following code at the bottom of your custom-function.xml file (appserverwebappsROOTWEB-INF) just before the final tag

[code]

To Timestamp

1
DateTimeVarChar
text



to_timestamp($1, 'DD/MM/YYYY HH24:MI:SS')


to_timestamp($1, 'DD/MM/YYYY HH24:MI:SS')
PostgreSQL
datetime
[/code]

save the file then restart Yellowfin.

2) create a new Calculated Field but this time choose Pre-Defined Formula as the Formula Type, then look for your new function.


Forum image


3) and don't forget to set the variable


Forum image


4) after saving that 1st Calc Field, then create the 2nd one that uses the MAX function on the previous Calc Field. This is where you were getting the error, however, this time it validates successfully


Forum image


5) And then, here is a draft report using that Calc Field based on your test data, you can check the values.


Forum image


Hope that helps, please let us know if you run into any problems.

regards,
Dave
Hi Shaul,

just letting you know that I've created a product defect for the failing calculated field that you have experienced, the support task ID is 184948 and has been added to the agenda for the next developers' meeting for discussion and allocation and hopefully, resolution.

In the meantime I hope that the workaround I mentioned previously is working for you. And if you are having any problems with it then please let me know and I'll be only too glad to try and help out.

regards,
Dave
Thank you Dave.

That helped
Thank you Dave.

That helped
Thank you Dave.

That helped
Thank you Dave.

That helped
Thank you Dave.

That helped
Thank you Dave.

That helped
great, glad the workaround helped. And thanks for the many Thanks!

regards,
Dave