FAQ
Hi All,
I am loading data into Hive from a script and I get following error

WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
Hive history file=/tmp/praveen/hive_job_log_praveen_201109100955_48187165.txt
FAILED: Error in semantic analysis: Line 1:14 Table not found social

This is the exact command that runs inside script: /home/myserver/hive/hive-0.7.1/bin/hive -e "LOAD DATA LOCAL INPATH 'social_sample.txt' OVERWRITE INTO TABLE social;"

stack trace in hive logs:

2011-09-10 09:55:52,055 ERROR ql.Driver (SessionState.java:printError(343)) - FAILED: Error in semantic analysis: Line 1:14 Table not found social
org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Table not found social
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:917)
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6594)
at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:164)
at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:425)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Table not found social
at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:782)
... 12 more

When I run same command in hive command line, it goes through fine

hive> LOAD DATA LOCAL INPATH '/home/myserver/data-load/social_sample.txt' INTO TABLE social;
Copying data from file:/home/myserver/data-load/social_sample.txt
Copying file: file:/home/myserver/data-load/social_sample.txt
Loading data to table default.social
OK
Time taken: 3.823 seconds

Any help is appreciated.

Thanks
- Prvn

Search Discussions

  • Chalcy Raja at Sep 12, 2011 at 12:13 pm
    Looks like permission issue. Check the permission on the table social. Run the load script as sudo.

    Hope this helps!
    Chalcy

    -----Original Message-----
    From: Praveen Bathala
    Sent: Saturday, September 10, 2011 10:01 AM
    To: user@hive.apache.org
    Subject: Error while executing hive queries from script

    Hi All,
    I am loading data into Hive from a script and I get following error

    WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties files.
    Hive history file=/tmp/praveen/hive_job_log_praveen_201109100955_48187165.txt
    FAILED: Error in semantic analysis: Line 1:14 Table not found social

    This is the exact command that runs inside script: /home/myserver/hive/hive-0.7.1/bin/hive -e "LOAD DATA LOCAL INPATH 'social_sample.txt' OVERWRITE INTO TABLE social;"

    stack trace in hive logs:

    2011-09-10 09:55:52,055 ERROR ql.Driver (SessionState.java:printError(343)) - FAILED: Error in semantic analysis: Line 1:14 Table not found social
    org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Table not found social
    at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:917)
    at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6594)
    at org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
    at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:164)
    at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:425)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
    Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Table not found social
    at org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:782)
    ... 12 more

    When I run same command in hive command line, it goes through fine

    hive> LOAD DATA LOCAL INPATH '/home/myserver/data-load/social_sample.txt' INTO TABLE social;
    Copying data from file:/home/myserver/data-load/social_sample.txt
    Copying file: file:/home/myserver/data-load/social_sample.txt
    Loading data to table default.social
    OK
    Time taken: 3.823 seconds

    Any help is appreciated.

    Thanks
    - Prvn
  • Vikas Srivastava at Sep 12, 2011 at 1:25 pm
    remove the ; and check that table is present or not.

    On Mon, Sep 12, 2011 at 5:42 PM, Chalcy Raja
    wrote:
    Looks like permission issue. Check the permission on the table social.
    Run the load script as sudo.

    Hope this helps!
    Chalcy

    -----Original Message-----
    From: Praveen Bathala
    Sent: Saturday, September 10, 2011 10:01 AM
    To: user@hive.apache.org
    Subject: Error while executing hive queries from script

    Hi All,
    I am loading data into Hive from a script and I get following error

    WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please
    use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties
    files.
    Hive history
    file=/tmp/praveen/hive_job_log_praveen_201109100955_48187165.txt
    FAILED: Error in semantic analysis: Line 1:14 Table not found social

    This is the exact command that runs inside script:
    /home/myserver/hive/hive-0.7.1/bin/hive -e "LOAD DATA LOCAL INPATH
    'social_sample.txt' OVERWRITE INTO TABLE social;"

    stack trace in hive logs:

    2011-09-10 09:55:52,055 ERROR ql.Driver (SessionState.java:printError(343))
    - FAILED: Error in semantic analysis: Line 1:14 Table not found social
    org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Table not
    found social
    at
    org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:917)
    at
    org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6594)
    at
    org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
    at
    org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:164)
    at
    org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:425)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
    Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14
    Table not found social
    at
    org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:782)
    ... 12 more

    When I run same command in hive command line, it goes through fine

    hive> LOAD DATA LOCAL INPATH '/home/myserver/data-load/social_sample.txt'
    INTO TABLE social;
    Copying data from file:/home/myserver/data-load/social_sample.txt
    Copying file: file:/home/myserver/data-load/social_sample.txt
    Loading data to table default.social
    OK
    Time taken: 3.823 seconds

    Any help is appreciated.

    Thanks
    - Prvn


    --
    With Regards
    Vikas Srivastava

    DWH & Analytics Team
    Mob:+91 9560885900
    One97 | Let's get talking !
  • Ankit Jain at Sep 12, 2011 at 1:41 pm
    Hi Praveen,

    create the table 'social' before running the script.

    On Mon, Sep 12, 2011 at 9:24 AM, Vikas Srivastava wrote:

    remove the ; and check that table is present or not.

    On Mon, Sep 12, 2011 at 5:42 PM, Chalcy Raja <
    Chalcy.Raja@careerbuilder.com> wrote:
    Looks like permission issue. Check the permission on the table social.
    Run the load script as sudo.

    Hope this helps!
    Chalcy

    -----Original Message-----
    From: Praveen Bathala
    Sent: Saturday, September 10, 2011 10:01 AM
    To: user@hive.apache.org
    Subject: Error while executing hive queries from script

    Hi All,
    I am loading data into Hive from a script and I get following error

    WARNING: org.apache.hadoop.metrics.jvm.EventCounter is deprecated. Please
    use org.apache.hadoop.log.metrics.EventCounter in all the log4j.properties
    files.
    Hive history
    file=/tmp/praveen/hive_job_log_praveen_201109100955_48187165.txt
    FAILED: Error in semantic analysis: Line 1:14 Table not found social

    This is the exact command that runs inside script:
    /home/myserver/hive/hive-0.7.1/bin/hive -e "LOAD DATA LOCAL INPATH
    'social_sample.txt' OVERWRITE INTO TABLE social;"

    stack trace in hive logs:

    2011-09-10 09:55:52,055 ERROR ql.Driver
    (SessionState.java:printError(343)) - FAILED: Error in semantic analysis:
    Line 1:14 Table not found social
    org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14 Table not
    found social
    at
    org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:917)
    at
    org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.analyzeInternal(SemanticAnalyzer.java:6594)
    at
    org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer.analyze(BaseSemanticAnalyzer.java:238)
    at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:340)
    at org.apache.hadoop.hive.ql.Driver.run(Driver.java:736)
    at
    org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:164)
    at
    org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:241)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:425)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:156)
    Caused by: org.apache.hadoop.hive.ql.parse.SemanticException: Line 1:14
    Table not found social
    at
    org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.getMetaData(SemanticAnalyzer.java:782)
    ... 12 more

    When I run same command in hive command line, it goes through fine

    hive> LOAD DATA LOCAL INPATH '/home/myserver/data-load/social_sample.txt'
    INTO TABLE social;
    Copying data from file:/home/myserver/data-load/social_sample.txt
    Copying file: file:/home/myserver/data-load/social_sample.txt
    Loading data to table default.social
    OK
    Time taken: 3.823 seconds

    Any help is appreciated.

    Thanks
    - Prvn


    --
    With Regards
    Vikas Srivastava

    DWH & Analytics Team
    Mob:+91 9560885900
    One97 | Let's get talking !

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedSep 10, '11 at 2:01p
activeSep 12, '11 at 1:41p
posts4
users4
websitehive.apache.org

People

Translate

site design / logo © 2021 Grokbase