KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums KX Academy advanced capstone test cases

  • Laura

    Administrator
    April 12, 2024 at 11:04 am

    Hi @harshit-raghuvanshi ,

    the “access” error will be thrown in those tests if you have not set up the IPC correctly.
    I would recommend going through the Advanced IPC module on KX Academy if you haven’t already.

    If you are stuck on a particular aspect of section 3 feel free to send through some of your code and I can help further.

    Thanks,

    Laura

  • harshit-raghuvanshi

    Member
    April 12, 2024 at 11:49 am

    Hi @laura

    below code is for 3.2 exercise , please look into it

    .perm.users:("s*s";enlist "\t") 0:`$":/home/jovyan/developer/workspace/_nouser_/adv_capstone/AdvancedCapstone.Data/users.txt"
    
    .perm.users[`password]:"x"$.perm.users[`password]
    
    .perm.users:`user xkey .perm.users
    
    meta .perm.users
    
    .perm.users : update .Q.sha1 each password from .perm.users
    
    meta .perm.users

     

  • Laura

    Administrator
    April 12, 2024 at 12:14 pm

    Your code for 3.2 is mostly likely fine as the test for 3.2 is passing.

    The tests that are failing are 3.3, 3.4 and 3.6 so I would need to see the code for those exercises. It is likely that your code for 3.3 is incorrect it has impacted the rest of this section.

    Thanks,

    Laura

  • harshit-raghuvanshi

    Member
    April 15, 2024 at 7:06 am

    Hi @laura ,

    Below are my code snippets. Please check it

    for 3.3 - hdbH(set;`.perm.users;.perm.users)
    for 3.4 - hdbH".z.pw:{(usr;pwd] $[.Q.sha1[pwd]~.perm.users[user][`password];1b;0b]}
    
    for 3.6 - hdbH".z.pg:{permission:.perm.users[.z.u;`api];test:.perm.parseQuery[x];$[permission~`all;value x;($[test~permission;value x;:`notAuthorized])]}"
    
    

     

  • Laura

    Administrator
    April 15, 2024 at 9:45 am

    Hi,

    Your code looks mostly correct.

    You have a typo in your .z.pw function, you’re using “user” instead of “usr” to check the password.

    Let me know if that resolves things.

    Thanks,

    Laura

  • harshit-raghuvanshi

    Member
    April 15, 2024 at 2:56 pm

    Thank you @laura for your support.

    I have completed all test cases.

  • harshit-raghuvanshi

    Member
    April 16, 2024 at 7:30 am

    Hi @laura

    Thank you for your support.

    I have done with final submit but have not received any mail from KX.

  • Laura

    Administrator
    April 16, 2024 at 9:13 am

    Hi, I can see you’ve received your passcode now so you can enter it in the quiz and receive your certificate.

    Congratulations on completing the KDB Developer Level 3 Course!

    Laura

Log in to reply.