AbsaOSS / AbsaOSS/cobrix

Is it possible to read a nested Binary Field?

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

描述

## Background

Let's say that I'm reading a "normal" AVRO file using Spark. One of the fields in the schema of this Avro is a Binary encoded as EBCDIC that should be decoded using a copycobol referenced by another field within the same schema.
Potentially each record can have its copycobol (so for each record the binary might have a different schema) and the desiderata is to produce a json version of the binary field to store somewhere else.

The DF looks something like this:
| ID | SCHEMA_ID | BINARY_FIELD | FIELD1 | FIELD2 | ..... |
| -- | -- | -- | -- | -- | -- |
| 1 | 001 | M1B1N4R11 | valueX | valueZ | .. |
| 2 | 010 | M1B1N4R12 | valueY | valueW | .. |

And in the folder _copycobol/_ I have:
- 001.cob
- 010.cob

## Question
Is it possible to leverage the library to decode a field instead of a file? Or do I have to save the binary field temporarily in a file and decode it from there?

Thank you for any suggestion! :)

贡献指南

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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