Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Import delimited text?

Quote Reply
Import delimited text?
How do I import delimited text if my only options for importing are Links SQL 1.x, Links 1.x and Links 2.x?

Mark Brasche
http://SurfSafely.com/
Quote Reply
Re: Import delimited text? In reply to
Look at the MySQLMan IMPORT option that comes with LINKS SQL. IT allows you to import from different files.

Regards,

Eliot Lee
Quote Reply
Re: Import delimited text? In reply to
I am new to SQL based applications and without detailed instructions to follow, this looks very intimidating. The first thing I read when I access mysqlman is this:

Warning: MySQLMan is a low level SQL utility. Improper usage can destroy your
Links SQL installation.

What if I screw up? There's no undo operation to back out of the last mistake and I really don't feel like starting from scratch if I should screw up. Looking at mysqlman help I see there is a whole new world of reading to do.

Wish me luck! Smile

Mark Brasche
http://SurfSafely.com/
Quote Reply
Re: Import delimited text? In reply to
You should first back-up your tables either through building your script OR do a SQL DUMP of all tables.

Then IMPORT the data from the flat file.

Regards,

Eliot Lee
Quote Reply
Re: Import delimited text? In reply to
Okay, I'm so tired at looking at this monitor my vision is getting blurred. In mysqlman I've tried everything I can think of to import a pipe delimited text file into SQL2b5 Links table. Here is what I get:

MySQL said: Can't get stat of '/usr/local/etc/httpd/htdocs/surfsafely/textfile.txt' (Errcode: 2).

Query: LOAD DATA INFILE '/usr/local/etc/httpd/htdocs/surfsafely/textfile.txt' IGNORE INTO TABLE Links FIELDS
TERMINATED BY '|' ESCAPED BY '\\' LINES TERMINATED BY '\n' IGNORE 0 LINES
(URL,Title,Description,Mod_Date)

Here's a few lines from the text file

http://www.ll.net/aho/teamaho.htm|Amateur Hockey Online's Hockey Select Site Award Winners|Amateur Hockey Online s Select Site Page for the Best of the Web in amateur hockey|952705843
http://www.llanberis.com/|Welcome to Llanberis and Snowdonia|Llanberis and Snowdonia in North Wales|973533748
http://www.llandrindod-wells.com/|Welcome to Llandrindod Wells|Llandrindod Wells Wales premier Spa Town|973194595
http://www.llandudno.com/|Welcome to Llandudno|Llandudno in North Wales|973623384

User malfunction? or script malfunction?

Mark Brasche
http://SurfSafely.com/
Quote Reply
Re: Import delimited text? In reply to
Just as I thought....

In Reply To:
Usage: perror [OPTIONS] [ERRORCODES]

-?, --help Displays this help and exits.
-I, --info Synonym for the above.
-v, --verbose Print info about various stages.
-V, --version Displays version information and exits.
bash-2.03$ perror 2
No such file or directory
bash-2.03$
Are you on a virtual server? Is your database on a different machine than your server?



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Import delimited text? In reply to
I am on a virtual server. HostPro VServer Pro account. Oh, I see what you're getting at. Maybe I forgot the /usr/home/username prefix in the path? Let's find out....

You are SO THE MAN!!! Smile

Okay, so now I have at http://surfsafely.com/cgi-bin/links/page.cgi 14,114 links to choose from but none of them were loaded into categories and searching on them produces no results.

Is there any way to create a hidden default category that imported links get put into so they may be searched on even though they have not yet been moved to categories that ARE visible?

Mark Brasche
http://SurfSafely.com/
Quote Reply
Re: Import delimited text? In reply to
Okay, so I'm an idiot. Just found the Rebuild Search function. Here's one that might not sound so newbie-ish. I'm having trouble with nph-verify not following the $MAX_CHILDREN = 10; rule and spawning new children every two seconds until I get "Error launching child". This is only enough time to verify about 2000 links at a time. What's up with that?

Mark Brasche
http://SurfSafely.com/
Quote Reply
Re: Import delimited text? In reply to
Increase the variable value higher to 1,000. Limiting the child processes to 10, will dramatically limit the number of links you can verify. So, the higher the value, the more links you will be able to verify. That variable basically configures the maximum number of child processes that are spawned during the verification process.

Regards,

Eliot Lee