pepevo
New Contributor III

select count(*) from prty_cdim where load_dt_id is not null;

there are 732734948 records

select count(*) from prty_cdim where load_dt_id is null;

0 records

create table testtable as select * from prty_cdim where load_dt_is is not null limit 10;
select count(*) from testtable;

table testtable successful created and 10 rows in it.

select load_dt_id from testtable;

load_dt_id

20140419

20140419

..

20140419

10 rows

select * from testtable where to_date(cast(load_dt_id as string),'yyyyMMdd') = date_format(date_sub(current_date(),1),'yyyyMMdd');

OK with bulk glass 1 (don't know what it's meant?). When I click the bulk image, it's - 'Accelerate queries with Delta: This query contains a highly selective filter. To improve the performance of queries, convert the table to Delta and run the Opmitize ZORDER BY command on the table 'default'.'testtable"