AbsaOSS / AbsaOSS/cobrix

Is it possible to read a nested Binary Field?

Đang mở
#658 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
question
Ngôn ngữ chính
Scala
Star
170
Fork
96
Merge trung bình
57 phút
Pull request đã merge (30 ngày)
2

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.