Issues Loading csv file into a Oracle Database
Moderators: chulett, rschirm, roy
Issues Loading csv file into a Oracle Database
I have a datastage job that loads a csv file into an Oracle Database. The csv file has some disclosure text at the bottom which prevents the file from being loaded. Is there a way I can filter out this unwanted text while loading the data.
Thank you
Thank you
The error message is required column is missing. The reason I am getting this is because I have mapped the sequential file columns with the columns in the oracle table.
In the CSV file I have **DISCLOSURE** text in one of the columns at the end of file and nothing in the other columns. I want to filter these rows.
Thank you
In the CSV file I have **DISCLOSURE** text in one of the columns at the end of file and nothing in the other columns. I want to filter these rows.
Thank you
DSguru2B wrote:Define unwanted data? What is the error message that you are getting?
In the sequential file stage, activate filter command and put the following in the filter command box
This will delete the last line before the stage even starts reading it.
Code: Select all
sed '$d'
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Thank you. Another question I have is how would I delete all the lines below the Disclosure text.
DSguru2B wrote:In the sequential file stage, activate filter command and put the following in the filter command boxThis will delete the last line before the stage even starts reading it.Code: Select all
sed '$d'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I believe the following should work. Test it out before you stick to it.
Code: Select all
sed '/**DISCLOSURE**/;/^*$/d'
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Thank you. I will try it.
DSguru2B wrote:I believe the following should work. Test it out before you stick to it.Code: Select all
sed '/**DISCLOSURE**/;/^*$/d'