如题,下载了 2.9g 的数据不熟悉 scala 不知道怎么读取出来 readme 如下
“如果使用 scala,可以使用如下 case class 解析出数据
case class Answer(answer_id: Long,
question_id: Long,
question_title: String,
question_topics: Array[Long],
votup_count: Long)
case class Article(id: Long, title: String, votup_count: Long)
case class Question(question_followers: Long,
question_id: Long,
question_title: String,
question_topics: Array[Long])
case class userStringId(CREATED_ANSWERS: Array[Answer],
CREATED_ARTICLES: Array[Article],
CREATED_QUESTIONS: Array[Question],
FOLLOWED_QUESTIONS: Array[Question],
VOTEUPED_ANSWERS: Array[Answer],
VOTEUPED_ARTICLES: Array[Article],
followers_count: Long,
id: String)
case class userDigitalId(CREATED_ANSWERS: Array[Answer],
CREATED_ARTICLES: Array[Article],
CREATED_QUESTIONS: Array[Question],
FOLLOWED_QUESTIONS: Array[Question],
VOTEUPED_ANSWERS: Array[Answer],
VOTEUPED_ARTICLES: Array[Article],
followers_count: Long,
id: Long)
1
funky 2017-06-22 17:06:44 +08:00
case class 一般是你要转的 model
|