quizItem success description error --------------------------------------------------------------------------------------------------------------------------------------------------------------------- exercise2.1 Pass “check if race day in process” “” exercise2.1 Pass “have correct schema” “” exercise2.2 Pass “check if lap table in process” “” exercise2.2 Pass “only contains data for 2nd Jan 2020” “” exercise2.2 Fail “contain all columns for 2nd Jan 2020” “length”
I don’t understand what I’m doing wrong here, could someone explain me.
Hi , I agree your table structure and first few rows of lapTable look correct at a glance.
See the underlying test cases for this exercise are printed here which should help in debugging why the the second test is failing, note it compares against the table lap on disk which might be your issue.
I have another issue with test 3.2, I have defined the .perm.users table using the csv and encoding the passwords but the test is also failing, would you know what I’m doing wrong here ?
quizItem success description error ---------------------------------------------------------------------- exercise3.2 Fail “check password col is updated” “”
this is the structure of the table I have defined:
c | t f a --------| ----- user | s password| X api | s
This is how I’m building the table:
.perm.users:1!update password:.Q.sha1 each password from flip userpasswordapi!("S*S";"\t") 0: :/opt/kx/developer/workspace/ nouser /adv_capstone/AdvancedCapstone.Data/users.txt
Look at your first row in the table - there is an additional record when comparing with users.txt as the column headers are being added to the table as records.
Hint - search “enlist” on this page to see an example of how you can do this without needing to define the column headers explicitly.
Hi - the date should be added in exercise 1.4 which saves the table down to disk with date partition.
Then in 2.2 you should read from that table on disk back into memory.
// Exercise 1.4 lap:.f1.createLapTable[select from event where date in 2020.01.02, session in P3;select from sensor where date in 2020.01.02, session in P3]; saveDB:hsym $getenv[AX_WORKSPACE],“/f1” // Save data to date partitioned table .Q.dpft[saveDB;2020.01.02;sensorId;lap]; // Exercise 2.2 // Check were we are and cd if needed \pwd \cd .. // Load in database post changes \l f1 meta lap // see date is added lapTable:select from lap where date in 2020.01.02