AbsaOSS / AbsaOSS/cobrix

Variable length record parsing

未关闭
#604 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
question
主要语言
Scala
星标
170
派生
96
平均合并
57 分钟
30 天内合并 PR
2

描述

## 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)

‘’’

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。