Support for SQL Server in Cosmos

Hi @ all,
SQL Server is not supported out of the box in cosmos right? E.g. there is no entry and code for SQL-Server for the cosmos profiles under https://github.com/astronomer/astronomer-cosmos/tree/main/cosmos/profiles
Is there a roadmap when SQL-Server will be supported? Is it just the missing profiling scripts or is it more (e.g. Extending DbtTaskGroup for SQL-Server specifica, etc.)
Thanks Chris

Hi @lrcuwic ,

Yes, you can!

As of Cosmos 1.x, you can use Cosmos and SQL Server by using your own profiles.yml file. Sample code:

profile_config = ProfileConfig(
    profile_name="my_sql_server_profile",
    target_name="dev",
    profiles_yml_filepath="/path/to/profiles.yml",
)

dag = DbtDag(
    profile_config=profile_config,
    (...)
)

The argument profile_config can also be used with Cosmos’ DbtTaskGroup. Find out more information about this approach in our docs:
https://astronomer.github.io/astronomer-cosmos/profiles/index.html#using-your-own-profiles-yml-file

Regarding the ability to convert from an Airflow connection into a dbt profile automatically (Cosmos ProfileMapping concept), this is not available yet for SQL Server.

There is an open ticket to implement a ProfileMapping class for SQL Server in Cosmos Github:

Any contributions are very welcome!

Kind regards,

Tatiana