1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] DuckDB connection.execute from fast api code changes &( to amp;( in a read_xlsx query

Discussão em 'Python' iniciado por Stack, Novembro 27, 2025.

  1. Stack

    Stack Membro Participativo

    I am using a fast api code and just reading an excel file. The file is read as query=Describe SELECT * FROM read_xlsx({file_path},sheet='file name&(sheetname)'). However, this is resulting into an error like Binder Error: sheet 'file name&(sheetname)' does not exist. This same query runs and returns me result in Duck db CLI.

    Some how I noticed while i do duckdb connection.execute(query), this is throwing the error. Also, if I print the query just before calling execute I see the sheet name is correctly retained as file name&(sheetname). I tried to use HTML uncode to handle the sheet name but still it gives me same error while I call execute.

    Continue reading...

Compartilhe esta Página