AbsaOSS / AbsaOSS/cobrix

Variable length record parsing

Offen
#604 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
Scala
Sterne
170
Forks
96
Ø Merge
57 Min.
Gemergte PRs (30 T.)
2

Beschreibung

## Background [Optional]
I have multi layout file with certain order.
I group each layout and last layout is repeated multiple times.

each layout is fixed length file(200 bytes).

Example:
1.FH
2.LH
3.BH1
4.DE1
5.AD
:
:
10.DE2
11.AD
:
13.BH2
14.DE1
15.AD
:
:

I rearrange layouts like
FH,LH,BH1,DE1,{4 bytes count of AD}Array[AD]
FH,LH,BH1,DE2,{4 bytes count of AD}Array[AD]
FH,LH,BH2,DE1,{4 bytes count of AD}Array[AD]
FH,LH,BH2,DE2,{4 bytes count of AD}Array[AD]

## Question

How do I parse RDD[Array[Bytes]] using framework?

‘’’
import za.co.absa.cobrix.spark.cobol.Cobrix

val rdd = ???
val df = Cobrix.fromRdd
.copybookContents(copybook)
.option("encoding", "ebcdic") // any supported option
.load(rdd)

‘’’

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.