And you can always drop to java and read the little beast in one line
at a time that way.  You won't have any memory issues like you would
if you try and read in an 80mb file into a single cosmic-scale array.
I have a similar monster file situation and solved it this way;
although mine is daily and "only" about 20mb

I chopped this out of that working file.  Hopefully I got all the
important bits as the original is like 1000 lines.  Basically
imported.str is one line of the file.  It is incremented as shown and
you do whatever processing you need on the text.  I have a bunch of
reformatting and additional processing that I do before I toss the
data into a db, publish a static file blahblahblah.  What I like about
this approach is I get to do everything in a single cfloop that has
minimal memory consequences.

<cfset srcFile="c:/foo/bar/mongofile.txt">
<cfset fr=createObject("java","java.io.FileReader")>
<cfset fr.init(srcFile)>
<cfset br=createObject("java","java.io.BufferedReader")>
<cfset br.init(fr)>
<cfset imported.str=br.readLine()>
<cfloop
        condition='isDefined("imported.str")'>
    <!---
    ...do stuff...
    --->
        <cfset imported.str = br.readLine()>
</cfloop>
<cfset br.close()>



On 6/12/07, Jake Pilgrim <[EMAIL PROTECTED]> wrote:
> A number of excellent database-based solutions have already been posted (and 
> a database solution is probably preferred), but don't overlook CFHTTP. CFHTTP 
> is actually quite good at parsing a CSV and spooling it into a CFQUERY. 
> Depending on exactly what you want to do with your data, this may be a good 
> solution.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:280877
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to