What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

I downloaded the Stack Overflow data dump for the last month. It has six files, with names like stackoverflow.com.7z.001, stackoverflow.com.7z.002, etc. I tried to open one of them with Notepad++, it showed a pile of binary data, suggesting that it might be a dump. Now, how do I import it into MySQL?

Is the dump already in format Insert into table values (), or is it just the data in some space separated or CSV format, that has to be loaded? Plus any idea about the table schemas? The Meta Stack Overflow post Database schema documentation for the public data dump and Data Explorer gives you an idea about the nature of the data the tables contain, but it doesn't tell you about the schema.

share|improve this question
    
Where did you download the data ? Can you pls provide me the link ? –  user195022 Sep 4 '12 at 15:33
    
meta.stackexchange.com/questions/44330/…. You will find the link 2 or 3 answers down. –  Cupidvogel Sep 4 '12 at 19:06
    
You might find the following project helpful: github.com/1123/StackExchangeImporter. It is based upon JPA and you should be able to import the XML dumps to any relational database. –  user152468 Jul 11 at 20:02
    
If you are importing to MySQL you might want to use the following SQL script: gist.github.com/gousiosg/7600626 –  Georgios Gousios Jul 17 at 12:04

1 Answer 1

up vote 6 down vote accepted

The post you link to, Database schema documentation for the public data dump and SEDE, is the schema; so yes it does contain the schema. You can get column sizes from the Data Explorer if you want.

You might find Scripts to convert data-dump to other formats helpful.

The fact that the files are .001, .002, etc. would imply that it's been split. Probably using 7-Zip's split functionality. You can either use 7-Zip to recombine them or use another tool such as HJSplit.

share|improve this answer
    
By schema I meant the table structure, structure of the columns. This post only describes what each column represents, for example, name of the voter, his id, etc, whereas I want to know whether that column is of type char(50) or varchar(100). –  Cupidvogel Sep 1 '12 at 8:32
1  
@Cupidvogel Ben already answered this, you can get the column types & sizes from Data Explorer. –  Yannis Sep 1 '12 at 8:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .