Skip to Content
Dismiss
創新
專為 AI 打造的平台

整合式、自動化、可將資料轉化為高效情報。

深入了解
Dismiss
拉斯維加斯,6 月 16-18 日
Pure//Accelerate® 2026

探索如何完整釋放資料價值。 

立即報名

什麼是 Parquet 檔案?

Apache Parquet 檔案是一種開源資料儲存格式,用於分析查詢的欄式資料庫。如果您有小型資料集,但要搜尋的行數數百萬,最好使用欄式格式來提升效能。欄式資料庫透過將欄分組來儲存資料,而不是將資料分組的標準列式資料庫。Parquet 檔案是數種欄式儲存格式之一。

什麼是 Parquet 檔案?

Apache Parquet 檔案群組不會將 Excel 試算表或標準關聯式資料庫等資料列分組,而是將資料列在一起,以提升效能。Parquet 是一種欄式儲存格式,而非資料庫本身,但 Parquet 格式在資料湖泊中很常見,尤其是在 Hadoop 中。因為這是欄式格式,所以很受分析資料儲存和查詢的歡迎。

大多數的開發人員都使用行式資料儲存,但想像旋轉 Excel 試算表,以便現在顯示欄來取代編號行。舉例來說,Parquet 檔案會將每個名字與姓氏組合成一列,而不是將名字與姓氏列的清單保留在客戶表格上,這樣一來,資料庫就可以更快速地從特定列傳回資訊,而不必搜尋包含許多列的每一列。 

Parquet 檔案的優點

除了根據 Parquet 檔案儲存資料的方式進行查詢效能外,另一個主要優勢是成本效益。Apache Parquet 檔案具有高效率的壓縮和解壓縮功能,因此不會比標準資料庫檔案佔用太多空間。透過減少儲存空間,企業組織可以節省數千美元的儲存成本。

欄式儲存格式最適合用於大數據和分析查詢。Parquet 檔案可以儲存影像、影片、物件、檔案和標準資料,因此可用於任何類型的分析應用程式。由於 Parquet 檔案策略是開放原始碼,因此也適合想要自訂資料儲存和查詢策略的組織。

Parquet 檔案如何運作

Parquet 檔案包含欄式儲存,但也包含中繼資料 這些資料欄在各行群組中分組,以達到查詢效率,而中繼資料則有助於資料庫引擎找出資料。中繼資料包含有關欄、包含資料的列群組,以及架構的資訊。 

Parquet 檔案中的架構描述了以欄為基礎的儲存方法。Schema 格式為二進位格式,可用於 Hadoop 資料湖泊環境。Parquet 檔案可以儲存在任何檔案系統中,因此不限於 Hadoop 環境。

Parquet 檔案儲存格式的一個優勢是一種稱為預先推動的策略。資料庫引擎在處理初期會預先進行資料篩選,以便將更精準的資料傳輸到管道中。透過減少針對查詢的資料量,可改善查詢效能。減少資料處理也會減少電腦資源的使用,最終也降低成本。

使用 Parquet 檔案

Parquet 檔案是 Apache 檔案,因此只要匯入數個函式庫,您就可以使用自己的 Python 指令碼建立檔案。假設您在 Python 中有一個表格:

import numpy as np
 import pandas as pd
 import pyarrow as pa
 df = pd.DataFrame({'one': [-1, 4, 1.3],
                   'two': ['blue', 'green', 'white'],
                   'three': [False, False, True]},
                   index=list('abc'))
 table = pa.Table.from_pandas(df)

透過此表格,我們現在可以建立一個 Parquet 檔案:

import pyarrow.parquet as pq
 pq.write_table(table, 'mytable.parquet')

上述程式碼會建立檔案 “mytable.parquet”,並將表格寫入其中。您現在可以從喜愛的資料庫讀取資料並匯入資料,或是將資料用於自己的查詢和分析。

您也可以使用 Python 從檔案讀取此表格:

pq.read_table('mytable.parquet', columns=['one', 'three'])

write()功能可讓您在將表格寫入檔案時設定選項。您可以在 Apache 的網站上找到選項清單,但以下是設定檔案與 Apache Spark 相容性的範例

import numpy as np
 import pandas as pd
 import pyarrow as pa
 df = pd.DataFrame({'one': [-1, 4, 1.3],
                   'two': ['blue', 'green', 'white'],
                   'three': [False, False, True]},
                   flavor=’spark’)
 table = pa.Table.from_pandas(df)

結論

如果您打算將 Parquet 檔案用於 Hadoop、Apache Spark 或其他相容的資料庫,您可以使用 Python 自動建立檔案,或將檔案匯入資料庫環境進行分析。Parquet 檔案使用壓縮來降低儲存空間需求,但您仍然需要過多的儲存容量來儲存大數據孤島。Pure Storage 的重複資料刪除和壓縮技術可協助您處理大數據儲存

