New to Dataiku DSS? Try out our NEW Quick Start Programs today and get onboarded on the product in just one hour! Let's go

Validation failed: Query failed: ERROR: function pg_catalog.date_part(unknown, text) does not exist

Solved!
Herve
Level 3
Validation failed: Query failed: ERROR: function pg_catalog.date_part(unknown, text) does not exist

Trying to go thru Python and Dataiku DSS tutorial, Sessionization in SQL, Hive, Pig and Python, I get the following error

Validation failed: Query failed: ERROR: function pg_catalog.date_part(unknown, text) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts. Position: 19

when validating the sql query 

SELECT *
      ,  extract(epoch from mytimestamp)
         - lag(extract(epoch from mytimestamp))
         over (PARTITION BY user_id order by mytimestamp) as time_interval
FROM toy_data_psql;

 

0 Kudos
1 Solution
SeanA
Dataiker
Dataiker

Hi @Herve, I believe the issue is the storage type of the ``mytimestamp`` column. It should be in a Date format as opposed to string. We'll be improving our instructions for this tutorial to make this a little clearer.

Dataiku

View solution in original post

0 Kudos
3 Replies
SeanA
Dataiker
Dataiker

Hi @Herve , thanks for alerting us to this. We'll investigate and get back to you.

Dataiku
0 Kudos
SeanA
Dataiker
Dataiker

Hi @Herve, I believe the issue is the storage type of the ``mytimestamp`` column. It should be in a Date format as opposed to string. We'll be improving our instructions for this tutorial to make this a little clearer.

Dataiku

View solution in original post

0 Kudos
Herve
Level 3
Author

Thanks @SeanA 

0 Kudos
Labels (1)