Error: Cannot Unload to an Inlined External Location
Issue
An Activations sync fails with the following error:
Cannot unload to an inlined external location. Please create a stage first and unload to the stage instead.
Environment
Activation destination: Snowflake
Resolution
To resolve this issue, configure a customer-managed bucket and set up a Snowflake storage integration so that Activations can unload data through an external stage.
For Amazon S3, follow these steps:
- Set up Bring Your Own Bucket. This configuration creates:
- An S3 bucket for unloaded data.
- An IAM role with access to the bucket.
- A trust policy that allow Fivetran Activations to assume the role. The role must include the following S3 permissions:
[ "s3:GetBucketLocation", "s3:GetObject", "s3:DeleteObject", "s3:ListBucket", "s3:PutObject" ] - As
ACCOUNTADMIN, run the following query to create the Snowflake storage integration. Replace the placeholders, such as<byob_role_arn>, with your information.-- NOTE: Execute as Snowflake ACCOUNTADMIN CREATE STORAGE INTEGRATION CENSUS_PUBLISH TYPE = EXTERNAL_STAGE STORAGE_PROVIDER = S3 ENABLED = TRUE STORAGE_AWS_ROLE_ARN = '<byob_role_arn>' STORAGE_ALLOWED_LOCATIONS = ('s3://<byob_bucket_name>/'); GRANT USAGE ON INTEGRATION CENSUS_PUBLISH TO ROLE <DEFAULT_ROLE_OF_SNOWFLAKE_USER_IN_ACTIVATION_SOURCE>; GRANT CREATE STAGE ON SCHEMA "CENSUS"."CENSUS" TO ROLE <DEFAULT_ROLE_OF_SNOWFLAKE_USER_IN_ACTIVATION_SOURCE>; DESC INTEGRATION CENSUS_PUBLISH;Use the same IAM role you configured for Bring Your Own Bucket. Both Fivetran Activations and Snowflake need access to the same customer-managed bucket. Activations assumes the role for Bring Your Own Bucket operations, and Snowflake assumes it when unloading data to the external stage.
- Copy the
STORAGE_AWS_IAM_USER_ARNandSTORAGE_AWS_EXTERNAL_IDvalues from theDESC INTEGRATIONoutput. - Update the Bring Your Own Bucket IAM role's trust policy to also allow the Snowflake IAM user to assume the role, using the external ID. Ensure the trust policy allows the Fivetran Activations AWS account and the IAM user in
STORAGE_AWS_IAM_USER_ARN. For instructions, see the Snowflake documentation on granting the IAM user access to bucket objects. - Contact our support team with the
STORAGE_AWS_IAM_USER_ARNandSTORAGE_AWS_EXTERNAL_IDvalues to complete the setup.
Cause
This issue occurs when the Snowflake account parameter PREVENT_UNLOAD_TO_INLINE_URL is set to TRUE.
That setting prevents COPY INTO from unloading directly to an inline external URL, including Fivetran-managed S3, GCS, or Azure storage. Snowflake requires an approved external stage instead.
A Snowflake storage integration provides that approved path. It creates a Snowflake-managed identity, restricts unloading to the allowed Bring Your Own Bucket bucket, and lets Activations use that bucket for the data needed by its state-tracking table.