Closed PDebasish closed 1 month ago
Hi, when you download spark-cobol
from Maven you get a thin JAR which does not include dependencies. In order to use spark-cobol
in Databricks, use une of the bundles ('fat' JARs) that match your environment:
https://github.com/AbsaOSS/cobrix/releases/tag/v2.7.4
I think this is the one you can use: https://github.com/AbsaOSS/cobrix/releases/download/v2.7.4/spark-cobol_2.12-2.7.4-bundle.jar
Thanks @yruslan , I was able to convert the EBCDIC to ASCII using the JAR files.
Background: I am trying to convert an EBCDIC Mainframe file to ASCII file in a notebook. Below are the setup used:
//*Below is the code used in a Notebook using Scala. import org.apache.spark.sql.SparkSession var file_path = "abfss://" Data File Path in onelake var copybook="abfss://" ** Copybook File path in onelake
var spark = SparkSession.builder.getOrCreate() val df_cobol= spark.read.format("za.co.absa.cobrix.spark.cobol.source").option("copybook", copybook).load(file_path ) df_cobol.printSchema(); df_cobol.show()
Question
I am getting errors while executing the above code. I have attached an error snapshot on the same.