From 57e0929c7572d502879fbc5861a0b003829443e3 Mon Sep 17 00:00:00 2001 From: Robin Linacre Date: Sun, 23 Jun 2024 19:34:05 +0100 Subject: [PATCH] make compatible with a table being a csv file path --- splink/duckdb/linker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/splink/duckdb/linker.py b/splink/duckdb/linker.py index 79e3037ffe..4dc75a1433 100644 --- a/splink/duckdb/linker.py +++ b/splink/duckdb/linker.py @@ -30,7 +30,7 @@ class DuckDBDataFrame(SplinkDataFrame): def columns(self) -> list[InputColumn]: if not hasattr(self, "_columns_cache"): result = self.linker._con.execute( - f"DESCRIBE {self.physical_name}" + f"DESCRIBE (select * from {self.physical_name} limit 1)" ).fetchall() self._columns_cache = [ InputColumn(col[0], sql_dialect="duckdb") for col in result