ladderlore
  • 输入服务名称,例如 S3 或 IAM。

概念 · 基于 SAA-C03

Data formats: Parquet, ORC, Avro, CSV, JSON, RecordIO

Pick a format by how the data is read: whole rows or a few columns, and which tool reads it.

本课尚未翻译,暂以英文显示。

你在Solutions Architect Associate中已学过

  • Athena cost follows the data scanned, so columnar formats and compression save money.
  • Partitions let a query skip whole folders.
  • Fewer, larger files read faster than many small ones.
阅读Solutions Architect Associate课程
  • CSV

    Layout
    Rows, text
    Best for
    Small data, built-in algorithms
  • JSON

    Layout
    Rows, text
    Best for
    Nested events and logs
  • Avro

    Layout
    Rows, binary
    Best for
    Streams and schema change
  • Parquet

    Layout
    Columnar
    Best for
    Analytics and Athena
  • ORC

    Layout
    Columnar
    Best for
    Hive and Spark analytics
  • RecordIO-protobuf

    Layout
    Rows, binary
    Best for
    Built-in algorithms in Pipe mode
Six formats and where each fits.

1 / 2

  • CSV

    Layout
    Rows, text
    Best for
    Small data, built-in algorithms
  • JSON

    Layout
    Rows, text
    Best for
    Nested events and logs
  • Avro

    Layout
    Rows, binary
    Best for
    Streams and schema change

2 / 2

  • Parquet

    Layout
    Columnar
    Best for
    Analytics and Athena
  • ORC

    Layout
    Columnar
    Best for
    Hive and Spark analytics
  • RecordIO-protobuf

    Layout
    Rows, binary
    Best for
    Built-in algorithms in Pipe mode
Six formats and where each fits.
  • File

    How it works
    Copies all data to the volume first
    Pick it when
    Small data, random access
  • Pipe

    How it works
    Streams data in order
    Pick it when
    Large data, one pass
  • FastFile

    How it works
    S3 objects look like local files
    Pick it when
    Large data, random access
Three input modes for training data in S3.

是什么

Row formats store a record together: CSV, JSON and Avro. They suit reading whole records and writing one record at a time. Columnar formats store each column together: Parquet and ORC. They suit analytics that read a few columns of many rows, and they compress well. Avro keeps its schema inside the file, so it fits streams and schema changes. RecordIO-protobuf is a binary record format that SageMaker built-in algorithms read, often in Pipe mode.

是什么

Compression matters for parallel reads. A gzip-compressed CSV file cannot be split, so one worker reads the whole file. Parquet and ORC compress inside the file in blocks, so they stay splittable. Partition by the columns that queries filter on, such as date, and keep files large, around 128 MB or more, instead of thousands of tiny ones.

是什么

SageMaker built-in algorithms mostly read CSV or RecordIO-protobuf. For CSV, give no header and put the target in the first column. For Parquet, convert in a Glue or Processing job, or use script mode with a framework container that reads it. Three input modes decide how a training job gets S3 data: File copies everything first, Pipe streams it, and FastFile makes S3 objects look like local files and streams them on demand.

要记住

  • Columnar (Parquet, ORC): few columns of many rows. Row (CSV, JSON, Avro): whole records.
  • Avro carries its schema, so it fits Kafka and schema change.
  • Gzip on a CSV file is not splittable. Parquet and ORC stay splittable.
  • Built-in algorithms: CSV with no header and the target first, or RecordIO-protobuf.

要记住

  • File copies the data to the volume. Pipe and FastFile stream it from S3.
  • Partition by filter columns, and keep files large.

考试中

  • “Queries read two columns of a very wide table” points to Parquet or ORC.
  • “The training data is too big for the instance volume” points to Pipe or FastFile mode.
  • “A SageMaker built-in algorithm needs CSV” points to no header and the label in the first column.