Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

193
Vistas
"Where clause" is not working in AWS Athena

data sample

I used AWS Glue Console to create a table from S3 bucket in Athena. You can see a relevant part on the screenshot above. I obfuscated column name, so assume the column name is "a test column". I would like to select the records with value D in that column. The query I tried to run is:

SELECT 
    * 
FROM 
    table 
WHERE 
    "a test column" = "D"

Nothing is returned. I also tried to use IS instead of =, as well as to surround D with single quotes instead of double quotes within the WHERE clause:

-- Tried this
WHERE 
    "a test column" = 'D'

-- Tried this
WHERE 
    "a test column" IS "D"

-- Tried this
WHERE 
    "a test column" IS 'D'

Nothing works. Can someone help? Thank you.

The error message I got is

Mismatched input 'where' expecting (service: amazon athena; status code: 400; error code: invalid request exception; request id: 8f2f7c17-8832-4e34-8fb2-a78855e3c17d)

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Problem with the query syntax. Use single quotes (') when you refer to a string values, because double quotes refer to a column name in your table.

SELECT 
    * 
FROM 
    table 
WHERE 
    "column_name" = 'D'
over 4 years ago · Santiago Trujillo Denunciar

0

The unexpected answer (also apologize if I did not say it clearly in the original post) is that, I cannot add "limit 200" in front of the where clause. I have to add it in the end. Hope it helps others.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda