<?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 Re: How to change location of the external table in hive . in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134396#M97058</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3004/amitdass.html" nodeid="3004"&gt;@Amit Dass&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3004/amitdass.html" nodeid="3004"&gt;&lt;/A&gt;can you try this &lt;/P&gt;&lt;P&gt;ALTER TABLE jsont1 SET LOCATION "hdfs://mycluster:8020/jsam/j1";&lt;/P&gt;</description>
    <pubDate>Fri, 06 May 2016 18:36:32 GMT</pubDate>
    <dc:creator>rajkumar_singh</dc:creator>
    <dc:date>2016-05-06T18:36:32Z</dc:date>
    <item>
      <title>How to change location of the external table in hive .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134391#M97053</link>
      <description>&lt;P&gt;1) CREATE EXTERNAL TABLE IF NOT EXISTS jsont1(
json string
)
LOCATION '/jsam';&lt;/P&gt;&lt;P&gt;Now I need to change the location from where above json1  points to.&lt;/P&gt;&lt;P&gt;I tried this command - ALTER TABLE jsont1 SET LOCATION "/jsam/j2" ;&lt;/P&gt;&lt;P&gt;but getting error as below : &lt;/P&gt;&lt;P&gt;FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. {0}  is not absolute or has no scheme information.  Please specify a complete absolute uri with scheme information. /jsam/j2&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 16:20:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134391#M97053</guid>
      <dc:creator>amit_dass</dc:creator>
      <dc:date>2016-05-06T16:20:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to change location of the external table in hive .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134392#M97054</link>
      <description>&lt;P&gt;can you try this one &lt;/P&gt;&lt;P&gt;alter table jsont1 set location "hdfs://jsam/j2"&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 16:20:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134392#M97054</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-05-06T16:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to change location of the external table in hive .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134393#M97055</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/8919/rajkumarsingh.html" nodeid="8919"&gt;@Rajkumar Singh&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Yes I tried this also .. getting as below&lt;/P&gt;&lt;P&gt; FAILED: IllegalArgumentException java.net.UnknownHostException: jsam&lt;/P&gt;&lt;P&gt;Below text to show jsam is available in hdfs :&lt;/P&gt;&lt;P&gt;hive&amp;gt; dfs -ls /jsam; &lt;/P&gt;&lt;P&gt;Found 1 items
drwxr-xr-x   - hadoop supergroup          0 2016-05-06 12:49 /jsam/j1&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 16:58:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134393#M97055</guid>
      <dc:creator>amit_dass</dc:creator>
      <dc:date>2016-05-06T16:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to change location of the external table in hive .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134394#M97056</link>
      <description>&lt;P&gt;can you post the full dfs location from the output of the below command&lt;/P&gt;&lt;P&gt;describe formatted jsont1;&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 17:06:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134394#M97056</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-05-06T17:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to change location of the external table in hive .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134395#M97057</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/8919/rajkumarsingh.html" nodeid="8919"&gt;@Rajkumar Singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;hive&amp;gt; describe formatted jsont1;
OK
col_name        data_type       comment
# col_name              data_type               comment
json                    string
# Detailed Table Information
Database:               logs
Owner:                  hadoop
CreateTime:             Tue May 03 15:24:27 IST 2016
LastAccessTime:         UNKNOWN
Protect Mode:           None
Retention:              0
Location:               hdfs://mycluster:8020/jsam
Table Type:             EXTERNAL_TABLE
Table Parameters:
        COLUMN_STATS_ACCURATE   false
        EXTERNAL                TRUE
        numFiles                0
        numRows                 -1
        rawDataSize             -1
        totalSize               0
        transient_lastDdlTime   1462269267
# Storage Information
SerDe Library:          org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe
InputFormat:            org.apache.hadoop.mapred.TextInputFormat
OutputFormat:           org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat
Compressed:             No
Num Buckets:            -1
Bucket Columns:         []
Sort Columns:           []
Storage Desc Params:
        serialization.format    1&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 18:32:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134395#M97057</guid>
      <dc:creator>amit_dass</dc:creator>
      <dc:date>2016-05-06T18:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to change location of the external table in hive .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134396#M97058</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3004/amitdass.html" nodeid="3004"&gt;@Amit Dass&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3004/amitdass.html" nodeid="3004"&gt;&lt;/A&gt;can you try this &lt;/P&gt;&lt;P&gt;ALTER TABLE jsont1 SET LOCATION "hdfs://mycluster:8020/jsam/j1";&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 18:36:32 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134396#M97058</guid>
      <dc:creator>rajkumar_singh</dc:creator>
      <dc:date>2016-05-06T18:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to change location of the external table in hive .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134397#M97059</link>
      <description>&lt;P&gt;Its now running using below , thanks for all your help :&lt;/P&gt;&lt;P&gt;hive&amp;gt; ALTER TABLE jsont1 SET LOCATION "&lt;STRONG&gt;hdfs:/&lt;/STRONG&gt;jsam/j1"; &lt;/P&gt;&lt;P&gt;OK
Time taken: 0.245 seconds&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;hdfs:/   :&lt;/STRONG&gt; Did you know then why its not running using hdfs://    (double slash)&lt;/P&gt;</description>
      <pubDate>Fri, 06 May 2016 18:48:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/134397#M97059</guid>
      <dc:creator>amit_dass</dc:creator>
      <dc:date>2016-05-06T18:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to change location of the external table in hive .</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/295667#M217877</link>
      <description>&lt;P&gt;The full format of an HDFS uri is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;hdfs://NAMESERVICE/path/to/your/file
hdfs://NAMESERVICE/path/to/your/directory&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;hdfs://ANYNAMENODE:PORT/path/to/your/file
hdfs://ANYNAMENODE:PORT/path/to/your/directory&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is ok to omit the nameservice/namenode part (to use the defaultFs).&lt;/P&gt;&lt;P&gt;To do it correctly, you need to keep the `hdfs://` part and relative path that starts with a `/`.&lt;/P&gt;&lt;P&gt;That is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="php"&gt;hdfs:///path/to/your/file&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(Note that it looks like `hdfs:` followed by 3x `/`s)&lt;/P&gt;</description>
      <pubDate>Sat, 09 May 2020 02:52:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-change-location-of-the-external-table-in-hive/m-p/295667#M217877</guid>
      <dc:creator>ericN</dc:creator>
      <dc:date>2020-05-09T02:52:47Z</dc:date>
    </item>
  </channel>
</rss>

