def generate_unique_id(self, resource_name: str, hash: Optional[str] = None) -> str:
        """Returns a unique identifier for a resource
        An optional hash may be passed in to ensure uniqueness for edge cases"""

        return ".".join(
            filter(None, [self.resource_type, self.project.project_name, resource_name, hash])
        )
Returns a unique identifier for a resource
        An optional hash may be passed in to ensure uniqueness for edge cases
core/dbt/parser/base.py