> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sifr.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# SIFR-SQL-0009: Configured SQL profile has no schema-profile import.

> Configured SQL profile has no schema-profile import.

`SIFR-SQL-0009` belongs to the **Common SQL contracts** diagnostic family. It means: configured SQL profile has no schema-profile import.

## Why It Happens

A database type, parameter, codec, result shape, effect, provider response, or handle violates the provider-neutral SQL contract.

<Info>
  Use `sifr --explain SIFR-SQL-0009` locally to see the renderer's exact message template and any machine-applicable suggestions for the compiler version you are running.
</Info>

## Fix

Import the configured profile from `sifr.sql.schemas` before using its query decorator or SQL constructor:

```sifr theme={null}
from sifr.sql.schemas import app

@app.query
def find_user(user_id: int) -> Template:
    return app.sql(t"SELECT name FROM users WHERE id = {user_id}")
```

An alias is valid when the decorator and SQL call use the imported name:

```sifr theme={null}
from sifr.sql.schemas import app as database

@database.query
def find_user(user_id: int) -> Template:
    return database.sql(t"SELECT name FROM users WHERE id = {user_id}")
```

A decorator on an unrelated object, such as `@cache.query`, is outside SQL profile discovery.

## Details

| Field | Value |
| - | - |
| Code | `SIFR-SQL-0009` |
| Family | `SQL` |
| Severity | Error |
| Stability | stable |
| Owner | `sifr_driver::build::sql_profiles` |
| Representative fixture | `crates/sifr_driver/src/build/sql_profiles_discovery_tests.rs` |

See the [Error Codes index](/diagnostics/error-codes) for the complete catalog.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.