# pyspark error when running a python model in athena

**URL:** <https://discourse.getdbt.com/t/pyspark-error-when-running-a-python-model-in-athena/13375>\
**Category:** Help\
**Tags:** python-models, dbt-core\
**Created:** [May 15, 2024, 1:33pm UTC](https://discourse.getdbt.com/t/pyspark-error-when-running-a-python-model-in-athena/13375 "2024-05-15T13:33:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ido.horowitz](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/ido.horowitz/32/4020_2.png) [@ido.horowitz](https://discourse.getdbt.com/u/ido.horowitz)\
**Post date:** [May 15, 2024, 1:33pm UTC](https://discourse.getdbt.com/t/pyspark-error-when-running-a-python-model-in-athena/13375/1 "2024-05-15T13:33:49Z")

</div>

Hey i am a user of dbt core with amazon athena as a db

I am trying to run a python model in dbt and run into a pyspark error.  
The code I am trying to run is really simple (for debugging) , just pointing a ref and trying to return the same dataframe and create a new table with it.

```auto
def model(dbt, session):
    df = dbt.ref("dim_users")
    return df

```

The error I am getting is:

> pyspark.sql.utils.ParseException:  
> Possibly unquoted identifier dwh-stagingdb detected. Please consider quoting it with back-quotes as `dwh-stagingdb`(line 1, pos 3)

Anyone can please assist ?

Thanks,  
ido
