I'm loading into a flex table which contains a "Path.Path" flattened item that contains the full path of a file.
I'd like a virtual column that is just the top level directory, so was trying the following : -
=> copy sometable (__raw__, "directory" as substring("Path.Path",1,instr("Path.Path",'/',1,2))) FROM 'somefile' parser fjsonparser();
ERROR 2645: Column directory has other computed columns in its expression
HINT: Expressions can only contain columns loaded from input
How can I achieve this ?