The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Unable to run 'USE DATABASE' or 'USE WAREHOUSE' statement for Snowflake

shanilashanila Member Posts: 6 Contributor II
USE WAREHOUSE WAREHOUSENAME
SELECT *
FROM "RAPIDMINER"."PUBLIC"."AUTHORDATASET" Exception: com.rapidminer.core.io.data.DataSetException Message: SQL compilation error: syntax error line 2 at position 0 unexpected 'SELECT'.

Answers

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi!

    This is an incorrect SQL statement. It might work in a special frontend that automatically separates Snowflake specific commands like USE from the other commands, but in this context it's not syntactically correct.

    Most databases use the semicolon to separate commands:

    USE WAREHOUSE WAREHOUSENAME;
    
    SELECT *
    FROM ...
    ;

    Check the documentation of your database for the separator character.
    It is still possible that it won't work, because somewhere between RapidMiner, the JDBC driver and the database some component doesn't accept multiple commands in one statement.

    In that case your best option is to specify the warehouse inside the connection object instead of changing it dynamically in the SQL statement.

    Regards,
    Balázs
Sign In or Register to comment.