Giter Site home page Giter Site logo

Comments (6)

thesuperzapper avatar thesuperzapper commented on August 23, 2024

@pathri-pk are you able to post that sas file? (You should be able to drag it into a reply to this issue, if its not huge)

from spark-sas7bdat.

jene4ekjene4ek avatar jene4ekjene4ek commented on August 23, 2024

Hi all. I have the same problem with this file. The file is not corrupted, because I read it with pandas.
airline.zip

from spark-sas7bdat.

mazenora avatar mazenora commented on August 23, 2024

I had the same problem, so i read the file with pandas then convert it to Spark DataFrame.

df = pd.read_sas('YOUR_FILE',format='sas7bdat')
mySchema = StructType([ ]) <-- create suitable schema structure for spark 
spark_df   = spark.createDataFrame(df,schema=mySchema)

from spark-sas7bdat.

jene4ekjene4ek avatar jene4ekjene4ek commented on August 23, 2024

I've solved this issue by using jars parso and spark-sas7bdat

from spark-sas7bdat.

mazenora avatar mazenora commented on August 23, 2024

could you please share the code?

from spark-sas7bdat.

jene4ekjene4ek avatar jene4ekjene4ek commented on August 23, 2024

In my project folder I have folder jars with parso-2.0.10.jar and spark-sas7bdat-2.1.0-s_2.11.jar (I added printscreen) and run my script as spark-submit --jars jars/spark-sas7bdat-2.1.0-s_2.11.jar,jars/parso-2.0.10.jar script.py

spark = SparkSession.builder.config("spark.jars.packages", "saurfang:spark-sas7bdat:2.1.0-s_2.11") .getOrCreate()

df = spark.read.format('com.github.saurfang.sas.spark')
.load("airline.sas7bdat")

Screenshot from 2020-04-20 21-17-53

from spark-sas7bdat.

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.