Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

data import

Status
Not open for further replies.

diwa1234

Programmer
Nov 21, 2005
5
US
hi ,
can any one suggest the best way to import data from a vsv file o live link??
it hould be through object importer or using live link SDK ??
 
can you provide some more info on your situation and requirements ?
 
if data is in a CSV(comma seperated values) format or data XML format and the data has to be imported to live link.
Data consists of the document name , document type and document description etc.
what will be the best method to approach..

object importer or live link SDK ??

 
LiveLink Object importer is written with the SDK,so with SDK you can do anything.Now I am assuming the csv file that you are saying is an index of the actual files to be imported into livelink.Using VBA programming on excel you can create a loader script file which the object importer can then understand to upload into livelink.You did not mean you had a csv file,that you needed uploaded,then you shouldn't have to go thru this way.Livelink does not care what the file extension is it pretty much can handle csv.

For eg:assuming your csv file had
MyDocument,\\uncpath\somefolder\filename.txt,text/html

Now if the above are true here is a minimal syntax for the
importer.The syntax for documents,folder everything is vailable in the object importer documentation
Code:
<node type="document" action="create">
<location>Enterprise:Upstream</location>
<title>MyDocument</title>
<file provider="EXTSHARED">\\uncpath\somefolder\filename.txt</file>
<mime>text/html</mime>
</node>
Now when you run the object importer it parses the lines (xml looking) between node and </node> and puts it into the livelink folder where you want it to go_Object importer can be run manually and unattended.Most of where I have used ObjImporter is to bring in large amounts of data like in a data migration project.We have suppliers giving us dvd's containing data and I write up the xml looking script file and import the data.Bottom line is this,the script file should contain a)where in livelink the thing gets to go 2)Where can the livelink process find the actual file








Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Hi appnair,

Thanks very much for the help.
Iam a java programmer.
The file CSV or XML(not yet decided) will have the
index of the documents
and the physical document location from where the document to be fetched and imported to live link.

Now with my java experience which is the best method ??

Iam very new to live link so you may feel the question trivial..

Thanks in Advance...

 
As I said all livelink cares for is the location in livelink,where the actual file can be sourced,its mime type etc.Read up on the syntax.
Tp parse out a csv file with java should be a breeze,so should parsing out an XML file.Please understand the flow into livelink.
Also for your information livelink can handle
a)XMLimport/XMLExport-In this case a base64 encoded XML file can be imported into livelink at whichever folder you choose.So if you wanted to import a real word document,thru some way you would convert it to XML( I do not know),then you would follow the XML DTD(or is it schema ?) that livelink expects and upload it into livelink(Too complicated if you ask me)
b)Livelink API [products] explorer,authorlink etc.Usually windows drag and drop
c)ObjImporter export the one you are talking about

Many others could be there,but bottom line still remains the same,point to a location in livelink,add the file.


Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
If you are new to Livelink you should create your import in XML format and use the builtin XML import function of Livelink. Creating an XML file with your data should be significantly easier than trying to write an importer in Java for Livelink. There is detailed information available from Open Text on the XML schema that is supported by the XML import function. You can also do XML Exports from Livelink and look at the resulting output for examples.

 
Hi,
Thanks for the help..
where can i find the information about XML schema that is supported by the XML import function.i tried searching but could not find any.
 
Open Text provides a document "Livelink Guide to XML Export and Import". That is the best place to start. You should be able to get it from Open Text support.
 
I think in this case diwa1234 has an index of all the actual files and his livelink already has the object importer module.All that remains is creating the script files rather than getting hung up on XMLImport /XMLExport.
This should be the easiset to do since the xmlimport if you ask me is not warranted here.However it is a really nice feature to do stuff against a livelink dev and prod system.In this faq section i have a small example of the xml import/export which is taken straight off the xml guide to export and import.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
I have to agree with appnair. Unless you have a bunch of meta data that also has to be imported with the files I wouldn't bother going through the effort of creating the XML and associated XSL files.

If your CSV file is essentially just the path to the document you wish uploaded with it's name and description it would be simple to use the object importer or even write a simple LAPI program to parse the file and do the upload. In this case XML is overkill.
 
Hi,
Great to see this many responses...
Thaks to you all..

some points from my side

1. Iam not much aware of object importer
2. It Will be an XML file and not an CSV file from which i have to read the data.
3.The XML file not only contains the path of the actual document but also contains meta data associated to the actual document.

In this case will you suggest me to use the object importer..
if yes.. then can you please give me some more details of object importer

Thanks in advance



 
The best way I would approach is I would spend close to an hour studying livelink thru the http gui.On your personal workspace is best.Start adding a document,see the screen elements that livelink makes you fill out that is exactly what you are going to do thru your code also.Use the on line help.Read up on categories and attributes.And I am really surprised at you saying something about the XML format.Isn't XML supposed to be the best way to understand disparate data.Any XML parser(Java,.Net) should be able to give you an in memory tree of your XML document.Then you use those elements to build the Object importer script file.
If you want to use the black box approach and don't want anything to do with understanding how livelink works
a)Use XML parser
b)Build obj importer script file based on the requisite syntax which can be found in its documentation.The importer can handle cats and atts and that is whet you ares aying as metadata
c)Place it where livelink can access it
d)Run it thru an agent(scheduled) or manually)



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top