Schema is getting clubbed from profiles.yml and config in the sql model

The problem I’m having

I have defined schema default one in profiles.yml, and i am passing config in sql model, so when dbt creates a view in snowflake, it should pick the schema from the config in sql instead of profiles.yml
however when i run it clubs the 2, this is happening locally

The context of why I’m trying to do this

{{ config(
materialized=‘view’,
schema=‘SAMPLE’,
alias=‘SAMPLE_V’,
copy_grants=true
) }}

SELECT
*
FROM DBO.TRANSACTION_ALL_V
LIMIT 100

so when creating it clubs from profiles.yml
so in profiles.yml has schema=‘dev_schema’
and when it creates it clubs dev_schema with SAMPLE.

What I’ve already tried

Some example code or error messages

no error message, it just creates wrong schema and when deploying creates a new schema in snowflake

Put code inside backticks
  to preserve indentation
    which is especially important 
      for Python and YAML! 

This is going to be related to the generate schema name macro.
By default, it should be putting it in dev_schema_sample
unless you edit the generate schema name macro to get it to behave differently.
How are you separating each developers Dev environment? The two main ways are by schema namespace or by database/catalog. Having dev_schema in your profiles .yml indicates to me you may have a setup where each developer is writing to the same space, which will cause you headaches and loses a lot of the dbt benefit.

Note: @Meagan originally posted this reply in Slack. It might not have transferred perfectly.

Here’s the docs for this: https://docs.getdbt.com/docs/build/custom-schemas

Note: @Mike Stanley originally posted this reply in Slack. It might not have transferred perfectly.