AbsaOSS / AbsaOSS/cobrix

NOT DIVISIBLE by the RECORD SIZE

Ouverte
#182 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Scala
Étoiles
170
Forks
96
Merge moyen
57 min
PR mergées (30 j)
2

Description

Hi @yruslan ,

I am trying to read a file with the following command:
`spark.read.format("cobol").option("copybook", file://BOOK.txt").load("DATASET.dat").count()`

The error output is:

> ERROR FileUtils$: File hdfs://NHA/user/big/DATASET.dat IS NOT divisible by 200.
> java.lang.IllegalArgumentException: There are some files in DATASET.dat that are NOT DIVISIBLE by the RECORD SIZE calculated from the copybook (200 bytes per record). Check the logs for the names of the files.
>

After trying some options, the following worked:
`spark.read.format("cobol").option("copybook", "file://BOOK.txt").option("file_start_offset", "1").load("DATASET.dat ").count()`

But the line count of the file shows only 20.314.408 lines while the expected value is 38.694.112 lines and the column values are completely wrong.

Thanks for your help !

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.