Data from yahoo.q truncated

77 views
Skip to first unread message

Alex Colson

unread,
Apr 30, 2012, 11:46:48 PM4/30/12
to personal...@googlegroups.com

Hi,

I'm trying to get familiar with q, so i was trying to use yahoo.q from the cookbook (http://code.kx.com/svn/cookbook_code). On the surface it works fine, but i noticed it is always returning me about the name number of records in the table no matter how many days i specify:

q)count yahoo[360;`GOOG]
18

I to debug it and found out that the result of the http request seems to always be yielding the same length:
q)stock:`GOOG
q)txt: `:http://ichart.finance.yahoo.com "GET /table.csv?s=" , (string stock) , params , " http/1.0\r\nhost:ichart.finance.yahoo.com\r\n\r\n";
q)txt
"HTTP/1.1 200 OK\r\nDate: Tue, 01 May 2012 03:40:49 GMT\r\nP3P: policyref=\"h..
q)count txt
1400


So i'm wondering if i missed some setting somewhere, it's a bug or simply a known limitation ?

Not sure if it is relevant, but i'm using the Play version.


Thanks in advance

Alex.




Charles Skelton

unread,
May 1, 2012, 4:53:52 AM5/1/12
to personal...@googlegroups.com
thanks Alex. We'll fix that.
(Looks like yahoo changed their response such that it doesn't send content-length).


Alex.




--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/personal-kdbplus/-/MKKo-MiDTdoJ.
To post to this group, send email to personal...@googlegroups.com.
To unsubscribe from this group, send email to personal-kdbpl...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/personal-kdbplus?hl=en.

Alex Colson

unread,
May 1, 2012, 6:19:38 AM5/1/12
to personal...@googlegroups.com
Cool, Glad i could help.


On Tuesday, May 1, 2012 4:53:52 PM UTC+8, Charles Skelton wrote:
thanks Alex. We'll fix that.
(Looks like yahoo changed their response such that it doesn't send content-length).

On Tue, May 1, 2012 at 5:46 AM, Alex Colson <alex....@gmail.com> wrote:

Hi,

I'm trying to get familiar with q, so i was trying to use yahoo.q from the cookbook (http://code.kx.com/svn/cookbook_code). On the surface it works fine, but i noticed it is always returning me about the name number of records in the table no matter how many days i specify:

q)count yahoo[360;`GOOG]
18

I to debug it and found out that the result of the http request seems to always be yielding the same length:
q)stock:`GOOG
q)txt: `:http://ichart.finance.yahoo.com "GET /table.csv?s=" , (string stock) , params , " http/1.0\r\nhost:ichart.finance.yahoo.com\r\n\r\n";
q)txt
"HTTP/1.1 200 OK\r\nDate: Tue, 01 May 2012 03:40:49 GMT\r\nP3P: policyref=\"h..
q)count txt
1400


So i'm wondering if i missed some setting somewhere, it's a bug or simply a known limitation ?

Not sure if it is relevant, but i'm using the Play version.


Thanks in advance

Alex.




--
You received this message because you are subscribed to the Google Groups "Kdb+ Personal Developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/personal-kdbplus/-/MKKo-MiDTdoJ.
To post to this group, send email to personal-kdbplus@googlegroups.com.
To unsubscribe from this group, send email to personal-kdbplus+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages