The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.
Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!
Partitioning table on year and week of the year
alter table TABLE_NAME partition by EXTRACT(YEAR FROM to_timestamp(CC)); ROLLBACK 2552: Cannot use meta function or non-deterministic function in PARTITION BY expression alter table TABLE_NAME partition by date_part('YEAR',to_timestamp(CC)); ROLLBACK 2552: Cannot use meta function or non-deterministic function in PARTITION BY expression
Data in CC column is like 1441650600 EPOCH time
Does anyone knowsthe reason?
0
Comments
Hi ,
This should work for you :
alter table TABLE_NAME partition by ( (date_part('year', TIMESTAMPADD('ss',CC,TIMESTAMP 'epoch' )) * 100) + date_part('week', TIMESTAMPADD('ss',CC,TIMESTAMP 'epoch' )));
I hope you will find it useful
Thanks .
Thank you so much . It worked as expected.