You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When applying to create a Snowpipe the provider returns 001757 (42601): SQL compilation error: Table 'TEST_TABLE' does not exist, even though the table exists, and the database and the schema are set properly.
Expected behavior
Create the pipe in the set database and schema for the requested table.
│ Error: 001757 (42601): SQL compilation error:
│ Table 'TEST_TABLE' does not exist
│
│ with snowflake_pipe.pipe,
│ on snowflake.tf line 85, in resource "snowflake_pipe" "pipe":
│ 85: resource "snowflake_pipe" "pipe" {
│
Additional context
Ideally, I'm using everything from other resources/data to avoid repetition, add consistency, and guarantee Terraform first creates the database, the schema, and the table, before creating the Snowpipe. For example, snowflake_table.target_table.name is from a table created in the same TF:
resource "snowflake_database" "database" {
name = local.snowflake_database
}
resource "snowflake_schema" "schema" {
database = snowflake_database.database.name
name = var.snowflake_schema
is_transient = false
is_managed = false
data_retention_days = var.snowflake_schema_data_retention_days
}
resource "snowflake_table" "target_table" {
name = var.snowflake_table
database = snowflake_database.database.name
schema = snowflake_schema.schema.name
data_retention_days = snowflake_schema.schema.data_retention_days
column {
name = "id"
type = "int"
nullable = false
}
column {
name = "col_a"
type = "string"
nullable = false
}
The provider configuration:
provider "snowflake" {
username = ****
private_key = ****
account = var.locator
region = var.region
role = "ACCOUNTADMIN"
}
As you can see, I'm running everything as ACCOUNTADMIN to avoid dealing with permissions for reporting this bug.
Available for additional clarifications.
The text was updated successfully, but these errors were encountered:
Yerachmiel-Feltzman
changed the title
Table does not exists during pipe resource creation
Table does not exist during pipe resource creation
Sep 27, 2023
Provider Version
0.70.1
Terraform Version
v1.5.6
Describe the bug
When applying to create a Snowpipe the provider returns
001757 (42601): SQL compilation error: Table 'TEST_TABLE' does not exist
, even though the table exists, and the database and the schema are set properly.Expected behavior
Create the pipe in the set database and schema for the requested table.
Code samples and commands
That's what I'm doing:
Which then returns:
Additional context
Ideally, I'm using everything from other resources/data to avoid repetition, add consistency, and guarantee Terraform first creates the database, the schema, and the table, before creating the Snowpipe. For example, snowflake_table.target_table.name is from a table created in the same TF:
The provider configuration:
As you can see, I'm running everything as
ACCOUNTADMIN
to avoid dealing with permissions for reporting this bug.Available for additional clarifications.
The text was updated successfully, but these errors were encountered: