dbt-sqlite icon indicating copy to clipboard operation
dbt-sqlite copied to clipboard

AttributeError: 'SQLiteCredentials' object has no attribute 'host'

Open ChristianKranemann opened this issue 2 years ago • 2 comments

Hey

i am using dbt-sqlit 1.4.0 with dbt-core 1.5.2 and i get the following error:

  File "XXX\.venv\Lib\site-packages\dbt\adapters\sqlite\connections.py", line 40, in unique_field
    return self.host
           ^^^^^^^^^
AttributeError: 'SQLiteCredentials' object has no attribute 'host'

The problem is the telemetry hash in SQLiteCredentials subclassing Credentials :

    @property
    def unique_field(self):
        """
        Hashed and included in anonymous telemetry to track adapter adoption.
        Pick a field that can uniquely identify one team/organization building with this adapter
        """
        return self.host

Credentials from dbt.adapters.base has no field host. Maybee change it to self.schema_directory ?

Best Regards!

ChristianKranemann avatar Jul 13 '23 13:07 ChristianKranemann

I am stuck on the same issue. :) But @ChristianKranemann's fix works for me. I am unfamiliar with the codebase enough to understand if this is a good solution but something should be implemented, otherwise the adapter is rendered unusable.

aleenprd avatar Aug 08 '23 19:08 aleenprd

I ran into the same issue and https://github.com/codeforkjeff/dbt-sqlite/pull/49 is my quick fix.

zxiex avatar Aug 24 '23 19:08 zxiex

This issue has been resolved in 51.

tom-juntunen avatar Apr 20 '24 23:04 tom-juntunen