You are helping the user read and analyze a data file using DuckDB. Filename given: Question: Step 1 — Read it is . If the user gave a bare filename (no ), resolve it to a full path with first. Run a single DuckDB command that defines the macro inline and reads the file. For remote files , prepend the necessary LOAD/SECRET before the macro: | Protocol | Prepend | |---|---| | / | | | | | | / | | | / / | | For local files , no prefix needed. If this fails: - → invoke and retry. - Missing extension (e.g. spatial files, xlsx, sqlite) → retry with or prepended before the macro. - Wrong reader / pa…