Notice that in the UI shown at the video the CUSTOMER_SEGMENT
was selected as the database and PUBLIC
as the schema.
This is the equivalent of running:
USE DATABASE CUSTOMER_SEGMENT;
USE SCHEMA PUBLIC;
When you run it Snowflake will auto add CUSTOMER_SEGMENT.PUBLIC
to any table reference unless specified otherwise.
So :
CREATE OR REPLACE TABLE UNIFIED_DATA AS (
SELECT SEGMENT.CUST_JEY, MKTSEGMENT, COMMENT, ADDRESS, NAME
FROM CUSTOMER_SEGMENT.PUBLIC.SEGMENT
JOIN CUSTOMERS_DATA.PUBLIC.DATA
ON DATA.CUST_KEY = SEGMENT.CUST_KEY)
Is equivalent to:
CREATE OR REPLACE TABLE CUSTOMER_SEGMENT.PUBLIC.UNIFIED_DATA AS (
SELECT SEGMENT.CUST_JEY, MKTSEGMENT, COMMENT, ADDRESS, NAME
FROM CUSTOMER_SEGMENT.PUBLIC.SEGMENT
JOIN CUSTOMERS_DATA.PUBLIC.DATA
ON DATA.CUST_KEY = SEGMENT.CUST_KEY)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…