Hi All, I found an interesting set of sample CSV files [1] on the IBM Tivoli web site. Each file seems to have a, for lack of a better term, "pre-header". For example, the simplest file [2] looks like this (3 lines):
SRM_SaaS_ES,MXASSETInterface,AddChange,EN ASSETNUM,AS_SITEID mesa01,SDASITE A more complex one is [3] (4 lines): SRM_SaaS_ES,MXASSETInterface,AddChange,EN ASSETNUM,ASSETTAG,AUTOWOGEN,BUDGETCOST,CALNUM,CHANGEBY,CHANGEDATE,CHANGEPMSTATUS,CHILDREN,AS_DESCRIPTION,DISABLED,FAILURECODE,HIERARCHYPATH,INVCOST,ISLINEAR,ISRUNNING,AS_ITEMNUM,AS_ITEMSETID,MAINTHIERCHY,AS_MANUFACTURER,MOVED,AS_ORGID,PRIORITY,PURCHASEPRICE,REMOVEFROMACTIVEROUTES,REMOVEFROMACTIVESP,REPLACECOST,ROLLTOALLCHILDREN,ROTSUSPACCT,AS_SENDERSYSID,AS_SITEID,AS_STATUS,AS_STATUSDATE,TOTALCOST,TOTDOWNTIME,TOTUNCHARGEDCOST,UNCHARGEDCOST,USAGE,VENDOR,YTDCOST,ACTIVE,ASSETMETERID,AVGCALCMETHOD,AM_CHANGEBY,AM_CHANGEDATE,LIFETODATE,LINEARASSETMETERID,MEASUREUNITID,METERNAME,AM_ORGID,READINGTYPE,ROLLDOWNSOURCE,SEQUENCE,SINCEINSTALL,SINCELASTINSPEC,SINCELASTOVERHAUL,SINCELASTREPAIR cent41,6491,0,0,COMPANY1,MAXADMIN,2010-04-15T17:18:18-07:00,0,0,Centrifugal Pump 100GPM/60FT HD,0,PUMPS,PUMP \ CNTRFGL,0,0,1,PUMP100,SET1,0,IR,0,SDAORG,2,0,0,0,0,0,6600-869-800,MX,SDASITE,OPERATING,2010-04-15T17:18:18-07:00,0,0,0,0,,IR,0,1,29,ALL,MAXADMIN,2010-04-15T17:19:11-07:00,0,0,HOURS,FLTHRS,SDAORG,DELTA,ASSET,1,0,0,0,0 cent41,6491,0,0,COMPANY1,MAXADMIN,2010-04-15T17:18:18-07:00,0,0,Centrifugal Pump 100GPM/60FT HD,0,PUMPS,PUMP \ CNTRFGL,0,0,1,PUMP100,SET1,0,IR,0,SDAORG,2,0,0,0,0,0,6600-869-800,MX,SDASITE,OPERATING,2010-04-15T17:18:18-07:00,0,0,0,0,,IR,0,1,30,,MAXADMIN,2010-04-15T17:19:38-07:00,0,0,DEG F,TEMP-F,SDAORG,,,2,0,0,0,0 The first line of both and the other files I checked include: SRM_SaaS_ES,MXASSETInterface,AddChange,EN which is NOT the column names for the data, as far as I can tell. To properly process these files, it looks like we need to either: (1) expand the concept of a header, to include multiple records, specifying which one is the header record for column names, or, (2) add a skipFirstRecords settings. Thoughts? Gary [1] http://pic.dhe.ibm.com/infocenter/tivihelp/v41r1/index.jsp?topic=%2Fcom.ibm.ismsaas.doc%2Fimport%2Fr_sample_csv_files.html [2] http://pic.dhe.ibm.com/infocenter/tivihelp/v41r1/topic/com.ibm.ismsaas.doc/reference/AssetsImportMinimumSample.csv ) [3] http://pic.dhe.ibm.com/infocenter/tivihelp/v41r1/topic/com.ibm.ismsaas.doc/reference/AssetsImportExtendedSample.csv -- E-Mail: garydgreg...@gmail.com | ggreg...@apache.org Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/> Spring Batch in Action <http://www.manning.com/templier/> Blog: http://garygregory.wordpress.com Home: http://garygregory.com/ Tweet! http://twitter.com/GaryGregory