title: Create automatic partition for S3 year/month/day/hour folders
body: <p>My S3 bucket has the following structure.</p>
  <pre><code>'s3://st.pix/year/month/day/hour' for example
  's3://st.pix/2022/09/01/06'
  </code></pre>
  <p>So I tried to create a partition table on this bucket using this code:</p>
  <pre><code>CREATE EXTERNAL TABLE IF NOT EXISTS `acco`.`Accesn` (
  
    `ad_id` string,
  
  ) 
  PARTITIONED BY (year string, month string, day string , hour string)
  ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' 
  WITH SERDEPROPERTIES (
    'serialization.format' = ',',
    'field.delim' = ','
  ) LOCATION 's3://st.pix/${year}/${month}/${day}/${hour}/'
  TBLPROPERTIES ('has_encrypted_data'='false','compressionType'='gzip');
  </code></pre>
  <p>and right after run</p>
  <pre><code>MSCK REPAIR TABLE Accesn
  </code></pre>
  <p>But unfortunately, this query gets no result.</p>
  <pre><code>SELECT count(*) FROM `acco`.`Accesn` where year ='2022' and month= '03' and day ='01' and hour ='01'
  </code></pre>
  <p>Can I use <code>${year}/${month}/${day}/${hour}/</code> in my <code>LOCATION</code> ?
  If no, what are the options to do it dynamically and not using <code>ALTER TABLE ..  ADD PARTITION</code> for a specific partition.</p>