您的位置:首页 > 产品设计 > UI/UE

ValueError: Some of types cannot be determined by the first 100 rows, please try again with sampling

2018-02-24 14:59 555 查看
ValueError: Some of types cannot be determined by the first 100 rows, please try again with sampling

Resolutions:1.Improve sample ratio, e.g.
sqlContext.createDataFrame(rdd, samplingRatio=0.2)
2.Tell spark the explicit schema, e.g.
from pyspark.sql.types import *schema = StructType([ StructField("column_1", StringType(), True), StructField("column_2", IntegerType(), True)])df = sqlContext.createDataFrame(rdd, schema=schema)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Spark SparkSQL
相关文章推荐