11/2024
Pure Storage FlashArray//X | Pure Storage
強大效能,加速關鍵應用程式
資料文件
5 頁

查看重要資訊與活動

商展
Pure//Accelerate® 2026
June 16-18, 2026 | Resorts World Las Vegas

準備好參加今年度為您帶來最大價值的活動了嗎?

立即報名
PURE360 示範
探索、認識、體驗 Everpure。

存取隨取隨用影片與示範,了解 Everpure 的強大功效。

觀賞示範影片
影片
觀看影片:企業級資料雲端的價值。

Charlie Giancarlo 討論管理為何管理資料才是未來趨勢,而非儲存設備。發掘整合式做法如何革新企業級 IT 作業。

立即觀看
資源
傳統儲存裝置無法驅動未來。

現代化工作負載需求必須達到 AI 級速度、安全性與規模。您的技術棧準備好了嗎?

進行評估
您的瀏覽器已不受支援!

較舊版的瀏覽器通常存在安全風險。為讓您使用我們網站時得到最佳體驗,請更新為這些最新瀏覽器其中一個。

Personalize for Me
Steps Complete!
1
2
3
Personalize your Everpure experience
Select a challenge, or skip and build your own use case.
迎向未來的虛擬化策略

因應所有需求的儲存方案

任意規模皆可實行 AI 專案

資料管道、訓練、推論專用的高效能儲存裝置

防護資料遺失問題

保衛資料的網路彈性解決方案

降低雲端作業成本

Azure、AWS 與私有雲專用的高成本效益儲存裝置

加速應用程式與資料庫效能

低延遲儲存裝置,達成應用程式高效能

降低資料中心耗能與空間使用

高效資源運用的儲存裝置,改善資料中心運用率

Confirm your outcome priorities
Your scenario prioritizes the selected outcomes. You can modify or choose next to confirm.
Primary
Reduce My Storage Costs
Lower hardware and operational spend.
Primary
Strengthen Cyber Resilience
Detect, protect against, and recover from ransomware.
Primary
Simplify Governance and Compliance
Easy-to-use policy rules, settings, and templates.
Primary
Deliver Workflow Automation
Eliminate error-prone manual tasks.
Primary
Use Less Power and Space
Smaller footprint, lower power consumption.
Primary
Boost Performance and Scale
Predictability and low latency at any size.
What’s your role and industry?
We've inferred your role based on your scenario. Modify or confirm and select your industry.
Select your industry
Financial services
Government
Healthcare
Education
Telecommunications
Automotive
Hyperscaler
Electronic design automation
Retail
Service provider
Transportation
Which team are you on?
Technical leadership team
Defines the strategy and the decision making process
Infrastructure and Ops team
Manages IT infrastructure operations and the technical evaluations
Business leadership team
Responsible for achieving business outcomes
Security team
Owns the policies for security, incident management, and recovery
Application team
Owns the business applications and application SLAs
Describe your ideal environment
Tell us about your infrastructure and workload needs. We chose a few based on your scenario.
Select your preferred deployment
Hosted
Dedicated off-prem
On-prem
Your data center + edge
Public cloud
Public cloud only
Hybrid
Mix of on-prem and cloud
Select the workloads you need
Databases
Oracle, SQL Server, SAP HANA, open-source

Key benefits:

  • Instant, space-efficient snapshots

  • Near-zero-RPO protection and rapid restore

  • Consistent, low-latency performance

 

AI/ML and analytics
Training, inference, data lakes, HPC

Key benefits:

  • Predictable throughput for faster training and ingest

  • One data layer for pipelines from ingest to serve

  • Optimized GPU utilization and scale
Data protection and recovery
Backups, disaster recovery, and ransomware-safe restore

Key benefits:

  • Immutable snapshots and isolated recovery points

  • Clean, rapid restore with SafeMode™

  • Detection and policy-driven response

 

Containers and Kubernetes
Kubernetes, containers, microservices

Key benefits:

  • Reliable, persistent volumes for stateful apps

  • Fast, space-efficient clones for CI/CD

  • Multi-cloud portability and consistent ops
Cloud
AWS, Azure

Key benefits:

  • Consistent data services across clouds

  • Simple mobility for apps and datasets

  • Flexible, pay-as-you-use economics

 

Virtualization
VMs, vSphere, VCF, vSAN replacement

Key benefits:

  • Higher VM density with predictable latency

  • Non-disruptive, always-on upgrades

  • Fast ransomware recovery with SafeMode™

 

Data storage
Block, file, and object

Key benefits:

  • Consolidate workloads on one platform

  • Unified services, policy, and governance

  • Eliminate silos and redundant copies

 

What other vendors are you considering or using?
Thinking...
Your personalized, guided path
Get started with resources based on your selections.