executing python model via dbt terminal

The problem I’m having

I want to execute python model created in dbt core

The context of why I’m trying to do this

I created a sample file with name my_first_python as below:

import pandas as  pd
def model(dbt,session):
	my_py_1= dbt.source('src_int','table1')
	return my_py_1

And my config.yml contains below :

version: 3

models:
  - name: my_first_python
    config:
      materialized: table
      tags: ['python']

What I’ve already tried

I am trying to execute the code with command : dbt run --select my_first_python
But facing issue :

The selection criterion ‘my_first_python’ does not match any nodes
Nothing to do. Try checking your model configs and model specification args

Is your python model in the models/ folder.

Note: @Jeremy Yeo originally posted this reply in Slack. It might not have transferred perfectly.

no…its outside model folder

Move it into said folder. Profit. Unless your model paths is somewhere else.

Note: @Jeremy Yeo originally posted this reply in Slack. It might not have transferred perfectly.