a month ago
Hello, I have a table that's loaded by some data from an odbc call and the structure is as follows:
q)meta res
c | t f a
----------| -----
id | C
first_name| C
last_name | C
email | C
Updating the column type for "id" to a symbol using the following fails.
q)update "S"$id from res
'id
[0] update "S"$id from res
Any reason as to why? This is on arm64 (Apple Silicon) where I've built odbc.so from the kdb github project. The same code however works on on m64 (Apple Intel), but this uses the stock odbc.so that's provided by the above mentioned kdb project.
a month ago
Can you make sure that the res variable you do the meta on is the same that you are trying to update? E.g. global vs local variable, or other queries changing it in the meantime. Or there being a space in the column name (possible if parsing from CSV).
This works:
q)res:([]id:("AA";"BB");first_name:("CC";"DD");last_name:("EE";"FF");email:("GG";"HH"))
q)meta res
c | t f a
----------| -----
id | C
first_name| C
last_name | C
email | C
q)update "S"$id from res
id first_name last_name email
-----------------------------
AA "CC" "EE" "GG"
BB "DD" "FF" "HH"
a month ago
It's the same variable and the problem seems to be much worse in that I can't even do the following:
q)select id from res
'id
[0] select id from res
It looks as if something is screwed up doing the following odbc query:
\l odbc.k
h:.odbc.open `db
userq:"select id,first_name,last_name,email from user"
res:.odbc.eval[h;userq]
.odbc.close h
4 weeks ago
Well, I found the root cause of the issue, it's the way I built odbc.so for Apple Silicon. I've rebuilt it and everything works as expected.
EMEA
Tel: +44 (0)28 3025 2242
AMERICAS
Tel: +1 (212) 447 6700
APAC
Tel: +61 (0)2 9236 5700
KX. All Rights Reserved.
KX and kdb+ are registered trademarks of KX Systems, Inc., a subsidiary of FD Technologies plc.