You create an external stage in Snowflake pointing to an S3 bucket with the following command:
CREATE STAGE mystage URL='s3://mybucket/data/' CREDENTIALS=(AWS_KEY_ID='AKIA...' AWS_SECRET_KEY='SECRET...');
You then run:
LIST @mystage;
What will this command output?
Think about what the LIST command does on an external stage.
The LIST command on an external stage shows all files and folders under the specified URL in the cloud storage, including metadata like size and timestamp. Snowflake requires valid credentials to access the bucket, but if provided, it can list all files regardless of extension.
Your company uses Snowflake and wants to load large datasets from cloud storage. You have options: AWS S3, Azure Blob Storage, and Google Cloud Storage (GCS). Which factor is most important when choosing the cloud storage service for loading data into Snowflake?
Think about what affects data transfer speed and cost when loading data.
Choosing a cloud storage service in the same geographic region as your Snowflake account reduces latency and data transfer costs, improving load performance. Storage cost alone or unrelated factors like logo color do not impact loading efficiency.
You want to create an external stage in Snowflake to load data from Azure Blob Storage securely. Which method provides the best security practice for authentication?
Consider the principle of least privilege and temporary credentials.
Using a SAS token with limited permissions and expiration time limits access and reduces risk if credentials are compromised. Embedding full account keys or using public access exposes data to unauthorized users. Storing keys in plain text locally is insecure.
You want to create an external stage in Snowflake to load data from Google Cloud Storage (GCS) using an IAM role for authentication. Which configuration is correct?
Think about how Snowflake integrates with GCS using IAM roles.
Using STORAGE_INTEGRATION with a configured GCS integration allows Snowflake to authenticate using IAM roles securely. Providing key files directly is less secure and not recommended. AWS or Azure credentials do not apply to GCS.
You have three external stages in Snowflake pointing to S3, Azure Blob, and GCS respectively. You want to load data from all three into a single Snowflake table using the COPY INTO command. Which statement is true about this operation?
Consider how COPY INTO references external stages.
COPY INTO commands in Snowflake load data from one external stage at a time. To load from multiple cloud storage sources, you must run separate COPY INTO commands for each stage. Snowflake does not merge or combine multiple stages automatically in one command.