I have passed all quizzes for exercise 1. I am being show “fail” for quizzes 2.2.2 and 2.2.3, “only contains data for 2nd Jan 2020”, and “contain all columns for 2nd Jan 2020”, respectively.
In section 1.4, we are asked to “Save down the lap table for the P3 practice session on 2nd January 2020 using to the existing f1 database as lap.” I’ve assigned a variable ‘lap’ to a select statement on the .f1.createLapTable function to extract rows corresponding to the P3 practice session. My .f1.createLapTable function is passing all tests.
My code here:
lap: select from .f1.createLapTable[event;sensor] where session like “P3”
In section 2.2, where there is a requirement to “Load in lap table FROM DISK for data for 2nd January and save it to a variable called lapTable”, I am using the ‘get’ function to load in my ‘lap’ table.
My code here:
lapTable:get `:2020.01.02/lap
I am not exactly sure how to fulfill the requirements for quizzes 2.2.2 and 2.2.3, as I thought my select statement in section 1.4 would suffice. Perhaps the issue lies in my usage of “get,” and some other retrieval should be used. I would appreciate any help or advice.
Thank you for sharing this with the community, great content!
My team mate, Eoghan, and I have discussed this.
We also think that the issue might be with the usage of the ‘get’ function. We suggest that you should just be querying the HDB that you have loaded. The current method you’re running won’t have a date column in the table and this explains the error “contain all columns for 2nd Jan 2020”.
I really appreciate the response. One small issue. I am deriving my ‘lap’ table from the .f1.createLabTable function, and a requirement of this function is to procure a table without a date column in it. Thus, applying a ‘select from lap where date=2020.01.02’ query will not work. From a visual examination, I figured that data from the ‘P3 practice session’ exclusively corresponded to 2020.01.02. Perhaps I was wrong about this?
I’ve actually added a date column to my ‘lapTable’ table, and it seems to have fixed half the problem as I am now passing quiz 2.2.2 (“only contains data for 2nd Jan 2020”).
My code here:
lapTable: lap //assign lapTable to lap, where lap is still derived from the section 1.4 code from my first post
lapTable: update date:(count lapTable)#2020.01.02 from lapTable //adding a date column to lapTable
cols lapTable: `date xcols lapTable //making the date column the first column in lapTable
Unfortunately I am still failing 2.2.3 (“contain all columns for 2nd Jan 2020”). Would it be possible for me to receive a hint as to what the proper columns would be for 2nd January 2020? Also let me know if anything I mentioned wasn’t clear. Thank you!