[SOLVED] ASCII text with very long lines with CRLF line terminators
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ASCII text with very long lines with CRLF line terminators
So I'm trying to load data from a csv file into a db. The documentation for the db says that the db expects all files being loaded is in the Unicode UTF-8 format. I checked my file format and I got that it's "ASCII text with very long lines with CRLF line terminators". The db says it's fine with ASCII text since it's UTF-8 compatible. But for some reason I'm having issues. So I'm wondering if it's b/c of the "with very long lines with CRLF line terminators" or if it's something totally different. If it does have to do with CRLF line terminators, how can I fix this in Linux?
maybe ? what db system is this (mysql ?). what issues are you having (what are the error messages).
did you create the file in windows or something. is it possible to create the file on linux to avoid the possibility of crlf's . theres a program dos2unix which sometimes helps with this kind of thing.
HP Vertica is the db system and it's telling me that the file cannot be found but I'm in the correct directory and checked my spelling multiple times so I'm confused. It did give me a hint saying if using the ON ANY NODE option I needed to put the data file in same location on each node (although I'm not specifying this option, I did try putting the data file in the same location on each node of my cluster). So right now I'm kind of at a dead end and am hoping someone may be able to help me troubleshoot this issue.
I downloaded the file I wanted to load online (it's like over 1000 rows so I wouldn't want to create it from scratch in Linux). Oh and this file was originally an Excel file (I just converted it to .csv). I'll look into the dos2unix program and see if that'll help.
Exactly how are you directing the database to load the file?
One system I'm familiar with, you give the database system the file to load... But you can't give it a relative name - it must be the complete path or the database will not be able to find it. That is because the database engine doesn't have the same context as the user interface.
@jpollard - Thanks! Using the complete path worked - I feel dumb for not trying that before.
for future reference you should copy-paste the command you use as well as any error that is reported so that people can identify things that are obvious.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.