Advanced Capstone 1.1

I have a question regarding the renaming of the table using the dbmaint.q function… I believe my error is about the database directory, but I cannot figure it out (screenshot attached - the \cd command may not play any role, as I am already in the \pwd directory, but I am not sure). Moreover, the \ls command does not work - should I add the “system” instruction line? I tried the tutorials as well but did not really understand how to access the \pwd, \ls, \cd instructions.

 

Thank you in anticipation!

 

Hi  , 

I would recommend running your code in the scratchpad. This will allow you to run each command line by line, instead of in the markdown file where everything in the code block will run. 

You run system commands using  (System commands in q) or you can use the “system” operator (system keyword) whichever you are more comfortable using. 

I can’t see an error in your screenshot, you’ll need to screenshot the output console for me to see what is happening, however you are correct that you don’t need the \cd command as you should already be in the correct directory after loading the f1 database. 

For your renamecol function, take another look at the first argument, and double check the syntax you are using - to make sure your directory is correct you could input the whole directory in full, or assign it to a variable that can be reused.

Hope this helps!

Laura

Dear Laura,

Thank you for your suggestion! I tried using the system ls command to check my directories in the pwd. However, when I run the renamecol command, I only get the red error at the bottom of the screenshot. This happens for both of the commands renamecol. 

Hi  , 

That error looks like renamecol isn’t defined in your workspace. Have you loaded the dbmaint.q script? 

To check, you can run simply 

renamecol

it should return the definition of the function if dbmaint.q has been loaded. 

If it throws the same error as your screenshot, the script has not been loaded, and you’ll need to go back to  1.1 and re-read the hint.

Hope this helps,

Laura

Thank you a lot!!! This fixed my issue.