How can I acces data from an hdfs in parquet format

조회 수: 5 (최근 30일)
André Horn
André Horn 2018년 9월 17일
댓글: Hatem Helal 2019년 4월 10일
We have a large dataset stored in parquet files on an hadoop file system and would like to use a matlab datastore to analyse them. Unfortunately I couldn't find any reports, that anybody has done this yet.
Does mathworks provide a native way to access parquet data? Perhaps one can use the fileDatastore or a matlab custom datastore? Is there a template for that?

채택된 답변

Hitesh Kumar Dasika
Hitesh Kumar Dasika 2018년 12월 20일
Mathworks has added support for Parquet files. it is available in the following link.
  댓글 수: 5
Knut Voigtlaender
Knut Voigtlaender 2019년 1월 16일
Indeed, I'm able to access parquet files hosted on a remote hadoop linux cluster from a local Windows PC Matlab.
For me it worked considering following steps:
1. I got a local Hadoop Windows installation according to
https://github.com/MuhammadBilalYar/Hadoop-On-Window/wiki/Step-by-step-Hadoop-2.8.0-installation-on-Window-10
2. log4j.properties must be copied from \hadoop-X.X.X\ect\hadoop\ to \matlab-parquet-master\Software\MATLAB\lib\jar\
3. The HADOOP_HOME environment variable should then point to the local hadoop home directory instead to Winutils.exe
4. The check for unix-style filename was removed in matlab-parquet-master\Software\MATLAB\+bigdata\+parquet\Reader.m
5. The OS-check must be removed from \matlab-parquet-master\Software\MATLAB\functions\parquetDatastore.m
or like proposed above it is possible to use directly \matlab-parquet-master\Software\MATLAB\+bigdata\+parquet\ParquetDatastore.m
After this steps I could initialize a Datastore via a remote hadoop url like
ds=bigdata.parquet.ParquetDatastore('hdfs://server:port/dir','IncludeSubfolders',true)
Hatem Helal
Hatem Helal 2019년 4월 10일
R2019a adds support for working with parquet files, see this answer and let us know if you have any further feedback.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Hatem Helal
Hatem Helal 2019년 4월 10일
MATLAB R2019a adds support for reading and writing Apache Parquet files (doc). Here are the relevant release notes:
1. Import and export column-oriented data from Parquet files in MATLAB. Parquet is a columnar storage format that supports efficient compression and encoding schemes. To work with the Parquet file format, use these functions.
2. The write function now supports writing tall arrays to Parquet files. To write a tall array, set the FileType parameter to 'parquet', for example:
write('C:\myData',tX,'FileType','parquet')
3. Read a collection of Parquet files into MATLAB workspace using parquetDatastore.
For more information on the Parquet file format, see https://parquet.apache.org/.

Hitesh Kumar Dasika
Hitesh Kumar Dasika 2018년 9월 24일
Currently, there is no support to Apache Arrow and Parquet files in MATLAB.
  댓글 수: 3
Hitesh Kumar Dasika
Hitesh Kumar Dasika 2018년 9월 24일
Thank you for your feedback. We have raised this concern with our developers and they are actively looking at including this feature in our future releases. Unfortunately, there is no workaround in this case for now. Sorry for the trouble.
Hatem Helal
Hatem Helal 2019년 4월 10일
R2019a adds support for working with parquet files, see this answer and let us know if you have any further feedback.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Large Files and Big Data에 대해 자세히 알아보기

제품


릴리스

R2017a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by