# Issue with Undefined schema in dbt adapter test execution

**URL:** <https://discourse.getdbt.com/t/issue-with-undefined-schema-in-dbt-adapter-test-execution/14151>\
**Category:** Help\
**Tags:** testing\
**Created:** [July 9, 2024, 12:49pm UTC](https://discourse.getdbt.com/t/issue-with-undefined-schema-in-dbt-adapter-test-execution/14151 "2024-07-09T12:49:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![onepunch](https://avatars.discourse-cdn.com/v4/letter/o/e79b87/32.png) [@onepunch](https://discourse.getdbt.com/u/onepunch)\
**Post date:** [July 9, 2024, 12:49pm UTC](https://discourse.getdbt.com/t/issue-with-undefined-schema-in-dbt-adapter-test-execution/14151/1 "2024-07-09T12:49:56Z")

</div>

Hi,

I’m currently working on writing an adapter to better understand dbt, following the guide provided [here](https://docs.getdbt.com/guides/adapter-creation?step=4#define-test-cases). I created the project using the scaffolding projects and added the basic tests as described in the guide.

However, when I try to execute the `TestSimpleMaterializationsDataFusion` test, I encounter the following error:

```auto
Invalid sources config given in models/schema.yml @ sources: {'name': 'raw', 'schema': Undefined, 'tables': [{'name': 'seed', 'identifier': 'base'}]} - at path ['schema']: Undefined is not valid under any of the given schemas

```

The generated “profiles.yml” file contains the test schema:

```yaml
test:
  outputs:
    default:
      database: test
      host: localhost
      schema: test17205288183901225367_test_basic
      type: sqladapter
  target: default

```

In the `schema.yml` file in the test, there is a variable `target.schema` that should be populated with the schema from the profile. Why am I getting `Undefined` instead?

I would appreciate any insights or suggestions to resolve this issue.

Thank you!
