Giter Club home page Giter Club logo

Comments (5)

nightscape avatar nightscape commented on June 20, 2024

Ah, sorry, I didn't update the README for version 0.8.3.
Try that version, it should be able to read from Hadoop because of this: #5

from spark-excel.

raviuiit avatar raviuiit commented on June 20, 2024

Hi,

When i am trying to use 0.8.3 api as suggested by you for any column x i am getting an additional column x_color. Can you please help me, how can i remove these unnecessary columns.

sample schema generated by your API:

root
|-- name: string (nullable = true)
|-- age: double (nullable = true)
|-- location: string (nullable = true)
|-- salary: double (nullable = true)
|-- name_color: string (nullable = true)
|-- age_color: string (nullable = true)
|-- location_color: string (nullable = true)
|-- salary_color: string (nullable = true)

from spark-excel.

nightscape avatar nightscape commented on June 20, 2024

See the addColorColumns option in the README.

from spark-excel.

raviuiit avatar raviuiit commented on June 20, 2024

Getting this exception when trying to fetch the first row out of data frame
xyz.xlsx

PFA the excel file.

root
|-- name: string (nullable = true)
|-- age: double (nullable = true)
|-- location: string (nullable = true)
|-- salary: double (nullable = true)

Exception in thread "main" java.lang.RuntimeException: Unknown cell type 2 for TRUE()
at com.crealytics.spark.excel.ExcelRelation$$anonfun$1$$anonfun$3.apply(ExcelRelation.scala:66)
at com.crealytics.spark.excel.ExcelRelation$$anonfun$1$$anonfun$3.apply(ExcelRelation.scala:60)
at com.crealytics.spark.excel.ExcelRelation$$anonfun$1$$anonfun$apply$2.apply(ExcelRelation.scala:82)
at com.crealytics.spark.excel.ExcelRelation$$anonfun$1$$anonfun$apply$2.apply(ExcelRelation.scala:77)
at com.crealytics.spark.excel.ExcelRelation$$anonfun$5$$anonfun$apply$3.apply(ExcelRelation.scala:86)
at com.crealytics.spark.excel.ExcelRelation$$anonfun$5$$anonfun$apply$3.apply(ExcelRelation.scala:86)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)
at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:244)

Code:
DataFrame df = sqlContext.read().format("com.crealytics.spark.excel").option("location", "hdfs://localhost:54310/home/impadmin/xyz.xlsx")
.option("sheetName", "Sheet1").option("useHeader", "true").option("treatEmptyValuesAsNulls", "true").option("inferSchema", "true")
.option("addColorColumns", "false").load();
System.out.println("************ " + df.first());

from spark-excel.

nightscape avatar nightscape commented on June 20, 2024

Hey @raviuiit, can you create a new issue if it's a different problem?

from spark-excel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.