cancel
Showing results for 
Search instead for 
Did you mean: 

Reval on 4.0 with Segmented tables

sujoy
New Contributor III

Hi All,

On segmented Tables , eg:

 

/.../1
    /2021.01.01/tab/
    ...
/.../2
    /2021.01.02/tab/
    ...

 

When I load my process from root:

 

/.../db
   sym
   par.txt


# cat par.txt
# /.../1
# /.../2

 

If I add reval on 4.0, which default to having -u 1 , I am getting access error as -u 1 does not allow read above current directory over IPC

 

// Server
.z.pg:{reval(value;enlist x)}

// Client
q)h"select from tab where date=.z.d-1"
'access: /.../2/2021.12.09/tab/sym
  [0]  h"select from tab where date=.z.d-1"

 

 

The only workaround I could think of is to move to root directory under which the segments exists :

 

\cd ..

 

Now it starts working over IPC.

 

1. Is this done for a reason in 4.0?

2. Is there any other way?

1 ACCEPTED SOLUTION

For the purpose of this topic thread and our fellow community members, the internal advice shared was a workaround by creating symlinks under the main hdb dir, pointing to the relevant directories above. 

Thanks again for sharing with the community,

Leah 

View solution in original post

6 REPLIES 6

LeahS
Moderator Moderator
Moderator

Very interesting observation here @sujoy13

Thanks for sharing with the community. Looking forward to learning from the feedback received 🙌

LeahS
Moderator Moderator
Moderator

In fact, we have some internal feedback to share: 

A FIX from 4.0 README.txt (attached) is a likely explanation here. 

leah_marie_s_0-1639157596849.png

Hope this is satisfactory for you.

Kind regards,

Leah 

sujoy
New Contributor III

Thanks for this @leah_marie_s , I get the idea why this was done.

However, doesn't this defeat the purpose of having segmented tables while using reval on 4.0? 

If you check here on kx website segment  the design of par.txt, this will not allow access to run select on HDB's on 4.0 and if reval is enabled. 

For the purpose of this topic thread and our fellow community members, the internal advice shared was a workaround by creating symlinks under the main hdb dir, pointing to the relevant directories above. 

Thanks again for sharing with the community,

Leah 

matt_moore
New Contributor III

Are there any better suggestions? just encountered this problem and this work around doesn't seem feasible for a structure like this

/.../SYM1
    /2021.01.01/tab/
    ...
/.../SYM2
    /2021.01.01/tab/
    ...



sujoy
New Contributor III

Thanks Matt, did not think of this scenario.

I really hope we have a more permanent fix for this in future release.