Thanks Scott,
I need some more help: I tried saving a table (flipped dictionary) to
a file, and it fails with a type error.
d:("test";"data")
("test"
"data")
`"/tmp/d.test" 0: d //
works, saves simple list
d:(("test";"data");("rain";"fall"))
(("test"
"data")
("rain"
"fall"))
`"/tmp/d.test" 0: d // fails
to save list of lists
type error
t: + `name`iq!(`Dent`Beeblebrox`Prefect;98 42 126)
.((`name
`Dent `Beeblebrox `Prefect
)
(`iq
98 42 126
))
`"/tmp/t.test" 0: t // fails
to save table
type error
Is it possible to save dictionaries and tables to disk, and read them
directly from disk, or would we have to save/load them using one file
per column and joining outside kona? I'm particularly interested in
saving and loading csv files.
Another question: Because we don't have sql in k3, I'm trying to
prepare a list of equivalent statements.
For example,
select name from t where iq = 42 ==> t[`name;t[`iq]?42]
select name from t where iq > 42 ==> t[`name;&t[`iq]>42]
But when we want multiple where clauses (like select from t where iq >
42, name = `Dent), I'm able to see how to do it in multiple
statements, but unable to think of a way to do it with a single
statement. Are there any ways to do this?
Thanks,
Sahas