Referencing models across projects

I am trying to reference models across projects for the first time. That’s the goal.

We have multiple environments set. We have a _dev environment where developers can configure jobs to run against their own branches. We have a DEV environment connected to our Snowflake DEV. Staging is connected to Snowflake UAT. Production is connected to Snowflake prod.

In order to make referencing another project possible, I have configured specific folders of models as public in the project.yml file. I have run the job in our general DEV environment connected to Snowflake DEV.

I have used this in the downstream project model referencing the project.

source as (

select \* from {{ source('project_name', 'model_name') }}

),

I know that cross project references need a manifest.json file. All the documentation I can find says to create it using a job in either Staging or Production. I can’t use Staging because the DB I am working on doesn’t exist in UAT, which is what Staging is connected to. I don’t want to run it in Production because it is still WIP.

I tried running the job in DEV, downloading the json and adding it to a folder in my downstream project, but that didn’t work.

What am I missing or how can I work around not being able to run a job in Staging or Production?

Thanks in advance

The problem I’m having

The context of why I’m trying to do this

What I’ve already tried

Some example code or error messages

Put code inside backticks
  to preserve indentation
    which is especially important 
      for Python and YAML! 

Did you set up the dependencies.yml? It needs to be in the downstream project.

It has to reference the name of the upstream project as defined in the upstream project.yml

Thanks for the reply. Here is what I have done.

  1. Updated my syntax where I had source instead of ref in my downstream project to reference the upstream project. It was never going to work without that small fix.

  2. Made the models public in my upstream project yml file

  3. Created a dependencies file in my downstream project that references the upstream project

  4. Added the required database in UAT

  5. Ran a job to build the upstream project models in UAT to generated the required manifest

Now, when I say that it is not working, I am in the downstream project and am clicking on preview to see results and I get a compilation error that says it depends on a model in a package or project which was not found. So, it can’t find the upstream project.

Do I have to run a job on the downstream models? Should I be able to see results with preview? Thanks in advance. Hope this is enough detail.