KX Community

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

Home Forums KX Academy Advanced Capstone 1.3 test fial.

  • megan_mcp

    Administrator
    April 10, 2024 at 10:39 am

    Hi @kenan_davidsonyahoo-com

    I’ve took a look at your ‘.f1.createLapTable’ function and I’ve made a few adjustments:

    .f1.createLapTable:{[eventInput;sensorInput]

    uniqueSensor: distinct select sensorId from sensorInput;

    rack:(select from eventInput) cross uniqueSensor;

    w:(rack[`time];rack[`endTime]);

    f:wj[w;`date`sensorId`time;select from rack;(select from sensorInput;(avg;`sensorValue))];

    delete date from f

    }

    • To retrieve a column from a table you must use bracket notation with a backtick as follows – w:(rack[`time];rack[`endTime]); *Example provided below*
    • It states in the .f1.createLapTable function template that it wants a table returned with the following columns: `session`lapId`time`endTime`sensorId`sensorValue. Hence why the delete statement for date was included at the end.

    If you have any questions please let me know!

    Thanks,

    Megan

Log in to reply.