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

403
Vistas
AWS Glue is not able to read JSON Snappy files

I'm having issues reading data with a AWS Glue Job in PySpark:

Data is sent from a AWS firehose (sample data) to a s3 bucket, stored as JSON and compressed with snappy-hadoop.

I'm able to read data from legacy Spark dataframe with spark.read.json() but this won't work with Glue Dynamic Frame (schema is not parsed at all) using from_catalog or from_options method :

Spark Legacy DataFrame

# import from legacy spark read
spark_df = spark.read.json("s3://my-bucket/sample-json-hadoop-snappy/")
spark_df.printSchema()

- result:
root
 |-- change: double (nullable = true)
 |-- price: double (nullable = true)
 |-- sector: string (nullable = true)
 |-- ticker_symbol: string (nullable = true)
 |-- year: integer (nullable = true)
 |-- dt: date (nullable = true)

Glue DynamicFrame

# import from glue options
options_df = glueContext.create_dynamic_frame.from_options(
  connection_type="s3",
  connection_options = {"paths": ["s3://my-bucket/sample-json-hadoop-snappy/"]},
  format="json"
)
options_df.printSchema()


- result:
root
over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You can use spark legacy in the glue job also and if you want to perform operations on glue libraries only then read using spark then convert the df into dynamic frame.


df = spark.read.json("s3://my-bucket/sample-json-hadoop-snappy/")
from awsglue.dynamicframe import DynamicFrame
DynF = DynamicFrame.fromDF(df, glueContext, "df")

Currently snappy compression is supported with parquet files only in Glue libs.

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