Problem in modifying a vmart_queries.sql file.

I am using community edition HP Vertica on Fedora 18 platform. I have designed a new schema but uanble to edit the file vmart_queries.sql. It is showing as read-only. Kindly suggest how to write my own sql queries on a new schema

Comments

  • Hi Syed, thanks for your question. The vmart_queries.sql file is an example file. It's not meant for editing; the original is intended to stay as-is for future reference. If you would like to use it as a basis for queries of your own, you can copy it to your home directory or to another directory or computer that you control, and modify the copy. You can also write your own .sql file: Just create a plain-text file using your text editor of choice, and write the queries into the file. Then save the file with a .sql extension. Alternatively, you can issue queries interactively, using our vsql command-line prompt. Just log into your database server as the "dbadmin" user created during installation, and type "vsql". (You may have to log in some other way, in which case, talk to whoever set up your Vertica cluster.) This will give you a command-line prompt; you can type queries into it and they will run and display their results.
  • Syed_Mohammad_MSyed_Mohammad_M Registered User
    Hi Adam, Thanks for propmt help. But If I am creating my own .sql file and passing it whole path while running a database designer then it says "file or directory does not exists". Is there any other way, I can pass my bunch of queries to database designer wizard. Please suggest.
  • Syed_Mohammad_MSyed_Mohammad_M Registered User
    can I work inside the .rpm package only ? because if i am giving any other path it except .rpm package then it says "invalid path". can I extract the .rpm package to create and "Opt" folder and work inside that ? Please help.
  • Hi Syed, it sounds to me like what you're trying to do should work just fine. So something's wrong. Let me ask a few questions to try to track down the problem. Are you storing the .sql file on the Vertica cluster, on the machine that you are running the database designer from? Or are you storing it on your own (separate) personal computer? If you're storing the file on your computer, what path are you giving to the database designer? (It does expect a local file.) When you create the .sql file, are you creating it as Vertica's "dbadmin" user, or as your own user account? If the latter, can the "dbadmin" user see the file? (Test this by typing "cat " at the same prompt where you run adminTools to invoke the database designer. For example, "cat /home/syed/my_queries.sql", where "/home/syed/my_queries.sql" would be the path that you're giving to the database designer. This should print out the contents of the file. If it also reports "File not found" or similar, then either you've typed the wrong path, or your system has some unusual configuration.) If you have a local system administrator who maintains your cluster, you may want to run this thread by them. This is getting into the realm of your particular setup; what permissions your Linux user account has, etc. So they might have a quick answer for you. If you are that local system administrator, well, I'll see what I can do :-)
  • Syed_Mohammad_MSyed_Mohammad_M Registered User
    Hi Adam, When I am trying to place sql file on some other path and give the path while running database designer, system is saying that the file does not exists.
  • Syed_Mohammad_MSyed_Mohammad_M Registered User
    Dear Adam, I am working on only a single node vertica. Whenever I try to place my .sql file on desktop and give the full path of .sql file while running a database designer I am not able to access the file with cat command also it gives the error as "file does not exists". Kindly guide me after creating my own .sql file how should I access it from vertica.
  • Syed_Mohammad_MSyed_Mohammad_M Registered User
    I am using dbadmin user account only
  • Hi Syed, if the "cat" command doesn't work, then the path that you are typing is incorrect. "cat" is a standard Linux utility; it will work on any file, and is entirely independent of Vertica. It sounds like the path that you are passing to "cat" is in fact not a valid path. One thought: Did you get the capitalization right? Linux paths are case-sensitive. For example, in most (English-language) Linux distributions, the desktop folder is "Desktop" with a capital "D", and "desktop" with a lowercase "d" is a totally different folder. So you need to get the capitalization right. (This is different from how Windows and Mac computers behave.) If that doesn't help, I would strongly encourage you to find a colleague or co-worker who is particularly experienced with Linux or UNIX systems. (They don't need to know Vertica at all.) Ask them "I'm trying to cat a file using its absolute path and it's not working; could you help me?" They will likely be able to sort out your problem very quickly by looking over your shoulder and seeing exactly what you're doing.
  • Syed_Mohammad_MSyed_Mohammad_M Registered User
    Dear Adam, Thanks my problem is resolved now. Actually we were switching to a different user "dbadmin" using command su - dbadmin. so the file was not reachable to this user. But when we loggined a "dbadmin" user then .sql file ws reacheable. Thanks.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file