Can you explain what you are trying to do / situation so I have a better understanding
But the AbstractLine interface has a getData() which will return a byte array.
This line in Cobol Format and can be trnsported & loaded into a new line or used directly
in Cobol.
The Schema can also be sent if needed:
1) Send the Cobol Copybook
2) Convert the Schema to Xml (and send)
A class to convert the Pojo to/from an array of bytes.
FieldIterator
If there are no redefines, It would be easy to use the newLine.getFieldIterator("recordName")
to create a map of FieldName / values
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2022-08-04
Thanks for the quick response!
I am trying to parse mainframe files which are in EBCDIC format and load the data to BigQuery table using dataflow.
But I had some performance issue if I was iterating through lines and fields in the same transformation so, I tried breaking it into two different transformation and for that I needed AbstractLine to be serializable.
I tried using getData() and xml schema, and it worked perfectly fine!
Thanks once again
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you explain what you are trying to do / situation so I have a better understanding
But the AbstractLine interface has a getData() which will return a byte array.
This line in
Cobol Formatand can be trnsported & loaded into a new line or used directlyin Cobol.
The Schema can also be sent if needed:
1) Send the Cobol Copybook
2) Convert the Schema to Xml (and send)
To Load a Cobol Copybook and create a Xml Schema:
To create a new IoBuilder from the Xml:
To create a new line from a byteArray
CodeGen solution
The
Pojotemplate in the CodeGen sub project willFieldIterator
If there are no redefines, It would be easy to use the newLine.getFieldIterator("recordName")
to create a map of FieldName / values
Thanks for the quick response!
I am trying to parse mainframe files which are in EBCDIC format and load the data to BigQuery table using dataflow.
But I had some performance issue if I was iterating through lines and fields in the same transformation so, I tried breaking it into two different transformation and for that I needed AbstractLine to be serializable.
I tried using getData() and xml schema, and it worked perfectly fine!
Thanks once again
If you have any information on performance issues I would be interested to here where they are