<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question HANDLING CASE SENSITIVE PARTITIONS FOLDER IN HIVE in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/HANDLING-CASE-SENSITIVE-PARTITIONS-FOLDER-IN-HIVE/m-p/325045#M229506</link>
    <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have hive partitions folder at HDFS location, but all the partitions folders are in upper case.&lt;/P&gt;&lt;P&gt;i.e. YEAR=2021/MONTH=07/DAY=31/HOUR=00 like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in hive when i am creating table it taking partition columns in&amp;nbsp;lowercase&lt;/P&gt;&lt;P&gt;/year=2021/month=07/day=31/hour=00 like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;since hdfs is case sensitive and hive is case insensitive so hive is expecting partitions column in lowercase at hdfs location and I am not able to see any partition in my hive table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so is there any way to handle this case.either hive column in uppercase or Recursively change all hdfs partitions column in lowercase. I have&amp;nbsp; 8000+ partitions (1day=24 hours=30 days=12 months(24*30*12=8640)&amp;nbsp; for 1 year so not able to rename every folder manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;someone kindly suggest.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Sep 2021 07:52:11 GMT</pubDate>
    <dc:creator>Rohan44</dc:creator>
    <dc:date>2021-09-22T07:52:11Z</dc:date>
    <item>
      <title>HANDLING CASE SENSITIVE PARTITIONS FOLDER IN HIVE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HANDLING-CASE-SENSITIVE-PARTITIONS-FOLDER-IN-HIVE/m-p/325045#M229506</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have hive partitions folder at HDFS location, but all the partitions folders are in upper case.&lt;/P&gt;&lt;P&gt;i.e. YEAR=2021/MONTH=07/DAY=31/HOUR=00 like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in hive when i am creating table it taking partition columns in&amp;nbsp;lowercase&lt;/P&gt;&lt;P&gt;/year=2021/month=07/day=31/hour=00 like this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;since hdfs is case sensitive and hive is case insensitive so hive is expecting partitions column in lowercase at hdfs location and I am not able to see any partition in my hive table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so is there any way to handle this case.either hive column in uppercase or Recursively change all hdfs partitions column in lowercase. I have&amp;nbsp; 8000+ partitions (1day=24 hours=30 days=12 months(24*30*12=8640)&amp;nbsp; for 1 year so not able to rename every folder manually.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;someone kindly suggest.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 07:52:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HANDLING-CASE-SENSITIVE-PARTITIONS-FOLDER-IN-HIVE/m-p/325045#M229506</guid>
      <dc:creator>Rohan44</dc:creator>
      <dc:date>2021-09-22T07:52:11Z</dc:date>
    </item>
    <item>
      <title>Re: HANDLING CASE SENSITIVE PARTITIONS FOLDER IN HIVE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HANDLING-CASE-SENSITIVE-PARTITIONS-FOLDER-IN-HIVE/m-p/325090#M229519</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/75577"&gt;@Rohan44&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A simple one liner could help here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;for i in $(hdfs dfs -ls -R /tmp/| awk '{print $8}'| grep [A-Z] ); do hdfs dfs -mv $i `echo $i | tr 'A-Z' 'a-z'`; done&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this example I have directories with upper case names under /tmp.&amp;nbsp;&lt;/P&gt;&lt;P&gt;/tmp/MONTH=07/DAY=31/HOUR=00&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I am using a simple `mv`, when it renames the parent directory, it will fail to rename the child directories.&lt;/P&gt;&lt;P&gt;So, you might see 'no such file or directory' errors. But, run the same command a couple of times based on the depth of your partition directories. Run it as hdfs superuser.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 13:17:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HANDLING-CASE-SENSITIVE-PARTITIONS-FOLDER-IN-HIVE/m-p/325090#M229519</guid>
      <dc:creator>smruti</dc:creator>
      <dc:date>2021-09-22T13:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: HANDLING CASE SENSITIVE PARTITIONS FOLDER IN HIVE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/HANDLING-CASE-SENSITIVE-PARTITIONS-FOLDER-IN-HIVE/m-p/325091#M229520</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/75577"&gt;@Rohan44&lt;/a&gt;&amp;nbsp;Please do test this command once before you run it on actual data. You could also take a backup of the hdfs data, to be safe.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Sep 2021 13:19:43 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/HANDLING-CASE-SENSITIVE-PARTITIONS-FOLDER-IN-HIVE/m-p/325091#M229520</guid>
      <dc:creator>smruti</dc:creator>
      <dc:date>2021-09-22T13:19:43Z</dc:date>
    </item>
  </channel>
</rss>

