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

Solved!
Herve
Level 4
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
Community Manager
Community Manager

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
Community Manager
Community Manager

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

Dataiku
0 Kudos
SeanA
Community Manager
Community Manager

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
0 Kudos
Herve
Level 4
Author

Thanks @SeanA 

0 Kudos