hi, im newbie here, just try learning bigquery, and sorry for my bad english
i haved tried to different condition for partitioning my dummy date log,
but the table partition seems doesnt work. and number of partition is 0 when im checking on table info log2
my code query is
DROP TABLE IF EXISTS `belajar-my-project-84215.onbigquery.log2`;
CREATE OR REPLACE TABLE `belajar-my-project-84215.onbigquery.log2`
PARTITION BY DATE_TRUNC(date, month)
CLUSTER BY id AS
SELECT
id_karyawan AS id,
tanggal AS date,
time,
datetime
FROM
`belajar-my-project-84215.onbigquery.log1`
WHERE
tanggal IS NOT NULL; ---- this make sure the date
and this detail data for log1 and log2
Table log1
id is int64 have value range 1-5000,
date is date type value range is jan 1 2024 - dec 31 2024,
time is time type value range is time 24hour, each id have 2-3 value perdate
datetime is datetime type
Table ID
belajar-my-project-84215.onbigquery.log1
CreatedFeb 12, 2025, 14:26:25 UTC+7
Last modifiedFeb 12, 2025, 14:26:25 UTC+7
Table expirationApr 13, 2025, 14:26:25 UTC+7
Data locationasia-southeast2
Default rounding modeROUNDING_MODE_UNSPECIFIED
Labels
Tags
Total logical bytes79.96 MB
tabel log 2
Table IDbelajar-my-project-84215.onbigquery.log2
CreatedFeb 13, 2025, 17:23:28 UTC+7
Last modifiedFeb 13, 2025, 17:23:28 UTC+7
Data locationasia-southeast2
Default rounding modeROUNDING_MODE_UNSPECIFIED
Labels
Tags
Partition expiration60 days
Partition filterNot required