Reputation: 33
When I start up the tick.q with sym.q and feed.q with files provided as follows:
q tick.q sym -p 5010
q feed.q
Github links: https://github.com/KxSystems/cookbook/tree/master/start/tick , https://github.com/KxSystems/kdb-tick
The tickerplant process prints 'length
error on every update, which usually occurs when incorrect number of elements is passed: https://code.kx.com/wiki/Errors
I suspect that this happens when the feed process calls .u.upd
Any suggestions as to how to solve this problem?
Upvotes: 1
Views: 1736
Reputation: 3229
Open a new q session on some port (9999), add your schema definition there and define insert
as .u.upd
or something like this :
.u.upd:{[t;d]
.test.t:t;
.test.d:d;
t upsert d
}
Now point your feed to this q session and stream some data; this will enable you to analyse the test variables in case of the errors.
Upvotes: 0
Reputation: 721
If you are using the plain vanilla tick setup from KX there is no reason for that error to appear.
Also, I think you need to start the feed as feed.q -t 200
otherwise you will get no data coming through.
Usually the 'length
error appears when the table schema does not match. So if you have the sym.q
file (and it is loaded correctly) you should not have that issue.
Just to confirm this is the structure of your directory:
.
├── feed.q
├── README.md
├── tick
│ ├── r.q
│ ├── sym.q
│ └── u.q
└── tick.q
The sym.q
file contains your table schema. If you change something in the feedhandler the table schema in the sym.q
must match that change (i.e if you add a column in the feed you must also add a holder in the table for that column)
Upvotes: 0
Reputation: 1780
Entering \e 1
into the command line will suspend execution and run the debugger allowing you to see what failed and query the variables which should help pinpoint what is causing the issues.
More about debugging here https://code.kx.com/q/ref/debug/
Upvotes: 1