2

27GB 近くの .xml 形式のスタック オーバーフロー データ ダンプ ファイルがあり、それらを .csv ファイルに変換したいと考えています。誰か教えてください、xmlをcsvファイルまたはpythonプログラムに変換するツール

4

2 に答える 2

0

I have written a PySpark function to parse the .xml in .csv. XmltoCsv_StackExchange is the github repo. Used it to convert 1 GB of xml within 2-3 minutes on a minimal 2-core and 2 GB RAM Spark setup. It can convert 27GB file too, just increase minPartitions from 4 to around 128 in this line.

raw = (sc.textFile(fileName, 4))
于 2016-10-15T19:33:00.283 に答える