I have sqoopd data from Netezza table and output file is in HDFS, but one column is a timestamp and I want to load it as a date column in my hive table. Using that column I want to create partition on date. How can i do that?

Example: in HDFS data is like = 2013-07-30 11:08:36

In hive I want to load only date (2013-07-30) not timestamps. I want to partition on that column DAILY.

How can I pass partition by column as dynamically?

I have tried with loading data into one table as source. In final table I will do insert overwrite table partition by (date\_column=dynamic date) select \* from table1
['https://Stackoverflow.com/questions/28202116', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/4103077/']
Ideally you should avoid the problem of having to sort two arrays simultaneously by adding the currentDistance field to the Car class. Then you can sort the carList using currentDistance.

For example, using java 8 you can get the first 3 places with:

```
Arrays.stream(carList)
    .sorted((c1, c2) -> c2.currentDistance - c1.currentDistance)
    .map(c -> c.getName())
    .limit(3);

```
your car class could imlpement the Comparable interface :

```
public class Car implements Comparable<Car>

@Override
public int compareTo(Car o) {
    return this.totalOdMiles < o.totalOdMiles ? 0 : 1;
}

```

and the you can sort your array at the end of your while:

```
Arrays.sort(carList);

```

this should somehow work i guess :)