•   almost 5 years ago

Select privileges

Hi,

I'm trying to connect to BigSQL via SQuirreLSQL. I'm using the biblumix user and following the tutorial here:

http://www-01.ibm.com/support/knowledgecenter/SSPT3X_3.0.0/com.ibm.swg.im.infosphere.biginsights.tut.doc/doc/less_bsql_task_crsc2tables.html

I can run SELECT queries from the BigSQL console just fine and I get results back. However, from SQuirreLSQL I get the following error:

Error: Error while processing statement: Authorization failed:No privilege 'Select' found for inputs { database:bigsheetsanalysis, table:sheetsout, columnName:country}. Use show grant to get more details.
SQLState: null
ErrorCode: 403

I'm not sure what's going wrong here ('show grant' doesn't seem to be a valid query). Do I need to authorize the biblumix user? If so, is there documentation on how to do that somewhere?

Thanks!
Kevin

  • 5 comments

  •   •   almost 5 years ago

    The database use in the connect should be "bigsql". Will inestigate if it is possible to "create schema".

  •   •   almost 5 years ago

    When following the tutorial, you have to skip the "create schema" step and use the default schema (which is 'biblumix'). The user biblumix currently does not have permission to create the "BigSheetAnalysis" schema.

  •   •   almost 5 years ago

    Two questions:

    1) In BigSQL, you can change the schema by specifing 'USE biblumix;'. However, using the JDBC connector, this isn't a valid query; I suspect you change the JDBC url in order to specify the database. Is this correct? i.e., jdbc:hive2://host:port/database

    2) Assuming #1 is true, I'm still having errors. In the BigSQL console, this query:

    USE biblumix;
    SELECT * FROM sheetsOut WHERE country='DE';

    Returns 7 results. However, connecting to the biblumix database via JDBC and running "SELECT * FROM sheetsOut WHERE country='DE'" returns:

    "Error running instance method java.sql.SQLException: Error while processing statement: Authorization failed:No privilege 'Select' found for inputs { database:biblumix, table:sheetsout, columnName:country}. Use show grant to get more details. at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:165) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:153) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:210) at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:312) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:483) "

    If I run 'SHOW SCHEMAS' or 'SHOW TABLES', I get responses using the JDBC connector, but I can't seem to SELECT from a table or CREATE a table.

  •   •   almost 5 years ago

    There are 3 JDBC services provided by Analytics For Hadoop service
    1) Hive service using the url jdbc:hive2://:10000/default
    2) BigSQL v1 using the url jdbc:bigsql://:7052/...
    3) BigSQL using the url jdbc:db2://:51000/bigsql
    In your example, you are connecting to Hive and the default database is "default". On hive, "schema" is alias to "database" and biblumix has the authority to create "schema". If you are trying to follow the tutorial, you would want to use (3)

  •   •   almost 5 years ago

    Brilliant, that worked! I ended up going with #2, which worked with the driver I downloaded from here:

    http://www-01.ibm.com/support/knowledgecenter/SSPT3X_2.1.2/com.ibm.swg.im.iis.dataclick.doc/topics/create_connections_hive.html

    #3 reports no driver found, but not a huge deal for my purposes since #2 will work fine for me.

    Thanks for your help!

Comments are closed.