Tables Refusing To Save Down

What would cause a table to refuse to save down and give a `type error?

I’ve checked, definitely a table I’m trying to save down. Something like 139 columns, is that the problem?

Thanks!  

You could have a column of mixed type, try:

distinct type’'[inmemTab]

If you have more than one row then one or more of your columns has more than one datatype. 

Terry

Interestingly, that command yields another `type error. 

Do I dare check type column by column? 

Is your table keyed? Unkey it if so. 

Terry

The table is not keyed. I ran 0!table and tried just to be safe, still `type error. 

Are you trying to save a flat table or a splay? ie. are you using

`:tabName set table           or

`:tabName/ set table

You can have a data structure that “looks” like a keyed table (dictionary where keys are dictionaries, values are dictionaries) in the console, but it’s actually a dictionary where the keys are symbols instead. See below:

// keyed table and looks like one

q)(xx1!1 4;xx1!2 5;xx1!3 6)!((1#x2)!1#7;(1#x2)!1#8;(1#`x2)!1#9)

x x1| x2

----| –

1 4 | 7

2 5 | 8

3 6 | 9

q)0!(xx1!1 4;xx1!2 5;xx1!3 6)!((1#x2)!1#7;(1#x2)!1#8;(1#`x2)!1#9)

x x1 x2


1 4  7

2 5  8

3 6  9

// not keyed table but kinda looks like one

q)abc!(xx1x2!1 4 7;xx1x2!2 5 8;xx1x2!3 6 9)

 | x x1 x2

-| -------

a| 1 4  7

b| 2 5  8

c| 3 6  9

q)0!abc!(xx1x2!1 4 7;xx1x2!2 5 8;xx1x2!3 6 9)

'type

  [0]  0!abc!(xx1x2!1 4 7;xx1x2!2 5 8;xx1x2!3 6 9)

q)distinct type’'[abc!(xx1x2!1 4 7;xx1x2!2 5 8;xx1x2!3 6 9)]

'type

  [0]  distinct type’'[abc!(xx1x2!1 4 7;xx1x2!2 5 8;xx1x2!3 6 9)]