Create partition by query does not have effect

I tried to create a partition table with that query:

BEGIN

CREATE TABLE dataset.tmp_table
PARTITION BY TIMESTAMP_TRUNC(partition_field, MONTH)
CLUSTER BY cluster_field AS
select * from dataset.table where 1 = 1;

DROP TABLE dataset.table;

ALTER TABLE dataset.tmp_table RENAME TO table;

END;

but there is no effect and table has 0 partitions.

Just to clarify your use case, did you encounter any error message while executing the CREATE TABLE query? If yes, can you also post it?

It should at least one partition even if rows are having only one month data. I would check the Month column data. I guess it might have only one month data. Is the data span across multiple months? If its having more than one month records and not showing partition, then it might be something else.

Hey @stangorch did you see @aaronscottb 's follow up question? We want to make sure you get the solution you were looking for!