Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Hive table is invisible if the script is scheduled with oozie

avatar
Champion Alumni

Hello,

 

I did a simple script for creating a table, and it works fine in the Hue browser.

 

CREATE DATABASE IF NOT EXISTS test;
create table test.agh_test_table_creation(
  id                int,
  dtDontQuery       string,
  name              string
)

 

When I schedule the script with oozie I get successful, but the table is not visible in the hue browser.However, the table is present in the folder: user/hive/warehouse

 

Note: My oozie workflow contains the hdfs-site.xml location:

<workflow-app name="AGH_TEST_default_workspace_create_table" xmlns="uri:oozie:workflow:0.4">
    <start to="AGH_test_default_create_table_test"/>
    <action name="AGH_test_default_create_table_test">
        <hive xmlns="uri:oozie:hive-action:0.2">
            <job-tracker>${jobTracker}</job-tracker>
            <name-node>${nameNode}</name-node>
              <job-xml>hdfs-site.xml</job-xml>
            <script>tes_table_creation_oozie</script>
            <file>hdfs-site.xml#hdfs-site.xml</file>
        </hive>
        <ok to="end"/>
        <error to="kill"/>
    </action>
    <kill name="kill">
        <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end"/>
</workflow-app>

 I got the hdfs-site.xml by downloading it from Cloudera Manager-> Clusters-> Hive-> Actions-> Download Client configuration

 

Also, the source of the issue is not reling in the derby metastore since the metastore database is not the default one. I'm mentioning this, because of the stackoverflow post: http://stackoverflow.com/questions/23615309/oozie-with-hive-issue 

Capture.PNG

 

 

What should I do in order to make the table visible in the hue interface? 

 

Thank you !

 

GHERMAN Alina
1 ACCEPTED SOLUTION

avatar
Champion Alumni

I found my error:

- I included the hdfs-site.xml file (and not hive-site.xml)

- the name of the file has to be changed (if not I have permission denied)

 

Thank you!

GHERMAN Alina

View solution in original post

1 REPLY 1

avatar
Champion Alumni

I found my error:

- I included the hdfs-site.xml file (and not hive-site.xml)

- the name of the file has to be changed (if not I have permission denied)

 

Thank you!

GHERMAN Alina