I got the solution for this issue:
- First, we will get partitions columns using the below query:
DESCRIBE DETAIL ${table_name}
- After getting the columns we can use the distinct query. The syntax is below:
SELECT DISTINCT COLUMN1,COLUMN2,... from ${table_name}
After using the above SQL query we can get partition values from the table.
In our example:
first, we will do
describe detail test_delta_partition
So we get partition columns from the above query like below
After that, we can use the distinct query and we get partition values:
SELECT DISTINCT created_time from test_delta_partition;