fix: legacy extractor constructs full Keboola table ID from bucket+source_table

Was using tc['id'] which is the registry ID (e.g. 'circle'), not the
full Keboola ID (e.g. 'in.c-finance.circle') needed by the API.
This commit is contained in:
ZdenekSrotyr 2026-03-31 12:06:38 +02:00
parent 0084f80ff6
commit bd0b6d19c6

View file

@ -142,7 +142,10 @@ def _extract_via_legacy(
csv_path = tmp.name
try:
table_id = tc.get("id", tc["name"])
# Construct full Keboola table ID: bucket.source_table (e.g., in.c-finance.circle)
bucket = tc.get("bucket", "")
source_table = tc.get("source_table", tc["name"])
table_id = f"{bucket}.{source_table}" if bucket else tc.get("id", tc["name"])
client.export_table(table_id, Path(csv_path))
# Convert CSV to Parquet using DuckDB