Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Impala data reduction based on time value

Impala data reduction based on time value

New Contributor

I'm looking for a solution to restrict my data table based on year. What is the correct syntax for achieving this?

 

SELECT [column] FROM database IN('yyyy')

 

Help please :) 

1 REPLY 1

Re: Impala data reduction based on time value

Expert Contributor

Hi @Kath,

What the type of the column you want to restrict it? is it a TIMESTAMP column?
If it's a TIMESTAMP or STRING try to use this:

select [column] from [table] where extract(year from [column]) is not null;


Good luck.