GET_PROJECTIONS function in Vertica

Moderator: NorbertKrupa

Post Reply
arun2986
Newbie
Newbie
Posts: 5
Joined: Fri Jul 27, 2012 5:31 pm

GET_PROJECTIONS function in Vertica

Post by arun2986 » Tue Aug 07, 2012 4:36 pm

Hi All,
I am trying to find out the segmented columns of a particular table for my analytics purpose. The segmentation information is being given during the table creation process. Iam using get_projections function to get the detail i needed. But get_projections() give the output as a report which i cannot use it straight away.

Present output:
-----------------
Current system K is 1.
# of Nodes: 22.
Table raw_stage.TABLEA has 2 projections.

Projection Name: [Segmented] [Seg Cols] [# of Buddies] [Buddy Projections] [Safe] [UptoDate] [Stats]
----------------------------------------------------------------------------------------------------
schema_stage.TABLEA_b1 [Segmented: Yes] [Seg Cols: "schema_stage.TABLEA.COLUMN1"] [K: 1] [schema_stage.TABLEA_b0] [Safe: Yes] [UptoDate: Yes] [Stats: RowCounts]

Expected Output:
-------------------
COLUMN1

Can someone please help me out with this ? If possible, is there a way to find out how does get_projections() function work. If so, we can find the table it refers to, everytime we make a call. I can write my SQL to directly query the referred table and get my result.

Regards,
ArunKumar

jpcavanaugh
Intermediate
Intermediate
Posts: 149
Joined: Mon Apr 30, 2012 10:04 pm
Location: New York
Contact:

Re: GET_PROJECTIONS function in Vertica

Post by jpcavanaugh » Tue Aug 07, 2012 8:07 pm

Can you please take a look at export_objects? I believe you will want to call:

select export_objects('', schema.table_name);

http://my.vertica.com/docs/6.0.0-1/HTML ... #12721.htm

arun2986
Newbie
Newbie
Posts: 5
Joined: Fri Jul 27, 2012 5:31 pm

Re: GET_PROJECTIONS function in Vertica

Post by arun2986 » Wed Aug 08, 2012 8:30 pm

Thanks juniorfoo. Let me look into query.

Regards,
ArunKumar

Post Reply

Return to “Vertica SQL”