Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Dataform cannot find upstream view if using workspaceName

When Schema Suffix is set to `${workspaceName}`, I start getting errors like the following:

```

Not found: Dataset <project-name>:<dataset-name>_feature_add_date_dim was not found in location US at [19:1].
```

I am using an intermediate view in this view, and it seems to only happen with this setting set. It seems like an oversight in the execution of Schema Suffixes. My code is as follows (project name is parameterized). This only seems to happen with views in the same repo!
```
...
LEFT JOIN ${ref(<project-name>, "<dataset-name>", "DateDim_uvw")} AS dd
...
```
0 2 143
2 REPLIES 2

Hello @AKatoch ,

Trying to understand your error and risking giving you a different answer to your question, I share with you that generally when I encounter this type of error it is because I do not have my .sqlx files correctly defined:

Config Tabla1 sqlx

 

 

 

config {
    type: "operations",
    database: constants.project_id,
    schema: constants.dataset,
    hasOutput: true
}

 

 

Here you have to specify database, schema, the name is set to the same name as the sqlx

Now in your sqlx 2 when you ref table1 you will no longer get errors:

 

 

${
      ref({
          database: constants.project_id,
          schema: constants.dataset,
          name: "tabla1"
      })
  }

 

 

I hope I can help you resolve your question, it would be a good idea to share a little more of your sqlx so I can help you better.

 

Hi @AKatoch,

Welcome to Google Cloud Community!

Adding to what @joelvilca has mentioned, there’s a good chance your .sqlx files are not correctly defined or the Dataform cannot find the dataset where it expects the DateDim_uvw view to reside. The key is to ensure the schema suffix is consistently applied to both the dataset and the view name within your ref function call.

I hope this helps.