Skip to Main Content

SQLcl

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

24.4 best practice for importing alien csv-file to allow post processing data with sufficient metadata about import.

PaavoFeb 20 2025

I have stream of alien csv files which I want to be staged as-is to database for further processing. Basically known things are:

  1. filename
  2. maximum amount of columns any file can have
  3. the used separator

So how to have all load related metadata so that there is no need to check logs or investigate alien csv-files after they have been imported, but just sql the data?

Example of additional columns per import could be like:

  1. sqlcl - load parameters used, e.g. : column_names off, delimiter ;, enclosure left “, enclosure right ”, encoding UTF8 .. etc. whatever was used to make the load to happen.
  2. in the target table populate during import extra columns to help processing the data later on:
    1. filename
    2. csv_row_number
    3. imported_sysdate
    4. .. any other suggestions for clever fields helping later on ?

rgrds Paavo

This post has been answered by Paavo on Mar 10 2025
Jump to Answer

Comments

Post Details

Added on Feb 20 2025
2 comments
53 views