I am interested in creating a unified table that is the result of a join between two tables that are located in separate databases in my Snowflake environment. I found this resource which was quite helpful: https://resources.snowflake.com/youtube-all-videos/query-multiple-databases-within-snowflake
In the example in the video, the instructor says that the following will create a unified table in the CUSTOMER_SEGMENT database:
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)
I was confused by how Snowflake knows to store the table in the CUSTOMER_SEGMENT database. Is it because the FROM statement selects from that database?
