Loading a table from a csv file

Received: by 10.101.66.15 with SMTP id t15mr1201348ank.16.1240379967467; Tue, 21 Apr 2009 22:59:27 -0700 (PDT)Date: Tue, 21 Apr 2009 22:59:27 -0700 (PDT)X-IP: 203.200.202.132User-Agent: G2/1.0X-Google-Token: bwOPAgwAAAAMPt6elx5e8EzZrfIdLzKRX-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.8) Gecko/2009032609 Firefox/3.0.8,gzip(gfe),gzip(gfe)Message-ID: <0a3e9863-44ae-4bdd-99ee-9d8bc2664d12@v35g2000pro.googlegroups.com>Subject: Loading a table from a csv fileFrom: Sayanosauras To: “Kdb+ Personal Developers” X-Google-Approved: charlie@kx.com via web at 2009-04-22 07:05:29Hi,I am facing difficulties in loading a flat file’s content to a tablein Q…this is the code I’m executing:t:(“ISF”; enlist “”) 0: `:c:/q/TRDWEquityUniverseMAJOR_ASSET_CLASS.csvError:An error occurred during execution of the query.The server sent the response:c:/q/Data/TRDWEquityUniverseTEST.csv: The filename, directory name, orvolume label syntax is incorrect.The flat file I’m referring to is a tab separated file, and I don’tknow how would I represent tab in that code.Somebody help me!Thanks,Sayan

The error response means what it says - you need to check the filename.To represent tab, use \t, i.e.(“ISF”; enlist “\t”) 0: :t1.csvOn Apr 22, 1:59?pm, Sayanosauras <sayandee...> wrote:&gt; Hi,&gt;&gt; I am facing difficulties in loading a flat file's content to a table&gt; in Q....this is the code I'm executing:&gt;&gt; t:("ISF"; enlist "") 0: :c:/q/TRDWEquityUniverseMAJOR_ASSET_CLASS.csv>> Error:>> An error occurred during execution of the query.> The server sent the response:> c:/q/Data/TRDWEquityUniverseTEST.csv: The filename, directory name, or> volume label syntax is incorrect.>> The flat file I’m referring to is a tab separated file, and I don’t> know how would I represent tab in that code.>> Somebody help me!>> Thanks,> Sayan</sayandee…>

Thanks Chris…but I’m seeing only the first three columns in the csvfile getting read, after I fire this code:x:(“DSF”; enlist “\t”) 0: :c:/q/data/TRDWEquityUniverseTEST.txtselect from xAm I missing something?Thank you,SayanOn Apr 22, 12:15?pm, Chris Burke <cdbu...> wrote:&gt; The error response means what it says - you need to check the file&gt; name.&gt;&gt; To represent tab, use \t, i.e.&gt;&gt; ("ISF"; enlist "\t") 0: :t1.csv>> On Apr 22, 1:59?pm, Sayanosauras <sayandee…> wrote:>> > Hi,>> > I am facing difficulties in loading a flat file’s content to a table> > in Q…this is the code I’m executing:>> > t:(“ISF”; enlist “”) 0: `:c:/q/TRDWEquityUniverseMAJOR_ASSET_CLASS.csv>> > Error:>> > An error occurred during execution of the query.> > The server sent the response:> > c:/q/Data/TRDWEquityUniverseTEST.csv: The filename, directory name, or> > volume label syntax is incorrect.>> > The flat file I’m referring to is a tab separated file, and I don’t> > know how would I represent tab in that code.>> > Somebody help me!>> > Thanks,> > Sayan</sayandee…></cdbu…>

Oops sorry…this is the code I ran:t:(“ISF”; enlist “\t”) 0: :c:/q/data/TRDWEquityUniverseTEST.txtselect from tThanks,SayanOn Apr 22, 2:33?pm, Sayanosauras <sayandee...> wrote:&gt; Thanks Chris...but I'm seeing only the first three columns in the csv&gt; file getting read, after I fire this code:&gt;&gt; x:("DSF"; enlist "\t") 0: :c:/q/data/TRDWEquityUniverseTEST.txt>> select from x>> Am I missing something?>> Thank you,> Sayan>> On Apr 22, 12:15?pm, Chris Burke <cdbu…> wrote:>> > The error response means what it says - you need to check the file> > name.>> > To represent tab, use \t, i.e.>> > (“ISF”; enlist “\t”) 0: :t1.csv&gt;&gt; &gt; On Apr 22, 1:59?pm, Sayanosauras <sayandee...> wrote:&gt;&gt; &gt; &gt; Hi,&gt;&gt; &gt; &gt; I am facing difficulties in loading a flat file's content to a table&gt; &gt; &gt; in Q....this is the code I'm executing:&gt;&gt; &gt; &gt; t:("ISF"; enlist "") 0: :c:/q/TRDWEquityUniverseMAJOR_ASSET_CLASS.csv>> > > Error:>> > > An error occurred during execution of the query.> > > The server sent the response:> > > c:/q/Data/TRDWEquityUniverseTEST.csv: The filename, directory name, or> > > volume label syntax is incorrect.>> > > The flat file I’m referring to is a tab separated file, and I don’t> > > know how would I represent tab in that code.>> > > Somebody help me!>> > > Thanks,> > > Sayan</sayandee…></cdbu…></sayandee…>

Stupid me…now I understand that what ISF stands for…Thanks forthe pointer.SayanOn Apr 22, 2:36?pm, Sayanosauras <sayandee…> wrote:> Oops sorry…this is the code I ran:>> t:(“ISF”; enlist “\t”) 0: :c:/q/data/TRDWEquityUniverseTEST.txt&gt;&gt; select from t&gt;&gt; Thanks,&gt; Sayan&gt;&gt; On Apr 22, 2:33?pm, Sayanosauras <sayandee...> wrote:&gt;&gt; &gt; Thanks Chris...but I'm seeing only the first three columns in the csv&gt; &gt; file getting read, after I fire this code:&gt;&gt; &gt; x:("DSF"; enlist "\t") 0: :c:/q/data/TRDWEquityUniverseTEST.txt>> > select from x>> > Am I missing something?>> > Thank you,> > Sayan>> > On Apr 22, 12:15?pm, Chris Burke <cdbu…> wrote:>> > > The error response means what it says - you need to check the file> > > name.>> > > To represent tab, use \t, i.e.>> > > (“ISF”; enlist “\t”) 0: :t1.csv&gt;&gt; &gt; &gt; On Apr 22, 1:59?pm, Sayanosauras <sayandee...> wrote:&gt;&gt; &gt; &gt; &gt; Hi,&gt;&gt; &gt; &gt; &gt; I am facing difficulties in loading a flat file's content to a table&gt; &gt; &gt; &gt; in Q....this is the code I'm executing:&gt;&gt; &gt; &gt; &gt; t:("ISF"; enlist "") 0: :c:/q/TRDWEquityUniverseMAJOR_ASSET_CLASS.csv>> > > > Error:>> > > > An error occurred during execution of the query.> > > > The server sent the response:> > > > c:/q/Data/TRDWEquityUniverseTEST.csv: The filename, directory name, or> > > > volume label syntax is incorrect.>> > > > The flat file I’m referring to is a tab separated file, and I don’t> > > > know how would I represent tab in that code.>> > > > Somebody help me!>> > > > Thanks,> > > > Sayan</sayandee…></cdbu…></sayandee…></sayandee…>