dbeatty10 / dbt-mysql

dbt-mysql contains all of the code enabling dbt to work with MySQL and MariaDB
Apache License 2.0
75 stars 53 forks source link

Add support for unix sockets #164

Closed mwallace582 closed 9 months ago

mwallace582 commented 9 months ago

Describe the feature

It would be nice for DBT to be able to connect to MySQL via a UNIX socket rather than requiring TCP.

Describe alternatives you've considered

The main alternative would be to work around the issue by somehow bridging a TCP socket to a UNIX socket. Seems uglier and like more work than making a small change to this DBT adapter.

Additional context

I encountered an issue when configuring Google Cloud Run to connect to a CloudSQL database. Cloud Run has a built in connection feature, but only exposes the database connection via a UNIX socket.

Who will this benefit?

This would benefit anyone in a similar situation to myself where a TCP socket connection isn't available.

Are you interested in contributing this feature?

Yes, I'll have a pull request with the feature shortly.