How many records does Spark use to infer the schema? entire file or just the first "X" number of records?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2021 04:09 PM
It depends.
If you specify the schema it will be zero, otherwise it will do a full file scan which doesn’t work well processing Big Data at a large scale.
CSV files Dataframe Reader https://spark.apache.org/docs/latest/api/python/reference/api/pyspark.sql.DataFrameReader.csv.html?h... samplingRatio will let you change how you sample the data on inference.
Labels:
- Labels:
-
Big data