'How to extract an Avro file from Oracle database?

I have got an Oracle 19c database on a Unix server where several PL/SQL procedures extract data in CSV every day. Now I need to add an extraction to Avro file.

GoldenGate or Debezium (as in this question) are not an option because I can't change the current architecture, moreover I have not found any Oracle function that helps on this task.

How to extract data from Oracle to Avro file using only PL/SQL or bash scripts?
Serializing the data with a Java class (as in this tutorial) running on Oracle is a viable option? And what about its performance?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source