Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quickstart - A Comprehensive Guide: Ingestion Data into Snowflake Step 5 Additions #1825

Open
feliciatrinh opened this issue Jan 9, 2025 · 0 comments

Comments

@feliciatrinh
Copy link

feliciatrinh commented Jan 9, 2025

Describe the bug
In Step 5. SQL Inserts from the Python Connector, we're instructed to create a table with the following commands:

USE ROLE INGEST;
CREATE OR REPLACE TABLE LIFT_TICKETS_PY_INSERT (TXID varchar(255), RFID varchar(255), RESORT varchar(255), PURCHASE_TIME datetime, EXPIRATION_TIME date, DAYS number, NAME varchar(255), ADDRESS variant, PHONE varchar(255), EMAIL varchar(255), EMERGENCY_CONTACT variant);

But I get the following errors

Cannot perform CREATE TABLE. This session does not have a current database. Call 'USE DATABASE', or use a qualified name.

Cannot perform CREATE TABLE. This session does not have a current schema. Call 'USE SCHEMA', or use a qualified name.

unless I execute this

USE DATABASE INGEST;
USE SCHEMA INGEST;

such that the full instructions are now

USE ROLE INGEST;
USE DATABASE INGEST;
USE SCHEMA INGEST;
CREATE OR REPLACE TABLE LIFT_TICKETS_PY_INSERT (TXID varchar(255), RFID varchar(255), RESORT varchar(255), PURCHASE_TIME datetime, EXPIRATION_TIME date, DAYS number, NAME varchar(255), ADDRESS variant, PHONE varchar(255), EMAIL varchar(255), EMERGENCY_CONTACT variant);

An alternative would be to use the fully qualified name.

URL of where you see the bug

https://quickstarts.snowflake.com/guide/a_comprehensive_guide_to_ingesting_data_into_snowflake/index.html?index=..%2F..index#4

To Reproduce
Steps to reproduce the behavior:

  1. Follow the quick start until Step 5. SQL Inserts from the Python Connector
  2. Execute
USE ROLE INGEST;
CREATE OR REPLACE TABLE LIFT_TICKETS_PY_INSERT (TXID varchar(255), RFID varchar(255), RESORT varchar(255), PURCHASE_TIME datetime, EXPIRATION_TIME date, DAYS number, NAME varchar(255), ADDRESS variant, PHONE varchar(255), EMAIL varchar(255), EMERGENCY_CONTACT variant);

Expected behavior
Successfully create table LIFT_TICKETS_PY_INSERT

Screenshots
image

Desktop (please complete the following information):

  • OS: macOS 15.1.1
  • Browser: Chrome
  • Version 131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant