# Python model doesn't create table in BigQuery

**URL:** <https://discourse.getdbt.com/t/python-model-doesnt-create-table-in-bigquery/10323>\
**Category:** Help\
**Tags:** bigquery\
**Created:** [October 12, 2023, 9:18pm UTC](https://discourse.getdbt.com/t/python-model-doesnt-create-table-in-bigquery/10323 "2023-10-12T21:18:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joaoprg](https://avatars.discourse-cdn.com/v4/letter/j/ba8739/32.png) [@joaoprg](https://discourse.getdbt.com/u/joaoprg)\
**Post date:** [October 12, 2023, 9:18pm UTC](https://discourse.getdbt.com/t/python-model-doesnt-create-table-in-bigquery/10323/1 "2023-10-12T21:18:09Z")

</div>

I’m trying to create two new columns from an intermediate table into a final table in BigQuery.  
I’m using Pyspark; everything runs without any errors, but the table is not created in the end.

Here is my model, the two functions that I’m calling are UDFs.

```auto
def model(dbt, session):
    dbt.config(materialized="table", tags=["monitoring"])
    sequence_matcher_ratio_threshold = dbt.config.get("sequence_matcher_ratio_threshold")
    df = dbt.ref("int_messages_monitoring")
    df = df.withColumn(
        "sequence_matcher_ratio",
        get_sequence_matcher_ratio("sample_message", "chat_messages")
    )
    df = df.withColumn(
        "message_suggested_outcome",
        apply_threshold_on_message_suggested_outcome(
            "message_suggested_outcome_without_threshold",
            "sequence_matcher_ratio",
            lit(sequence_matcher_ratio_threshold)
        )
    )
    return df

```
