Forum Stats

  • 3,768,556 Users
  • 2,252,810 Discussions
  • 7,874,618 Comments

Discussions

ohsh>%sql select count(*) from MOVIE_LOCAL_TAB; --> Unknown command line resource "sql"

Moh
Moh Member Posts: 131 Silver Badge
edited Feb 16, 2018 3:31AM in Big Data Connectors/Hadoop

Hi all,

I try to realize the steps from

https://blogs.oracle.com/bigdataconnectors/oracle-shell-for-hadoop-loaders-ohsh-v3

and for the following command get error:

ohsh>%sql select count(*) from MOVIE_LOCAL_TAB;

Unknown command line resource "sql"

It seems as something is in environment's configuartion wrong.

How can I solve this issue?

regards,

Moh

Best Answer

  • Mannamal-Oracle
    Mannamal-Oracle Member Posts: 260 Employee
    edited Feb 15, 2018 2:17PM Accepted Answer

    Perhaps the %sql resource has not been created?

    The same blog has an example of creating the %sql resource:

    # Create a SQL resource for Oracle Database user MOVIEDEMO

    ohsh> create sqlplus resource sql
    user="MOVIEDEMO" \ connectid="bigdatalite.localdomain:1521/orcl"

    After the sql resource is created in OHSH, it can be used in that OHSH session.

    Moh

Answers

  • Mannamal-Oracle
    Mannamal-Oracle Member Posts: 260 Employee
    edited Feb 15, 2018 2:17PM Accepted Answer

    Perhaps the %sql resource has not been created?

    The same blog has an example of creating the %sql resource:

    # Create a SQL resource for Oracle Database user MOVIEDEMO

    ohsh> create sqlplus resource sql
    user="MOVIEDEMO" \ connectid="bigdatalite.localdomain:1521/orcl"

    After the sql resource is created in OHSH, it can be used in that OHSH session.

    Moh
  • Moh
    Moh Member Posts: 131 Silver Badge
    edited Feb 16, 2018 3:31AM

    Hi @Mannamal-Oracle

    Thanks for your reply. It seems, that I did not run correct "create sql resource", after retry works correct.

    I get for next steps error, but I creare a new thread for error.

    best regards,

    Moh

This discussion has been closed.