Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

fix(dbt-fal): handle new relation quoting for Python introduced in dbt-1.4.5 #781

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

chamini2
Copy link
Member

@chamini2 chamini2 commented Mar 13, 2023

Description

We are seeing

Error: 00:24:01.472113 [error] [MainThread]: Table “freshness_table” not found

This was introduced in dbt-labs/dbt-core#7114

def source(*args, dbt_load_df_function):
    sources = {"freshness_test.freshness_table": "test.dbt_fal_custom.freshness_table"}
    key = ".".join(args)
    return dbt_load_df_function(sources[key])

vs

def source(*args, dbt_load_df_function):
    sources = {"freshness_test.freshness_table": "\"test\".\"dbt_fal_custom\".\"freshness_table\""}
    key = '.'.join(args)
    return dbt_load_df_function(sources[key])

Notice the quotes in the sources dict.

Integration tests

Adapter to test:

  • postgres

Python version to test:

  • 3.8

@chamini2 chamini2 requested a review from a team March 13, 2023 21:01
@fal-ai fal-ai deleted a comment from linear bot Mar 13, 2023
@linear
Copy link

linear bot commented Mar 13, 2023

Copy link
Collaborator

@mederka mederka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but the tests are failing 🤔

@chamini2
Copy link
Member Author

The failures are unrelated to this problem

Failing scenarios:
features/cloud.feature:6 Run a Python model with Isolate Cloud
features/cloud.feature:14 Run a Python model with Isolate Cloud and conda
features/source.feature:21 Run a Python model that queries a source with Isolate Cloud

Let's handle that in a different PR

@chamini2 chamini2 merged commit 272c750 into main Mar 13, 2023
@chamini2 chamini2 deleted the matteo/postgres-1.4.5 branch March 13, 2023 22:11
@chamini2 chamini2 changed the title fix: handle new relation quoting for Python introduced in dbt-1.4.5 fix(dbt-fal): handle new relation quoting for Python introduced in dbt-1.4.5 Mar 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants