[ts-gen] QQQQ example: was: Re: Some Newbie Questions
me at heyjay.com
Tue Jul 15 17:50:54 EDT 2008
On Mon, Jul 14, 2008 at 9:51 AM, R P Herrold <herrold at owlriver.com> wrote:
> On Sun, 13 Jul 2008, R P Herrold wrote:
>>> Could you give me an example of just receiving tick data on
>>> the QQQQs. That is, all the steps, including any DB table
>>> queries or manipulation?
>> QQQQ, the ETF stock, or NQ, the Future? I am not
>> immediately sure that we have it as the retrieval of ETF
>> symbols was also a but 'dirty' in the data, but we can and
>> will certain add both, if not present.
> It looks like STK:SMART:QQQQ: is 136
> $ echo "select tick 136 1; wait 10; exit;" | ./shim --data \
> cout | tee /tmp/QQQQ-cap.txt
> works fine.
> herrold at xeon shim-080711]$ ls -al /tmp/QQQQ-cap.txt
> -rw-rw-r-- 1 herrold herrold 17508 Jul 14 10:47 /tmp/QQQQ-cap.txt
> [herrold at xeon shim-080711]$ wc /tmp/QQQQ-cap.txt
> 195 1317 17508 /tmp/QQQQ-cap.txt
> [herrold at xeon shim-080711]$
> I placed a copy of 'QQQQ-cap.txt' at:
> -- Russ herrold
Thanks for the guidance. So you've answered a bunch of my questions so far:
1) QQQQ (the ETF) is already in the DB, so it's the developer's
responsibility to query the DB to find the ID to submit to the shim.
2) The DBs preloaded data is maintained in general by you, but with
suggestions from the Mailing list.
3) "Select" is kinda new and doesn't show in the docs, I should use
the source (luke), as my guide.
4) With regard to Oracle. Oracle has a separate
device/entity/construct/table... call a "sequence" which one uses to
generate "ID"s for tables. For each table, one (typically) creates a
corresponding sequence, and then link the two with a "on insert"
trigger. Sequences are guaranteed to be unique across login sessions
so there is no risk of duplication. I know lots of other RDBMS have
an "auto increment" type of column. Its a different design, both have
advantages and disadvantages, but they both accomplish the same goal.
5) regarding the shim output being a file, pipe, syslog. I get it.
More information about the ts-general