概念 · 基于 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.
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
| Format | Layout | Best for |
|---|---|---|
| CSV | Rows, text | Small data, built-in algorithms |
| JSON | Rows, text | Nested events and logs |
| Avro | Rows, binary | Streams and schema change |
| Parquet | Columnar | Analytics and Athena |
| ORC | Columnar | Hive and Spark analytics |
| RecordIO-protobuf | Rows, binary | Built-in algorithms in Pipe mode |
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
| Format | Layout | Best for |
|---|---|---|
| CSV | Rows, text | Small data, built-in algorithms |
| JSON | Rows, text | Nested events and logs |
| Avro | Rows, binary | 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
| Format | Layout | Best for |
|---|---|---|
| Parquet | Columnar | Analytics and Athena |
| ORC | Columnar | Hive and Spark analytics |
| RecordIO-protobuf | Rows, binary | Built-in algorithms in Pipe mode |
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
| Input mode | How it works | Pick it when |
|---|---|---|
| File | Copies all data to the volume first | Small data, random access |
| Pipe | Streams data in order | Large data, one pass |
| FastFile | S3 objects look like local files | Large data, random access |
是什么
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.
本任务内容 · 1.1
- S3 as the ML data lake
- Choosing storage: S3, EFS, EBS, FSx and transfer tools
- Extracting data from databases and search
- Data formats: Parquet, ORC, Avro, CSV, JSON, RecordIO
Kinesis Data Streams
Firehose
Managed Flink
MSK
- Troubleshooting ingestion and storage capacity
Catalog and Lake Formation
- Merging data from multiple sources
- Choosing and configuring a vector store
OpenSearch
- Aurora and RDS PostgreSQL with pgvector
- Ingesting text, image, audio and video
- Ingesting data into SageMaker Feature Store