"""LOB1 ยท utilidades comunes (contenedor buscalicitaciones-etl:v2).""" import time, duckdb, sys, os sys.path.insert(0, "/code") T0 = time.time() def log(*a): print(f"[{time.time()-T0:7.1f}s]", *a, flush=True) def abrir(db='/w/tmp/lob1.duckdb', ro=False): os.makedirs('/w/tmp/duck', exist_ok=True) con = duckdb.connect(db, read_only=ro) con.execute("SET threads=4; SET memory_limit='6GB'; SET temp_directory='/w/tmp/duck'; SET max_temp_directory_size='5GB'; SET preserve_insertion_order=false") return con I = '/d/unified_20261018.identidad/'