Hi I am trying to insert regularly a file in a database. This text file is generated by a JBOSS app
The only difficulty is that the lines aren't really structured.
example:
Text1 (tab) text2 (tab) text3
Text1
text1 (tab- text2 (tab) text3
...
The part where i am struggling is the fact that sometimes there is data for text2 and text3 and sometimes not and when a run
COPY table_name (datumorig,rest0,rest1) FROM 'file/location/filename.txt' with NULL AS '';
I get error no data for rest0.
what am I doing wrong here?