I am spooling data from cassandra as file. Column is
Id | text_file
---------------
1 JSON string (13000 characters string)
i have to load this data to oracle table. what should be my oracle table structure and ctl file format.
I am spooling data from cassandra as file. Column is
Id | text_file
---------------
1 JSON string (13000 characters string)
i have to load this data to oracle table. what should be my oracle table structure and ctl file format.
You can use SQL Loader for it. I am assuming that your file contains two fields. One is Id
and other is text_file
and you want to load it in
LOAD DATA
INFILE '<filepath>'
TRUNCATE -- see oracle docs for more options here
INTO TABLE <YOUR_TABLE_NAME>
fields terminated by '|'
(
ID,
text_file CHAR(13000) -- Size needs to be mentioned here if it is more than 255 characters
)
By default, the buffer for SQL loader is 255 characters but you can alter it using CHAR(n) as mentioned in the example.
Then execute this control file using
sqlldr control=<aforementioned_file_path>
Cheers!!