codeforkjeff/dbt-sqlite

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

ChristianKranemann opened this issue · 3 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!

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.

zxiex commented

I ran into the same issue and #49 is my quick fix.

This issue has been resolved in 51.