This is the model structure:
Python model defination:
、、、
def model(dbt, sesion):
dbt.config(
materialized=‘table’
)
# these are DAG-aware, and return dataframes
dim_all_learners = dbt.ref("cq_temperature")
# source_thinkific_users = dbt.source("year", "temp")
philly_sample = dim_all_learners
.filter(col("temp">0))
.limit(1000)
import numpy as np
from sklearn.linear_model import LinearRegression
...
# your final 'select' statement
df = philly_sample.select("*")
return df
、、、
Then it’s running into error:
Server error: RPC server failed to compile project, call the “status” method for compile status: Compilation Error in model demo (models/demo/demo.sql)
Model ‘model.my_new_project.demo’ (models/demo/demo.sql) depends on a node named ‘my_python_model’ which was not found
So, how can I define and refer to a python model? I followed the document and failed. THanks !