Page 1 of 1

Vertica AWR Type Module

Posted: Sun Jan 25, 2015 6:39 pm
by Aastha
Hello Guys ;

As a part of assignment , we are asked to have awr (automatic workload repository) like report (the one we have in oracle) in VERTICA databases .

The idea is to have a flow similar like

Step 1 :While running the sql it will populate the result as

Rownum Date

Step 2 :Users selects the date for which we require the report.The report basically contains results from various historical tables

Please help me in this and also suggest the way in which we can store the file which in the form of text in the table column

Re: Vertica AWR Type Module

Posted: Tue Jan 27, 2015 2:55 pm
by JimKnicely
Hi!

I'm not sure what you are asking :(

Are you asking how to generate a row number? That's easy with the row_number() analytic function

Example

Code: Select all

dbadmin=> SELECT row_number() over (order by node_name) rownum, node_name, node_address FROM nodes order by node_name;
 rownum |      node_name      |  node_address
--------+---------------------+-----------------
      1 | v_snowfall_node0001 | 209.166.166.81
      2 | v_snowfall_node0002 | 209.166.166.245
      3 | v_snowfall_node0003 | 209.166.166.73
(3 rows)
Also, it's easy extract data from Vertica into text files (i.e. csv files). Just search this site for csv.