<?xml version="1.0" encoding="UTF-8" ?>
<!--
  ~ Copyright (c) DbVis Software AB. All Rights Reserved.
  -->

<!DOCTYPE DatabaseProfile SYSTEM "dbvis-defs.dtd">

<DatabaseProfile
        desc="Profile for Vertica"
        minver="9.5"
        extends="generic">

   <!-- =================================================================== -->
   <!-- Definition of initialization commands                               -->
   <!-- =================================================================== -->

   <InitCommands extends="true">

      <Command id="vertica.getIsSuperUser" whenerror="ignore">
         <SQL>
            <![CDATA[
SELECT   is_super_user
FROM     users
WHERE    user_name = CURRENT_USER()
         ]]>
         </SQL>
         <Output index="1" name="SUPERUSER" />
      </Command>

   </InitCommands>

   <!-- =================================================================== -->
   <!-- Definitions of schema/databases commands -->
   <!-- =================================================================== -->

   <Commands extends="true">

      <Command id="vertica.getDatabases">
         <SQL>
            <![CDATA[
SELECT	*
FROM		v_catalog.databases
ORDER BY	database_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getNonSystemSchemas">
         <SQL>
            <![CDATA[
SELECT	*
FROM		v_catalog.schemata
WHERE		schema_name not in ('v_catalog', 'v_monitor', 'v_internal')
ORDER BY	upper(schema_name)
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getSystemSchemas">
         <SQL>
            <![CDATA[
SELECT 'v_catalog' as schema_name
UNION
SELECT 'v_monitor' as schema_name
ORDER BY schema_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getTemporarySystemSchemas">
         <SQL>
            <![CDATA[
SELECT 'v_temp_schema' as schema_name
			]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- Miscellaneous Commands -->
      <!-- ================================================================= -->

      <!--
      This command isn't used due to the fact that it needs to be polished:
      The proj_histogram_error view does calculations on columns based upon their names.
      This needs to be fixed so that columns with the same names (different tables) are
      not having math done on them. Also, it needs to insert into tables when they exist
      already
      -->
      <Command id="vertica.queryPHEH">
         <SQL>
            <![CDATA[
create view proj_histogram as
select
  p.schemaname     as schema,
  p.name           as projection,
  c.name           as column,
  h.column_id      as column_id,
  h.key		       as low_bound,
  h.row_count      as bucket_row_count,
  h.distinct_count as bucket_distinct_count
from
       vs_projections p
  JOIN vs_projection_columns c           ON p.oid = c.proj
  JOIN vs_projection_column_histogram h  ON c.oid = h.column_id
order by 1,2,3,4,5

create view proj_histogram_error as
select column_id,
       key::varchar,
       distinct_count,
       avg(distinct_count) over () as mean_distinct_count,
       abs(distinct_count - avg(distinct_count) over ()) as error,
       round(abs(distinct_count - avg(distinct_count) over ()) / abs(avg(distinct_count) over()), 2) as error_percent
      from vs_projection_column_histogram
      group by column_id

create view proj_histogram_error_human as
select
  ph.schema,
  ph.projection,
  ph.column,
  ph.low_bound,
  phe.distinct_count,
  phe.mean_distinct_count,
  phe.error_percent
from
    proj_histogram ph
     JOIN
    proj_histogram_error phe
     ON (ph.column_id = phe.column_id AND ph.low_bound = phe.key)

select * from proj_histogram_error_human where error_percent > 1
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getColumnAnalyticStats">
         <SQL>
            <![CDATA[
SELECT	row_count AS 'Count',
			ndv AS 'Distinct',
			min AS 'Min',
			max AS 'Max',
			stat_collection_time AS 'Last Stat Collection'
FROM		vs_tables AS t
			JOIN vs_projections AS p ON t.oid = p.anchortable
			JOIN vs_projection_columns AS pc ON p.oid = pc.proj
WHERE		t.name = '${theTableName}'
			AND pc.name = '${objectname}'
			]]>
         </SQL>
      </Command>

      <!-- Not currently used -->
      <Command id="vertica.getColumnAnalyticStatsOld">
         <SQL>
            <![CDATA[
SELECT	COUNT(${objectname}) AS 'Count',
			COUNT(DISTINCT ${objectname}) AS 'Distinct',
			MIN(${objectname}) AS 'Min',
			MAX(${objectname}) AS 'Max',
			SUM(${objectname}) AS 'Sum',
			
			SUM(${objectname})/COUNT(${objectname}) AS 'Mean',
			
			STDDEV(${objectname}) AS 'Std Dev',
			VARIANCE(${objectname}) AS 'Variance'
FROM		${theTableName}
LIMIT		1
			]]>
         </SQL>
      </Command>

      <!-- The "getTableNamesFor" command is used by Database getTableNamesFor(). It must return table names for the catalog and schema named by the ${table_catalog} and ${table_catalog} variables in the first
         column. -->
      <Command id="vertica.getTableNamesFor">
         <SQL>
            <![CDATA[
SELECT    table_name 
FROM      v_catalog.all_tables 
WHERE     schema_name LIKE '${table_schema}'
ORDER BY  table_name
            ]]>
         </SQL>
      </Command>

      <!--
      The "getColumnNamesFor" command is used by Database getColumnNamesFor().
      It must return column names for the catalog, schema and table named
      by the ${table_catalog}, ${table_schema} and ${table_name}
      variables in the first column.
      -->
      <Command id="vertica.getColumnNamesFor">
         <SQL>
            <![CDATA[
SELECT    column_name
FROM      v_catalog.columns
WHERE     table_schema = '${table_schema}'
AND       table_name = '${table_name}'
ORDER BY  column_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getExportObject">
         <SQL>
            <![CDATA[
SELECT   export_objects('','${schema}.${name}',${addKsafeFlag})
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- Table Related Commands -->
      <!-- ================================================================= -->

      <Command id="vertica.getSequences">
         <SQL>
            <![CDATA[
SELECT	*
FROM		v_catalog.sequences
WHERE		sequence_schema LIKE '${schema}'
			AND sequence_name LIKE '${name}'
ORDER BY sequence_name
			]]>
         </SQL>
      </Command>

      <!--Get TABLE, SYSTEM TABLE but never FLEX tables-->
      <Command id="vertica.getTables">
         <SQL>
            <![CDATA[
select at.schema_name as 'Schema',
       at.table_name AS 'Table Name',
       at.table_type AS 'Type',
       t.owner_name AS 'Owner',
       t.create_time AS 'Created',
       at.remarks AS 'Remarks'
FROM   v_catalog.all_tables at,
       v_catalog.tables t
WHERE  at.schema_name LIKE '${schema}'
AND    at.table_name LIKE '${objectname}'
AND    at.table_type = '${type}'
AND    t.table_id = at.table_id
            ]]>
<If test="#util.isDatabaseVersionGTE(7)">
            <![CDATA[
AND    t.is_flextable = 'false'
            ]]>
</If>
            <![CDATA[
ORDER BY	at.schema_name,at.table_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getViews">
         <SQL>
            <![CDATA[
select schema_name as 'Schema',
       table_name AS 'Table Name',
       table_type AS 'Type',
       remarks AS 'Remarks'
FROM   v_catalog.all_tables at
WHERE  schema_name LIKE '${schema}'
AND    table_name LIKE '${objectname}'
AND    table_type = 'VIEW'
ORDER BY	schema_name,table_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getFlexTables">
         <SQL>
            <![CDATA[
select table_schema AS 'Schema',
       table_name AS 'Table Name',
       create_time AS 'Created'
from   v_catalog.tables
WHERE  table_schema LIKE '${schema}'
AND    table_name LIKE '${objectname}'
AND    is_flextable = 'true'
order by table_schema, table_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getFlexTableMapToString">
         <SQL>
            <![CDATA[
SELECT maptostring(__raw__)
FROM   "${schema}"."${objectname}"
LIMIT 1
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getSystemTables">
         <SQL>
            <![CDATA[
SELECT	table_schema AS 'Schema',
         table_name AS 'Table Name',
         table_description AS 'Remarks'
FROM		v_catalog.system_tables
WHERE		table_schema LIKE '${schema}'
			AND table_name LIKE '${objectname}'
ORDER BY	table_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getTableGrants">
         <SQL>
            <![CDATA[
SELECT   grantor AS 'Grantor',
			privileges_description AS 'Privilege Description',
			object_schema AS 'Schema',
			object_name AS 'Name',
			grantee AS 'Grantee'
FROM     v_catalog.grants
WHERE    object_schema = '${schema}'
AND      object_name = '${objectname}'
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getTableConstraints">
         <SQL>
            <![CDATA[
SELECT   t.table_schema AS 'Schema',
			t.table_name AS 'Table Name',
			tc.constraint_name AS 'Constraint Name',
			tc.constraint_key_count AS 'Constraint Key Count',
			tc.foreign_key_count AS 'Foreign Key Count', 
            DECODE(tc.constraint_type,
                   'c', 'CHECK',
                   'f', 'FOREIGN',
                   'p', 'PRIMARY',
                   'U', 'UNIQUE',
                   'd', 'DETERMINES',
                        'UNKNOWN') AS 'Constraint Type'
FROM     v_catalog.tables t, v_catalog.table_constraints tc
WHERE    t.table_schema_id = tc.constraint_schema_id
AND      t.table_id = tc.table_id
AND      t.table_schema = '${schema}'
AND      t.table_name = '${objectname}'
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- Projection Related Commands -->
      <!-- ================================================================= -->

      <Command id="vertica.getProjectionsForSchema">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Node Name',
         projection_schema AS 'Schema',
			projection_name AS 'Name',
			projection_basename AS 'Basename',
			projection_id AS 'Projection Id',
			owner_name AS 'Owner Name',
			anchor_table_name AS 'Anchor Table Name',
			node_id AS 'Node ID',
			is_prejoin AS 'Prejoin',
			is_up_to_date AS 'Up to Date',
			has_statistics AS 'Has Stats',
			is_segmented AS 'Segmented'
FROM     v_catalog.projections
WHERE    projection_schema = '${schema}'
ORDER BY projection_schema,projection_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getProjectionsStorageForSchema">
         <SQL>
            <![CDATA[
SELECT
    projection_name,
    SUM(row_count)      AS row_count,
    SUM(used_bytes)     AS used_bytes,
    SUM(wos_row_count)  AS wos_row_count,
    SUM(wos_used_bytes) AS wos_used_bytes,
    SUM(ros_row_count)  AS ros_row_count,
    SUM(ros_used_bytes) AS ros_used_bytes
FROM
    projection_storage
GROUP BY
    1
ORDER BY
    1;
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getProjectionsActivityForSchema">
         <SQL>
            <![CDATA[
SELECT
    projection_name,
    anchor_table_schema,
    anchor_table_name,
    io_type,
    COUNT(*) AS Activity
FROM
    projection_usage
WHERE
    anchor_table_schema NOT LIKE 'v_temp%'
GROUP BY
    projection_name,
    anchor_table_schema,
    anchor_table_name,
    io_type
ORDER BY
    5 DESC,
    1;
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getProjectionsRefreshesForSchema">
         <SQL>
            <![CDATA[
SELECT   * 
FROM     v_monitor.projection_refreshes
WHERE    projection_schema = '${schema}'
ORDER BY projection_schema,projection_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getProjectionsForTable">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Node Name',
         projection_schema AS 'Schema',
			projection_name AS 'Name',
			projection_basename AS 'Basename',
			projection_id AS 'Projection Id',
			owner_name AS 'Owner Name',
			anchor_table_name AS 'Anchor Table Name',
			node_id AS 'Node ID',
			is_prejoin AS 'Prejoin',
			is_up_to_date AS 'Up to Date',
			has_statistics AS 'Has Stats',
			is_segmented AS 'Segmented'
FROM     v_catalog.projections p
WHERE    p.projection_id IN (
                      SELECT DISTINCT(pc.projection_id)
                      FROM  v_catalog.projection_columns pc
                      WHERE pc.table_schema = '${schema}'
                      AND   pc.table_name like '${tableName}'
                      AND   pc.table_column_name like '${columnName}')
ORDER BY projection_schema, projection_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getProjectionStorageAcrossNodesForAnchorTable">
         <SQL>
            <![CDATA[
SELECT	anchor_table_schema as 'Anchor Schema',
         anchor_table_name AS 'Anchor Table',
			projection_name AS 'Projection',
			node_name AS 'Node Name',
			SUM(ros_row_count) AS 'ROS Row Count',
			SUM(ros_used_bytes) AS 'ROS Bytes',
			SUM(wos_row_count) AS 'WOS Row Count',
			SUM(wos_used_bytes) AS 'WOS Bytes',
			SUM(row_count) AS 'Total Rows'
FROM		projection_storage
WHERE		anchor_table_schema = '${schema}'
AND      anchor_table_name = '${objectname}'
GROUP BY	1,2,3,4
ORDER BY	1,2,3,4
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getProjectionColumnsForTable">
         <SQL>
            <![CDATA[
SELECT   projection_column_name AS 'Column Name',
			column_position AS 'Column Position',
			sort_position AS 'Sort Position',
			data_type AS 'Data Type',
			encoding_type AS 'Encoding Type',
			access_rank AS 'Access Rank',
			table_schema AS 'Schema',
			table_name AS 'Table Name'
FROM     v_catalog.projection_columns
WHERE    projection_id = ${projectionId}
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getProjectionStorage">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Node Name',
			projection_schema AS 'Projection Schema',
			projection_name AS 'Projection Name',
			anchor_table_schema AS 'Anchor Table Schema',
			anchor_table_name AS 'Anchor Table Name',
			projection_column_count AS 'Column Count',
			row_count AS 'Column Count',
			used_bytes AS 'Used Bytes',
			ros_row_count AS 'ROS Row Count',
			ros_used_bytes AS 'ROS Used Bytes',
			ros_count AS 'ROS Count',
			wos_row_count AS 'WOS Row Count',
			wos_used_bytes AS 'WOS Used Bytes'
FROM     v_monitor.projection_storage
WHERE    projection_id = ${projectionId}
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getProjectionStorageContainers">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Node Name',
			schema_name AS 'Schema',
			projection_name AS 'Name',
			storage_type AS 'Storage Type',
			total_row_count AS 'Total Rows',
			deleted_row_count AS 'Deleted Row Count',
			used_bytes AS 'Used Bytes',
			start_epoch AS 'Start Epoch',
			end_epoch AS 'End Epoch',
			grouping AS 'Grouping'
FROM     v_monitor.storage_containers
WHERE    projection_id = ${projectionId}
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getProjectionPartitions">
         <SQL>
            <![CDATA[
SELECT   partition_key AS 'Partition Key',
			table_schema AS 'Table Schema',
			projection_name AS 'Name',
			ros_size_bytes AS 'ROS Size (Bytes)',
			ros_row_count AS 'ROS Row Count',
			node_name AS 'Node Name',
			deleted_row_count AS 'Deleted Row Count'
FROM     v_monitor.partitions
WHERE    projection_id = ${projectionId}
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- User Related Commands -->
      <!-- ================================================================= -->

      <Command id="vertica.getUsers">
         <SQL>
            <![CDATA[
SELECT   user_name AS 'Name',
			is_super_user AS 'Super User',
			profile_name AS 'Profile Name',
			is_locked AS 'Locked',
			lock_time AS 'Lock Time',
			resource_pool AS 'Resource Pool',
			memory_cap_kb AS 'Memory Cap (KB)',
			temp_space_cap_kb AS 'Temp Space Cap (KB)',
			run_time_cap AS 'Run Time Cap',
			all_roles AS 'All Roles',
			default_roles AS 'Default Roles'
FROM     v_catalog.users
ORDER BY user_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getUserPasswords">
         <SQL>
            <![CDATA[
SELECT   user_name AS 'Name',
			password AS 'Password',
			password_create_time AS 'Password Create Time',
			is_current_password AS 'Current Password'
FROM     v_catalog.passwords
WHERE    user_name = '${user_name}'
ORDER BY user_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getRoles">
         <SQL>
            <![CDATA[
SELECT   name as 'Name',
         assigned_roles as 'Assigned Roles'
FROM     v_catalog.roles
ORDER BY name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getUsersFromRole">
         <SQL>
            <![CDATA[
SELECT	user_name,
         is_super_user,
         profile_name,
         is_locked,
         lock_time,
         resource_pool,
         memory_cap_kb,
         temp_space_cap_kb,
         run_time_cap,
         all_roles,
         default_roles
FROM		v_catalog.users
WHERE		all_roles LIKE '%${objectname}%'
ORDER BY user_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getProfiles">
         <SQL>
            <![CDATA[
SELECT   profile_name,
         password_life_time,
         password_grace_time,
         password_reuse_max,
         password_reuse_time,
         failed_login_attempts,
         password_lock_time,
         password_max_length,
         password_min_length,
         password_min_letters,
         password_min_lowercase_letters,
         password_min_uppercase_letters,
         password_min_digits,
         password_min_symbols
FROM		v_catalog.profiles
ORDER BY profile_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getUsersFromProfile">
         <SQL>
            <![CDATA[
SELECT	user_name,
         is_super_user,
         profile_name,
         is_locked,
         lock_time,
         resource_pool,
         memory_cap_kb,
         temp_space_cap_kb,
         run_time_cap,
         all_roles,
         default_roles
FROM		v_catalog.users
WHERE		profile_name = '${objectname}'
			]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- Other Related Commands -->
      <!-- ================================================================= -->

      <Command id="vertica.getRecentLongQueries">
         <SQL>
            <![CDATA[
SELECT	query_start AS 'Start Time',
			query_duration_us AS 'Time (microseconds)',
			is_executing AS 'Executing',
			node_name AS 'Node',
			user_name AS 'User',
			query AS 'Query'
FROM		v_monitor.query_profiles
WHERE		CAST(query_start AS TIMESTAMPTZ) > (NOW() - INTERVAL '1 HOUR')
			AND query_type = 'QUERY'
ORDER BY	query_duration_us DESC
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getRecentQueries">
         <SQL>
            <![CDATA[
SELECT	time AS 'Start Time',
			node_name AS 'Node',
			user_name AS 'User',
			request AS 'Query'
FROM		v_internal.dc_requests_issued
WHERE		time > (NOW() - INTERVAL '1 HOUR')
			AND request_type = 'QUERY'
ORDER BY	time DESC
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getSystem">
         <SQL>
            <![CDATA[
SELECT   *
FROM     v_monitor.system
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getSettings">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Node Name',
			parameter_name AS 'Parameter Name',
			current_value AS 'Current Value',
			default_value AS 'Default Value',
			change_under_support_guidance AS 'Change Under Support Guidance',
			change_requires_restart AS 'Change Requires Restart',
			description AS 'Description'
FROM     v_monitor.configuration_parameters
ORDER BY parameter_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getSessionSettings">
         <SQL>
            <![CDATA[
SHOW ALL
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getSessions">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Node Name',
			user_name AS 'User Name',
			client_hostname AS 'Client Hostname',
			client_pid AS 'Client PID',
			session_id as 'Session ID',
			login_timestamp AS 'Login Timestamp',
			transaction_start AS 'Transaction Start',
			transaction_description AS 'Transaction Description',
			statement_start AS 'Statement Start',
			last_statement_duration_us AS 'Last Statement Duration (microseconds)',
			runtime_priority AS 'Runtime Priority',
			current_statement AS 'Current Statement',
			last_statement AS 'Last Statement',
			ssl_state AS 'SSL State',
			authentication_method AS 'Authentication Method'
FROM     v_monitor.sessions
ORDER BY node_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getLocks">
         <SQL>
            <![CDATA[
SELECT   node_names AS 'Node Names',
			object_name AS 'Object Name',
			transaction_description AS 'Transaction Description',
			lock_mode AS 'Lock Mode',
			lock_scope AS 'Lock Scope',
			request_timestamp AS 'Request Timestamp',
			grant_timestamp AS 'Grant Timestamp'
FROM     v_monitor.locks
ORDER BY object_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getLicenses">
         <SQL>
            <![CDATA[
SELECT   *
FROM     v_catalog.licenses
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getLicenseAudits">
         <SQL>
            <![CDATA[
SELECT   database_size_bytes AS 'Database Size (Bytes)',
			license_size_bytes AS 'License Size (Bytes)',
			usage_percent AS 'Usage %',
			audit_start_timestamp AS 'Audit Start Timestamp',
			audit_end_timestamp AS 'Audit End Timestamp',
			confidence_level_percent AS 'Confidence Level %',
			error_tolerance_percent AS 'Error Tolerance %',
			used_sampling AS 'Used Sampling',
			confidence_interval_lower_bound_bytes AS 'Confidence Interval Lower Bound (Bytes)',
			confidence_interval_upper_bound_bytes AS 'Confidence Interval Upper bound (Bytes)',
			sample_count AS 'Sample Count',
			cell_count AS 'Cell Count'
FROM     v_catalog.license_audits
ORDER BY audit_end_timestamp desc
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getLicenseComplianceStatus">
         <SQL>
            <![CDATA[
select get_compliance_status()
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getLoadStreams">
         <SQL>
            <![CDATA[
SELECT   stream_name AS 'Stream Name',
			schema_name AS 'Schema Name',
			table_name AS 'Table Name',
			load_start AS 'Load Start',
			load_duration_ms AS 'Load Duration (miliseconds)',
			is_executing AS 'Executing',
			accepted_row_count AS 'Accepted Row Count',
			rejected_row_count AS 'Rejected Row Count',
			read_bytes AS 'Read Bytes',
			input_file_size_bytes As 'Input File Size (Bytes)',
			parse_complete_percent AS 'Parse Complete %',
			unsorted_row_count AS 'Unsorted Row Count',
			sorted_row_count AS 'Sorted Row Count',
			sort_complete_percent AS 'Sort Complete %'
FROM     v_monitor.load_streams
ORDER BY table_name, load_start
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getTupleMoverOperations">
         <SQL>
            <![CDATA[
SELECT   operation_name AS 'Operation Name',
			operation_start_timestamp AS 'Operation Start Timestamp',
			node_name AS 'Node Name',
			operation_status AS 'Operation Status',
			table_schema AS 'Table Schema',
			table_name AS 'Table Name',
			projection_name AS 'Projection Name',
			plan_type AS 'Plan Type',
			session_id AS 'Session ID',
			is_executing AS 'Executing',
			runtime_priority AS 'Runtime Priority'
FROM     v_monitor.tuple_mover_operations
ORDER BY operation_name
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- Node Related Commands -->
      <!-- ================================================================= -->

      <Command id="vertica.getNodes">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Name',
			node_state AS 'Node State',
			node_address AS 'Node Address',
			export_address AS 'Export Addresses',
			is_ephemeral AS 'Ephemeral'
FROM     v_catalog.nodes
ORDER BY node_name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getHostResources">
         <SQL>
            <![CDATA[
SELECT   *
FROM     v_monitor.host_resources
WHERE    host_name = '${host_name}'
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getNodeResources">
         <SQL>
            <![CDATA[
SELECT   *
FROM     v_monitor.node_resources
WHERE    node_name = '${node_name}'
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getNodeResourceUsage">
         <SQL>
            <![CDATA[
SELECT   *
FROM     v_monitor.resource_usage
WHERE    node_name = '${node_name}'
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getNodeDiskResourceRejections">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Name',
			resource_type AS 'Resource Type',
			rejected_reason AS 'Rejected Reason',
			rejected_count AS 'Rejected Count',
			first_rejected_timestamp AS 'First Rejected Timestamp',
			last_rejected_timestamp AS 'Last Rejected Timestamp',
			last_rejected_value AS 'Last Rejected Value'
FROM     v_monitor.disk_resource_rejections
WHERE    node_name = '${node_name}'
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getNodeDiskStorage">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Name',
			storage_path AS 'Storage Path',
			storage_usage AS 'Storage Usage',
			rank AS 'Rank',
			throughput AS 'Throughput',
			latency AS 'latency',
			storage_status AS 'Storage Status',
			disk_block_size_bytes AS 'Disk Block Size (Bytes)',
			disk_space_used_blocks AS 'Disk Space Used (Blocks)',
			disk_space_used_mb AS 'Disk Space Used (MB)',
			disk_space_free_blocks AS 'Disk Space Free (Blocks)',
			disk_space_free_mb AS 'Disk Space Free (MB)',
			disk_space_free_percent AS 'Disk Space Free %'
FROM     v_monitor.disk_storage
WHERE    node_name = '${node_name}'
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- Resource Related Commands -->
      <!-- ================================================================= -->

      <Command id="vertica.getResourcePools">
         <SQL>
            <![CDATA[
SELECT   name AS 'Name',
			is_internal AS 'Internal',
			memorysize AS 'Memory Size',
			maxmemorysize AS 'Max Mem Size',
			executionparallelism AS 'Execution Parallelism',
			priority AS 'Priority',
			runtimepriority AS 'Runtime Priority',
			runtimeprioritythreshold AS 'Runtime Priority Threshold',
			queuetimeout AS 'Queue Timeout',
			plannedconcurrency AS 'Planned Concurrency',
			maxconcurrency AS 'Max Concurrency',
			runtimecap AS 'Runtime Cap',
			singleinitiator AS 'Single Initiator'
FROM     v_catalog.resource_pools
ORDER BY name
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getResourcePoolStatus">
         <SQL>
            <![CDATA[
SELECT   *
FROM     v_monitor.resource_pool_status
WHERE    pool_name = '${pool_name}'
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getResourcePoolQueues">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Node Name',
			transaction_id AS 'Transaction ID',
			statement_id AS 'Statement ID',
			pool_name AS 'Pool Name',
			memory_requested_kb AS 'Memory Requested (KB)',
			priority AS 'Priority',
			position_in_queue AS 'Position in Queue',
			queue_entry_timestamp AS 'Queue Entry Timestamp'
FROM     v_monitor.resource_queues
WHERE    pool_name = '${pool_name}'
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getResourcePoolRejections">
         <SQL>
            <![CDATA[
SELECT   node_name AS 'Node Name',
			pool_name AS 'Pool Name',
			reason AS 'Reason',
			resource_type AS 'Resource Type',
			rejection_count AS 'Rejection Count',
			first_rejected_timestamp AS 'First Rejection Timestamp',
			last_rejected_timestamp AS 'Last Rejection Timestamp',
			last_rejected_value AS 'Last Rejected Value'
FROM     v_monitor.resource_rejections
WHERE    pool_name = '${pool_name}'
            ]]>
         </SQL>
      </Command>

      <Command id="vertica.getTuningRecommendations">
         <SQL>
            <![CDATA[
SELECT   observation_count AS 'Observation Count',
			first_observation_time AS 'First Observation Time',
			last_observation_time AS 'Last Observation Time',
			tuning_parameter AS 'Tuning Parameter',
			tuning_description AS 'Tuning Description',
			tuning_command AS 'Tuning Command',
			tuning_cost AS 'Tuning Cost'
FROM     v_monitor.tuning_recommendations
            ]]>
         </SQL>
      </Command>

      <!-- ================================================================= -->
      <!-- User-Defined X Related Commands -->
      <!-- ================================================================= -->

      <Command id="vertica.getAllUDX">
         <SQL>
            <![CDATA[
SELECT	*
FROM		v_catalog.user_functions
WHERE    schema_name = '${schema}'
ORDER BY procedure_type, function_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getUDX">
         <SQL>
            <![CDATA[
SELECT	*
FROM		v_catalog.user_functions
WHERE    schema_name = '${schema}'
AND  		procedure_type in (${type})
AND      function_definition like 'Class%'
ORDER BY procedure_type, function_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getUDOther">
         <SQL>
            <![CDATA[
SELECT	*
FROM		v_catalog.user_functions
WHERE    schema_name = '${schema}'
AND		procedure_type not in ('User Defined Aggregate',
                                'User Defined Analytic',
                                'User Defined Filter',
                                'User Defined Function',
                                'User Defined Parser',
                                'User Defined Source',
                                'User Defined Transform')
ORDER BY procedure_type, function_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getSQLFunctions">
         <SQL>
            <![CDATA[
SELECT	*
FROM		v_catalog.user_functions
WHERE    schema_name = '${schema}'
AND  		procedure_type in ('User Defined Function')
AND      function_definition not like 'Class%'
ORDER BY procedure_type, function_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getLibraries">
         <SQL>
            <![CDATA[
SELECT	*
FROM		v_monitor.user_libraries
WHERE    schema_name = '${schema}'
ORDER BY lib_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getLibraryManifest">
         <SQL>
            <![CDATA[
SELECT	*
FROM		v_monitor.user_library_manifest
WHERE    lib_name = '${library}'
ORDER BY obj_name
			]]>
         </SQL>
      </Command>

      <Command id="vertica.getProcedures">
         <SQL>
            <![CDATA[
SELECT schema_name AS 'Schema',
       procedure_name AS 'Procedure Name',
       procedure_arguments AS 'Arguments'
FROM   user_procedures
WHERE  schema_name = '${schema}'
ORDER BY schema_name, procedure_name
			]]>
         </SQL>
      </Command>

   </Commands>

   <!-- =================================================================== -->
   <!-- Definition of the object actions                                    -->
   <!-- =================================================================== -->

   <ObjectsActionDef extends="false">

      <ActionGroup type="Schemas">
         <Action id="vertica-schemas-create" label="Create Schema" reload="true"
                 resetschemas="true" icon="add">
            <Input label="Schema Name" name="newSchema" style="text" editable="true"/>
            <Command>
               <SQL>
                  <![CDATA[
                  create schema ${QB}${newSchema}${QE}
                  ]]></SQL>
            </Command>
            <Confirm>Create schema ${newSchema}?</Confirm>
            <Result>Schema ${newSchema} created!</Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Schema">
         <Action id="vertica-schema-rename" label="Rename Schema" reload="true" resetschemas="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="New Schema Name" name="newSchema" style="text"/>
            <Command>
               <SQL><![CDATA[alter schema "${schema}" rename to ${QB}${newSchema}${QE}]]></SQL>
            </Command>
            <Confirm>
               Confirm rename of schema ${objectname} to ${newSchema}?
            </Confirm>
            <Result>
               Schema ${objectname} renamed to ${newSchema}!
            </Result>
         </Action>

         <Action id="vertica-schema-drop" label="Drop Schema" reload="true"
                 resetschemas="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Cascade Objects" name="cascade" style="check">
               <Values>cascade</Values>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[
                  drop schema "${schema}" ${cascade}
                  ]]></SQL>
            </Command>
            <Confirm>
               <![CDATA[
                 Really drop schema ${schema}?<br>
                 (All data will be lost!)
               ]]>
            </Confirm>
            <Result>Schema ${schema} dropped!</Result>
         </Action>

         <Action id="vertica-schema-export" label="Export Schema"
            icon="export" reload="false"
            class="schemaExport"
            doclink="/doclink/export-schema"/>

         <If test="#SUPERUSER">
            <Action id="vertica-schema-analyze-workload" label="Analyze Workload For Schema">
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Command>
                  <SQL><![CDATA[SELECT analyze_workload('${schema}')]]></SQL>
               </Command>
               <Confirm>
                  Really Analyze Workload on ${schema}?
               </Confirm>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Tables">
         <Action id="vertica-tables-create-table" label="Create Table"
            icon="add" reload="true"
            class="tableCreate"
            classargs="create"
            doclink="/doclink/create-table"/>

         <Action id="vertica-tables-import-table-data"
            label="Import Table Data"
            icon="import"
            reload="true"
            class="tableDataImport"
            doclink="/doclink/import-table"/>
      </ActionGroup>

      <ActionGroup type="GlobalTempTables">
         <Action id="vertica-temp-tables-create-table" label="Create Table"
            icon="add" reload="true"
            class="tableCreate"
            classargs="create"
            doclink="/doclink/create-table"/>

         <Action id="vertica-temp-tables-import-table-data"
            label="Import Table Data"
            icon="import"
            reload="true"
            class="tableDataImport"
            doclink="/doclink/import-table"/>
      </ActionGroup>

      <ActionGroup type="LocalTempTables">
         <If test="#cp.getBool('SinglePhysicalConnection')">
            <Action id="vertica-local-temp-tables-create-table" label="Create Table"
               icon="add" reload="true"
               class="tableCreate"
               classargs="create"
               doclink="/doclink/create-table"/>
         </If>
         <Else>
            <Action id="vertica-local-temp-tables-create-table-INFO" label="Create Table" icon="add">
               <Confirm>
                  <![CDATA[
                     Creating <b>Temporary Table</b> is only supported with <b>Single Shared Physical Connection</b> enabled.
                     ]]>
               </Confirm>
            </Action>
         </Else>

         <Action id="vertica-local-temp-tables-import-table-data"
            label="Import Table Data"
            icon="import"
            reload="true"
            class="tableDataImport"
            doclink="/doclink/import-table"/>
      </ActionGroup>

      <ActionGroup type="Table">
         <Action id="vertica-tables-alter-table" label="Alter Table"
            icon="edit" reload="true"
            class="tableAlter"
            classargs="alter"
            doclink="/doclink/alter-table"/>

         <Action id="vertica-table-rename" label="Rename Table" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Table Name" name="newTable" style="text"/>
            <Command>
               <SQL><![CDATA[alter table "${schema}"."${objectname}" rename to ${QB}${newTable}${QE}]]></SQL>
            </Command>
            <Confirm>
               Confirm rename of table ${objectname} to ${newTable}?
            </Confirm>
            <Result>
               Table ${objectname} renamed to ${newTable}!
            </Result>
         </Action>


         <Action id="vertica-table-clear" label="Empty Table" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Use Command" name="useCommand" style="radio">
               <Values>TRUNCATE|DELETE</Values>
               <Default>TRUNCATE</Default>
            </Input>

            <SetVar name="_command" value="#useCommand.equals('TRUNCATE') ? 'truncate table' : 'delete from'"/>

            <Command>
               <SQL><![CDATA[${_command} "${schema}"."${objectname}"]]></SQL>
            </Command>
            <Confirm>
               Really remove all rows in table ${schema}.${objectname}?
            </Confirm>
            <Result>
               All rows in table ${schema}.${objectname} has been removed!
            </Result>
         </Action>

         <Action id="vertica-table-drop" label="Drop Table" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Drops all projections that include the table" name="cascade" style="check"
                   tip="Automatically drop projections that depend on the table">
               <Values>cascade</Values>
            </Input>
            <Command><SQL><![CDATA[drop table "${schema}"."${objectname}" ${cascade}]]></SQL></Command>
            <Confirm>
               Really drop table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Action id="vertica-table-reorganize" label="Reorganize Table">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[alter table "${schema}"."${objectname}" reorganize]]></SQL></Command>
            <Confirm>
               Really reorganize table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been reorganized!
            </Result>
         </Action>

         <Action id="vertica-table-removepartitioning" label="Remove Partitioning">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[alter table "${schema}"."${objectname}" remove partitioning]]></SQL></Command>
            <Confirm>
               Really remove partitioning for table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Partitions for table ${schema}.${objectname} has been removed!
            </Result>
         </Action>

         <Action id="vertica-table-movetable" label="Move Table to Schema" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Schema" name="newschema" style="list">
               <Values column="schema_name">
                  <Command idref="vertica.getNonSystemSchemas"/>
               </Values>
               <Default>${schema}</Default>
            </Input>
            <Input label="Cascade Objects" name="cascade" style="check">
               <Values>cascade</Values>
            </Input>

            <Command><SQL>
               <![CDATA[
alter table "${schema}"."${objectname}" set schema "${newschema}" ${cascade}
               ]]>
            </SQL></Command>
            <Confirm>
               Really move table ${schema}.${objectname} to schema ${newschema}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been moved to ${newschema}!
            </Result>
         </Action>

         <Action id="vertica-table-changeowner" label="Change Table Owner" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Owner" name="newowner" style="list">
               <Values column="1">
                  <Command idref="vertica.getUsers"/>
               </Values>
               <Default>${owner}</Default>
            </Input>

            <Command><SQL>
               <![CDATA[
alter table "${schema}"."${objectname}" owner to "${newowner}"
               ]]>
            </SQL></Command>
            <Confirm>
               Really change owner for table ${schema}.${objectname} to ${newowner}?
            </Confirm>
            <Result>
               Owner for table ${schema}.${objectname} changed to ${newowner}!
            </Result>
         </Action>

         <Action id="vertica-table-refresh" label="Refresh Projections">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[select refresh('${schema}.${objectname}')]]></SQL></Command>
            <Confirm>
               Really refresh projections for table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Projections for table ${schema}.${objectname} has been refreshed!
            </Result>
         </Action>
         
         <Action id="vertica-table-purge" label="Purge Table">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[select PURGE_TABLE('${schema}.${objectname}')]]></SQL></Command>
            <Confirm>
               Really purge table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been purged!
            </Result>
         </Action>

         <Action id="vertica-table-analyze-stats" label="Analyze Stats for Table">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[SELECT analyze_statistics('${schema}.${objectname}')]]></SQL>
            </Command>
            <Confirm>
               Really Analyze Statistics on Table ${schema}.${objectname}?
            </Confirm>
         </Action>

         <If test="#SUPERUSER">
            <Action id="vertica-table-analyze-workload" label="Analyze Workload For Table">
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Table" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[SELECT analyze_workload('${schema}.${objectname}')]]></SQL>
               </Command>
               <Confirm>
                  Really Analyze Workload on ${schema}.${objectname}?
               </Confirm>
            </Action>
         </If>

         <Separator/>

         <Action id="vertica-table-import-table-data" label="Import Table Data" icon="import"
            class="tableDataImport"
            doclink="/doclink/import-table"/>

         <Action id="vertica-table-export" label="Export Table" icon="export"
            class="tableExport"
            doclink="/doclink/export-table"/>

         <Separator/>

         <Action id="vertica-table-script-builder" label="Script Table" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,INSERT,UPDATE,DELETE,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="Column">
         <Action id="vertica-column-analyze-stats" label="Analyze Stats for Column">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${theTableName}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[SELECT analyze_statistics('${schema}.${theTableName}.${objectname}')]]></SQL>
            </Command>
            <Confirm>
               Really Analyze Statistics on column ${schema}.${theTableName}.${objectname}?
            </Confirm>
         </Action>
      </ActionGroup>

      <ActionGroup type="TempTable">
         <Action id="vertica-temptable-alter-table" label="Alter Table"
            icon="edit" reload="true"
            class="tableAlter"
            classargs="alter"
            doclink="/doclink/alter-table"/>

         <Action id="vertica-temptable-rename" label="Rename Table" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Table Name" name="newTable" style="text"/>
            <Command>
               <SQL><![CDATA[alter table "${schema}"."${objectname}" rename to ${QB}${newTable}${QE}]]></SQL>
            </Command>
            <Confirm>
               Confirm rename of table ${objectname} to ${newTable}?
            </Confirm>
            <Result>
               Table ${objectname} renamed to ${newTable}!
            </Result>
         </Action>

         <Action id="vertica-temptable-clear" label="Empty Table" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Use Command" name="useCommand" style="radio">
               <Values>TRUNCATE|DELETE</Values>
               <Default>TRUNCATE</Default>
            </Input>

            <SetVar name="_command" value="#useCommand.equals('TRUNCATE') ? 'truncate table' : 'delete from'"/>

            <Command>
               <SQL><![CDATA[${_command} "${schema}"."${objectname}"]]></SQL>
            </Command>
            <Confirm>
               Really remove all rows in table ${schema}.${objectname}?
            </Confirm>
            <Result>
               All rows in table ${schema}.${objectname} has been removed!
            </Result>
         </Action>

         <Action id="vertica-temptable-drop" label="Drop Table" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Drops all projections that include the table" name="cascade" style="check"
                   tip="Automatically drop projections that depend on the table">
               <Values>cascade</Values>
            </Input>
            <Command><SQL><![CDATA[drop table "${schema}"."${objectname}" ${cascade}]]></SQL></Command>
            <Confirm>
               Really drop table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Action id="vertica-temptable-refresh" label="Refresh Projection">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[select refresh('${schema}.${objectname}')]]></SQL></Command>
            <Confirm>
               Really refresh projections for table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Projections for table ${schema}.${objectname} has been refreshed!
            </Result>
         </Action>

         <Action id="vertica-temptable-analyze-stats" label="Analyze Stats for Table">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[SELECT analyze_statistics('${schema}.${objectname}')]]></SQL>
            </Command>
            <Confirm>
               Really Analyze Statistics on Table ${schema}.${objectname}?
            </Confirm>
         </Action>

         <If test="#SUPERUSER">
            <Action id="vertica-temptable-analyze-workload" label="Analyze Workload For Table">
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Table" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[SELECT analyze_workload('${schema}.${objectname}')]]></SQL>
               </Command>
               <Confirm>
                  Really Analyze Workload on ${schema}.${objectname}?
               </Confirm>
            </Action>
         </If>

         <Separator/>

         <Action id="vertica-temptable-import-table-data" label="Import Table Data" icon="import"
            class="tableDataImport"
            doclink="/doclink/import-table"/>

         <Action id="vertica-temptable-export" label="Export Table" icon="export"
            class="tableExport"
            doclink="/doclink/export-table"/>

         <Separator/>

         <Action id="vertica-temptable-script-builder" label="Script Table" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,INSERT,UPDATE,DELETE,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="FlexTables">
         <Action id="vertica-flextables-create-table" label="Create Flex Table"
            icon="add" reload="true"
            class="tableCreate"
            classargs="create"
            doclink="/doclink/create-table"/>

      </ActionGroup>

      <ActionGroup type="FlexTable">
         <Action id="vertica-flextable-alter-table" label="Alter Flex Table"
            icon="edit" reload="true"
            class="tableAlter"
            classargs="alter"
            doclink="/doclink/alter-table"/>

         <Action id="vertica-flextable-rename" label="Rename Table" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Table Name" name="newTable" style="text"/>
            <Command>
               <SQL><![CDATA[alter table "${schema}"."${objectname}" rename to ${QB}${newTable}${QE}]]></SQL>
            </Command>
            <Confirm>
               Confirm rename of table ${objectname} to ${newTable}?
            </Confirm>
            <Result>
               Table ${objectname} renamed to ${newTable}!
            </Result>
         </Action>

         <Action id="vertica-flextable-clear" label="Empty Table" reload="true">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Use Command" name="useCommand" style="radio">
               <Values>TRUNCATE|DELETE</Values>
               <Default>TRUNCATE</Default>
            </Input>

            <SetVar name="_command" value="#useCommand.equals('TRUNCATE') ? 'truncate table' : 'delete from'"/>

            <Command>
               <SQL><![CDATA[${_command} "${schema}"."${objectname}"]]></SQL>
            </Command>
            <Confirm>
               Really remove all rows in table ${schema}.${objectname}?
            </Confirm>
            <Result>
               All rows in table ${schema}.${objectname} has been removed!
            </Result>
         </Action>

         <Action id="vertica-flextable-drop" label="Drop Table" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Drops all projections that include the table" name="cascade" style="check"
                   tip="Automatically drop projections that depend on the table">
               <Values>cascade</Values>
            </Input>
            <Command><SQL><![CDATA[drop table "${schema}"."${objectname}" ${cascade}]]></SQL></Command>
            <Confirm>
               Really drop table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Table ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Action id="vertica-flextable-copy" label="Copy From">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Filename" name="filename" style="text" editable="true" tip="Full file path on the DB server"/>
            <Input label="Parser" name="parser" style="radio">
               <Values>fjsonparser|fdelimitedparser|fcefparser</Values>
               <Default>fjsonparser</Default>
            </Input>
            <Input label="Parser Arguments" name="arguments" style="text" editable="true"/>
            <Command><SQL><![CDATA[copy "${schema}"."${objectname}" from '${filename}' parser ${parser}(${arguments})]]></SQL></Command>
            <Confirm>
               Really copy file into ${schema}.${objectname}?
            </Confirm>
            <Result>
               File has been copied into table ${schema}.${objectname}!
            </Result>
         </Action>

         <Action id="vertica-flextable-buildview" label="Build View">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[select build_flextable_view('${schema}.${objectname}')]]></SQL></Command>
            <Confirm>
               Really build view for flex table ${schema}.${objectname}?
            </Confirm>
            <Result>
               View has been built for flex table ${schema}.${objectname}!
            </Result>
         </Action>

         <Action id="vertica-flextable-computebuildview" label="Compute and Build View">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[select compute_flextable_keys_and_build_view('${schema}.${objectname}')]]></SQL></Command>
            <Confirm>
               Really compute and build view for flex table ${schema}.${objectname}?
            </Confirm>
            <Result>
               View has been computated and built for flex table ${schema}.${objectname}!
            </Result>
         </Action>

         <Action id="vertica-flextable-refresh" label="Refresh Projection">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[select refresh('${schema}.${objectname}')]]></SQL></Command>
            <Confirm>
               Really refresh projections for table ${schema}.${objectname}?
            </Confirm>
            <Result>
               Projections for table ${schema}.${objectname} has been refreshed!
            </Result>
         </Action>

         <Action id="vertica-flextable-analyze-stats" label="Analyze Stats for Table">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Table" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[SELECT analyze_statistics('${schema}.${objectname}')]]></SQL>
            </Command>
            <Confirm>
               Really Analyze Statistics on Table ${schema}.${objectname}?
            </Confirm>
         </Action>

         <If test="#SUPERUSER">
            <Action id="vertica-flextable-analyze-workload" label="Analyze Workload For Table">
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Table" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[SELECT analyze_workload('${schema}.${objectname}')]]></SQL>
               </Command>
               <Confirm>
                  Really Analyze Workload on ${schema}.${objectname}?
               </Confirm>
            </Action>
         </If>

         <Separator/>

         <Action id="vertica-flextable-script-builder" label="Script Table" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,INSERT,UPDATE,DELETE,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="View">
         <Action id="vertica-view-rename" label="Rename View" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="View" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New View Name" name="newView" style="text"/>
            <Command>
               <SQL><![CDATA[alter view "${schema}"."${objectname}" rename to ${QB}${newView}${QE}]]></SQL>
            </Command>
            <Confirm>
               Confirm rename of view ${objectname} to ${newView}?
            </Confirm>
            <Result>
               View ${objectname} renamed to ${newView}!
            </Result>
         </Action>

         <Action id="vertica-view-drop" label="Drop View" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="View" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command><SQL><![CDATA[drop view "${schema}"."${objectname}"]]></SQL></Command>
            <Confirm>
               Really drop view ${schema}.${objectname}?
            </Confirm>
            <Result>
               View ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Separator/>

         <Action id="vertica-view-script-builder" label="Script Table" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,INSERT,UPDATE,DELETE,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="Projection">
         <Action id="vertica-projection-rename" label="Rename Projection" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Projection" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Projection Name" name="newProjection" style="text"/>
            <Command>
               <SQL><![CDATA[alter projection "${schema}"."${objectname}" rename to ${QB}${newProjection}${QE}]]></SQL>
            </Command>
            <Confirm>
               Confirm rename of view ${objectname} to ${newProjection}?
            </Confirm>
            <Result>
               Projection ${objectname} renamed to ${newProjection}!
            </Result>
         </Action>

         <Action id="vertica-projection-drop" label="Drop Projection" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Projection" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command>
               <SQL><![CDATA[drop projection "${schema}"."${objectname}"]]></SQL>
            </Command>
            <Confirm>
               Really drop projection "${schema}"."${objectname}"?
            </Confirm>
            <Result>
               Projection "${objectname}" dropped!
            </Result>
         </Action>

         <Separator/>

         <Action id="vertica-projection-script-builder" label="Script Projection" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,SELECT,SELECT *,INSERT,UPDATE,DELETE,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="Sequences">
         <Action id="vertica-sequences-create" label="Create Sequence" reload="true" icon="add">
            <Input label="Schema" editable="false" style="text">
               <Default>${schema}</Default>
            </Input>
            <Input label="Sequence Name" name="sequenceName" style="text"/>
            <Input label="Start With" name="startWith" style="text">
               <Default>1</Default>
            </Input>
            <Input label="Increment By" name="increment" style="text">
               <Default>1</Default>
            </Input>
            <Input label="Cached Values" name="cache" style="text">
               <Default>20</Default>
            </Input>
            <Input label="Cycle" name="cycle" style="radio">
               <Values>cycle|no cycle</Values>
               <Labels>Cycle|No Cycle</Labels>
               <Default>noorder</Default>
            </Input>
            <Command>
               <SQL>
                  <![CDATA[create sequence "${schema}".${QB}${sequenceName}${QE} start with ${startWith} increment by ${increment} no maxvalue no minvalue cache ${cache} ${cycle}]]></SQL>
            </Command>
            <Result>
               Sequence ${schema}.${sequenceName} created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Sequence">
         <Action id="vertica-sequence-rename" label="Rename Sequence" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Sequence" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="New Sequence Name" name="newSequence" style="text"/>
            <Command>
               <SQL><![CDATA[alter sequence "${schema}"."${objectname}" rename to ${QB}${newSequence}${QE}]]></SQL>
            </Command>
            <Confirm>
               Confirm rename of sequence ${objectname} to ${newSequence}?
            </Confirm>
            <Result>
               Sequence ${objectname} renamed to ${newSequence}!
            </Result>
         </Action>

         <Action id="vertica-sequence-drop" label="Drop Sequence" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Sequence" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Command>
               <SQL><![CDATA[drop sequence "${schema}"."${objectname}"]]></SQL>
            </Command>
            <Confirm>
               Really drop sequence ${schema}.${objectname}?
            </Confirm>
            <Result>
               Sequence ${schema}.${objectname} dropped!
            </Result>
         </Action>
         
         <Separator/>

         <Action id="vertica-sequence-script" label="Script Sequence" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="Functions">
         <Action id="vertica-functions-create" label="Create Function" reload="true" icon="add"
                 doclink="/doclink/create-function">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function Name" name="functionName" style="text"/>
            <Input label="Return Data Type" name="returns" style="text">
               <Default>VARCHAR(20)</Default>
            </Input>

            <Input label="Parameters" style="separator"/>

            <Input name="parameters" style="grid">
               <Arg name="output" value="${QB}${name}${QE} ${type}"/>
               <Arg name="newline" value=", "/>

               <Input name="name" label="Name" style="text">
                  <Default>parm</Default>
               </Input>
               <Input name="type" label="Type" style="text">
                  <Default>VARCHAR(20)</Default>
               </Input>
            </Input>

            <SetVar name="_parameters" value='#parameters.trim().equals("") ? "()" : "(" + #parameters + ")"'/>

            <Command exectype="asis">
               <SQL>
                  <![CDATA[
CREATE FUNCTION "${schema}".${QB}${functionName}${QE} ${_parameters}
RETURN ${returns}
AS
BEGIN
   RETURN 'Hello, ' || current_user() || '!';
END;
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Create function ${functionName}?
            </Confirm>
            <Result>
               Function ${functionName} created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Function">
         <Action id="vertica-function-rename" label="Rename Function" reload="true" icon="rename">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function Name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Arguments" style="text" editable="false">
               <Default>${arguments}</Default>
            </Input>
            <Input label="New Function Name" name="newFunction" style="text"/>
            <Command>
               <SQL><![CDATA[alter function "${schema}"."${objectname}"(${arguments}) rename to ${QB}${newFunction}${QE}]]></SQL>
            </Command>
            <Confirm>
               Confirm rename of function ${objectname} to ${newFunction}?
            </Confirm>
            <Result>
               Function ${objectname} renamed to ${newFunction}!
            </Result>
         </Action>

         <Action id="vertica-function-drop" label="Drop Function" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function Name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Arguments" style="text" editable="false">
               <Default>${arguments}</Default>
            </Input>

            <Command><SQL><![CDATA[drop function "${schema}"."${objectname}"(${arguments})]]></SQL></Command>
            <Confirm>
               Really drop function ${schema}.${objectname}?
            </Confirm>
            <Result>
               Function ${schema}.${objectname} has been dropped!
            </Result>
         </Action>

         <Action id="vertica-function-export" label="Export Function" icon="export"
            class="functionExport"
            doclink="/doclink/export-code-object"/>

         <Separator/>

         <Action id="vertica-function-script" label="Script Function" icon="scriptObject"
                 class="sqlBuilder"
                 classargs="script-dialog,CALL,CREATE,DROP"/>
      </ActionGroup>

      <ActionGroup type="Libraries">
         <If test="#SUPERUSER">
            <Action id="vertica-libraries-create" label="Create Library" reload="true" icon="add">
               <Message type="info">Note that the chosen language may not be supported by your Vertica version</Message>
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Library Name" name="libraryName" style="text"/>
               <Input label="Library Filename" name="filename" style="text"/>
               <Input label="Language" name="language" style="radio">
                  <Values>C++|R|Java</Values>
                  <Default>C++</Default>
               </Input>
               
               <Command exectype="asis">
                  <SQL>
                     <![CDATA[CREATE LIBRARY "${schema}".${QB}${libraryName}${QE} AS '${filename}' LANGUAGE '${language}']]>
                  </SQL>
               </Command>
               <Confirm>
                  Create library ${schema}.${libraryName}?
               </Confirm>
               <Result>
                  Library ${schema}.${libraryName} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Library">
         <If test="#SUPERUSER">
            <Action id="vertica-library-drop" label="Drop Library" reload="true" icon="remove">
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Library Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Cascade" name="cascade" style="check"
                      tip="Automatically drops any functions that depend on the library">
                  <Values>cascade</Values>
            </Input>
               <Command><SQL><![CDATA[drop library "${schema}"."${objectname}" ${cascade}]]></SQL></Command>
               <Confirm>
                  Really drop library ${schema}.${objectname}?
               </Confirm>
               <Result>
                  Library ${schema}.${objectname} has been dropped!
               </Result>
            </Action>

            <Action id="vertica-library-changelibrary" label="Set Library Filename" reload="true">
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Library Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Old Library Filename" style="text" editable="false">
                  <Default>${filename}</Default>
               </Input>
               <Input label="New Library Filename" name="newFilename" style="text" tip="Full file path on the DB server"/>

               <Command exectype="asis">
                  <SQL>
                     <![CDATA[ALTER LIBRARY "${schema}"."${objectname}" AS '${newFilename}']]>
                  </SQL>
               </Command>
               <Confirm>
                  Really replace library filename for ${schema}.${objectname}?
               </Confirm>
               <Result>
                  File name for library ${schema}.${objectname} changed!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="UDXAggregates">
         <Action id="vertica-udxaggregates-create" label="Create Aggregate Function" reload="true" icon="add">
           <Message type="info">Note that the chosen language may not be supported by your Vertica version</Message>
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Aggregate Function Name" name="functionName" style="text"/>
            <Input label="Language" name="language" style="radio">
               <Values>C++|R|Java</Values>
               <Default>C++</Default>
            </Input>
            <Input label="Library" name="libraryName" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
SELECT	lib_name
FROM		v_monitor.user_libraries
WHERE    schema_name = '${schema}'
ORDER BY lib_name
                 ]]>
                     </SQL>
                  </Command>
               </Values>
               <Default>{0}</Default>
            </Input>

            <Input label="Factory Function" name="factoryFunction" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
SELECT	obj_name
FROM		v_monitor.user_library_manifest
WHERE    lib_name = '${libraryName}'
ORDER BY obj_name
                 ]]>
                     </SQL>
                  </Command>
               </Values>
               <Default>{0}</Default>
            </Input>

            <Command exectype="asis">
               <SQL>
                  <![CDATA[
CREATE AGGREGATE FUNCTION "${schema}".${QB}${functionName}${QE}
AS LANGUAGE '${language}' NAME '${factoryFunction}' LIBRARY ${libraryName}
]]>
               </SQL>
            </Command>
            <Confirm>
               Create aggregate function ${schema}.${functionName}?
            </Confirm>
            <Result>
               Aggregate function ${schema}.${functionName} created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="UDXAggregate">
         <Action id="vertica-udxaggregate-drop" label="Drop Aggregate Function" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Aggregate Function Name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Arguments" style="text" editable="false">
               <Default>${arguments}</Default>
            </Input>

            <Command>
               <SQL>
                  <![CDATA[
DROP AGGREGATE FUNCTION "${schema}"."${objectname}"(${arguments})
]]>
               </SQL>
            </Command>
            <Confirm>
               Really drop aggregate function ${schema}.${objectname}?
            </Confirm>
            <Result>
               Aggregate function ${schema}.${objectname} has been dropped!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="UDXAnalytics">
         <Action id="vertica-udxanalytics-create" label="Create Analytic Function" reload="true" icon="add">
            <Message type="info">Note that the chosen language may not be supported by your Vertica version</Message>
            
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Analytic Function Name" name="functionName" style="text"/>
            <Input label="Language" name="language" style="radio">
               <Values>C++|R|Java</Values>
               <Default>C++</Default>
            </Input>
            <Input label="Library" name="libraryName" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
SELECT	lib_name
FROM		v_monitor.user_libraries
WHERE    schema_name = '${schema}'
ORDER BY lib_name
                 ]]>
                     </SQL>
                  </Command>
               </Values>
               <Default>{0}</Default>
            </Input>

            <Input label="Factory Function" name="factoryFunction" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
SELECT	obj_name
FROM		v_monitor.user_library_manifest
WHERE    lib_name = '${libraryName}'
ORDER BY obj_name
                 ]]>
                     </SQL>
                  </Command>
               </Values>
               <Default>{0}</Default>
            </Input>
            <Input label="Not Fenced" name="fenced" style="check">
               <Values>NOT FENCED</Values>
            </Input>

            <Command exectype="asis">
               <SQL>
                  <![CDATA[
CREATE ANALYTIC FUNCTION ${schema}.${QB}${functionName}${QE}
AS LANGUAGE '${language}' NAME '${factoryFunction}' LIBRARY ${libraryName} ${fenced}
]]>
               </SQL>
            </Command>
            <Confirm>
               Create analytic function ${schema}.${functionName}?
            </Confirm>
            <Result>
               Analytic function ${schema}.${functionName} created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="UDXAnalytic">
         <!--Don't seem to be any DROP for Analytic functions-->
      </ActionGroup>

      <ActionGroup type="UDXFilters">
         <If test="#SUPERUSER">
            <Action id="vertica-udxfilters-create" label="Create Filter Function" reload="true" icon="add">
               <Message type="info">Note that the chosen language may not be supported by your Vertica version</Message>
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Filter Function Name" name="functionName" style="text"/>
               <Input label="Language" name="language" style="radio">
                  <Values>C++|R|Java</Values>
                  <Default>C++</Default>
               </Input>
               <Input label="Library" name="libraryName" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
SELECT	lib_name
FROM		v_monitor.user_libraries
WHERE    schema_name = '${schema}'
ORDER BY lib_name
                 ]]>
                        </SQL>
                     </Command>
                  </Values>
                  <Default>{0}</Default>
               </Input>

               <Input label="Factory Function" name="factoryFunction" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
SELECT	obj_name
FROM		v_monitor.user_library_manifest
WHERE    lib_name = '${libraryName}'
ORDER BY obj_name
                 ]]>
                        </SQL>
                     </Command>
                  </Values>
                  <Default>{0}</Default>
               </Input>
               <Input label="Not Fenced" name="fenced" style="check">
                  <Values>NOT FENCED</Values>
               </Input>

               <Command exectype="asis">
                  <SQL>
                     <![CDATA[
CREATE FILTER ${schema}.${QB}${functionName}${QE}
AS LANGUAGE '${language}' NAME '${factoryFunction}' LIBRARY ${libraryName} ${fenced}
]]>
                  </SQL>
               </Command>
               <Confirm>
                  Create filter function ${schema}.${functionName}?
               </Confirm>
               <Result>
                  Filter function ${schema}.${functionName} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="UDXFilter">
         <If test="#SUPERUSER">
            <Action id="vertica-udxfilter-drop" label="Drop Filter Function" reload="true" icon="remove">
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Filter Function Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>

               <Command>
                  <SQL>
                     <![CDATA[
DROP FILTER "${schema}"."${objectname}"()
]]>
                  </SQL>
               </Command>
               <Confirm>
                  Really drop filter function ${schema}.${objectname}?
               </Confirm>
               <Result>
                  Filter function ${schema}.${objectname} has been dropped!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="UDXFunctions">
         <Action id="vertica-udxfunctions-create" label="Create Function (UDF)" reload="true" icon="add">
            <Message type="info">Note that the chosen language may not be supported by your Vertica version</Message>
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function Name" name="functionName" style="text"/>
            <Input label="Language" name="language" style="radio">
               <Values>C++|R|Java</Values>
               <Default>C++</Default>
            </Input>
            <Input label="Library" name="libraryName" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
SELECT	lib_name
FROM		v_monitor.user_libraries
WHERE    schema_name = '${schema}'
ORDER BY lib_name
                 ]]>
                     </SQL>
                  </Command>
               </Values>
               <Default>{0}</Default>
            </Input>

            <Input label="Factory Function" name="factoryFunction" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
SELECT	obj_name
FROM		v_monitor.user_library_manifest
WHERE    lib_name = '${libraryName}'
ORDER BY obj_name
                 ]]>
                     </SQL>
                  </Command>
               </Values>
               <Default>{0}</Default>
            </Input>
            <Input label="Not Fenced" name="fenced" style="check">
               <Values>NOT FENCED</Values>
            </Input>

            <Command exectype="asis">
               <SQL>
                  <![CDATA[
CREATE FUNCTION ${schema}.${QB}${functionName}${QE}
AS LANGUAGE '${language}' NAME '${factoryFunction}' LIBRARY ${libraryName} ${fenced}
]]>
               </SQL>
            </Command>
            <Confirm>
               Create function ${schema}.${functionName}?
            </Confirm>
            <Result>
               Function ${schema}.${functionName} created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="UDXFunction">
         <Action id="vertica-udxfunction-drop" label="Drop Function (UDF)" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Function Name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Arguments" style="text" editable="false">
               <Default>${arguments}</Default>
            </Input>

            <Command>
               <SQL>
                  <![CDATA[
DROP AGGREGATE FUNCTION "${schema}"."${objectname}"(${arguments})
]]>
               </SQL>
            </Command>
            <Confirm>
               Really drop function ${schema}.${objectname}?
            </Confirm>
            <Result>
               Function ${schema}.${objectname} has been dropped!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="UDXParsers">
         <If test="#SUPERUSER">
         
            <Action id="vertica-udxparser-create" label="Create Parser Function" reload="true" icon="add">
               <Message type="info">Note that the chosen language may not be supported by your Vertica version</Message>
               
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Parser Function Name" name="functionName" style="text"/>
               <Input label="Language" name="language" style="radio">
                  <Values>C++|R|Java</Values>
                  <Default>C++</Default>
               </Input>
               <Input label="Library" name="libraryName" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
SELECT	lib_name
FROM		v_monitor.user_libraries
WHERE    schema_name = '${schema}'
ORDER BY lib_name
                 ]]>
                        </SQL>
                     </Command>
                  </Values>
                  <Default>{0}</Default>
               </Input>

               <Input label="Factory Function" name="factoryFunction" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
SELECT	obj_name
FROM		v_monitor.user_library_manifest
WHERE    lib_name = '${libraryName}'
ORDER BY obj_name
                 ]]>
                        </SQL>
                     </Command>
                  </Values>
                  <Default>{0}</Default>
               </Input>
               <Input label="Not Fenced" name="fenced" style="check">
                  <Values>NOT FENCED</Values>
               </Input>

               <Command exectype="asis">
                  <SQL>
                     <![CDATA[
CREATE PARSER "${schema}".${QB}${functionName}${QE}
AS LANGUAGE '${language}' NAME '${factoryFunction}' LIBRARY ${libraryName} ${fenced}
]]>
                  </SQL>
               </Command>
               <Confirm>
                  Create parser function ${schema}.${functionName}?
               </Confirm>
               <Result>
                  Parser function ${schema}.${functionName} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="UDXParser">
         <If test="#SUPERUSER">
            <Action id="vertica-udxparser-drop" label="Drop Parser Function" reload="true" icon="remove">
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Parser Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>

               <Command>
                  <SQL>
                     <![CDATA[
DROP PARSER "${schema}"."${objectname}"()
]]>
                  </SQL>
               </Command>
               <Confirm>
                  Really drop parser function ${schema}.${objectname}?
               </Confirm>
               <Result>
                  Parser function ${schema}.${objectname} has been dropped!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="UDXSources">
         <If test="#SUPERUSER">
            <Action id="vertica-udxsources-create" label="Create Source Function" reload="true" icon="add">
               <Message type="info">Note that the chosen language may not be supported by your Vertica version</Message>
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Source Function Name" name="functionName" style="text"/>
               <Input label="Language" name="language" style="radio">
                  <Values>C++|R|Java</Values>
                  <Default>C++</Default>
               </Input>
               <Input label="Library" name="libraryName" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
SELECT	lib_name
FROM		v_monitor.user_libraries
WHERE    schema_name = '${schema}'
ORDER BY lib_name
                 ]]>
                        </SQL>
                     </Command>
                  </Values>
                  <Default>{0}</Default>
               </Input>

               <Input label="Factory Function" name="factoryFunction" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[
SELECT	obj_name
FROM		v_monitor.user_library_manifest
WHERE    lib_name = '${libraryName}'
ORDER BY obj_name
                 ]]>
                        </SQL>
                     </Command>
                  </Values>
                  <Default>{0}</Default>
               </Input>
               <Input label="Not Fenced" name="fenced" style="check">
                  <Values>NOT FENCED</Values>
               </Input>

               <Command exectype="asis">
                  <SQL>
                     <![CDATA[
CREATE SOURCE "${schema}".${QB}${functionName}${QE}
AS LANGUAGE '${language}' NAME '${factoryFunction}' LIBRARY ${libraryName} ${fenced}
]]>
                  </SQL>
               </Command>
               <Confirm>
                  Create source function ${schema}.${functionName}?
               </Confirm>
               <Result>
                  Source function ${schema}.${functionName} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="UDXSource">
         <If test="#SUPERUSER">
            <Action id="vertica-udxsource-drop" label="Drop Source Function" reload="true" icon="remove">
               <Input label="Schema" style="text" editable="false">
                  <Default>${schema}</Default>
               </Input>
               <Input label="Source Function Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>

               <Command>
                  <SQL>
                     <![CDATA[
DROP PARSER "${schema}"."${objectname}"()
]]>
                  </SQL>
               </Command>
               <Confirm>
                  Really drop source function ${schema}.${objectname}?
               </Confirm>
               <Result>
                  Source function ${schema}.${objectname} has been dropped!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="UDXTransforms">
         <Action id="vertica-udxtransforms-create" label="Create Transform Function" reload="true" icon="add">
            <Message type="info">Note that the chosen language may not be supported by your Vertica version</Message>
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Transform Function Name" name="functionName" style="text"/>
            <Input label="Language" name="language" style="radio">
                <Values>C++|R|Java</Values>
               <Default>C++</Default>
            </Input>
            <Input label="Library" name="libraryName" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
SELECT	lib_name
FROM		v_monitor.user_libraries
WHERE    schema_name = '${schema}'
ORDER BY lib_name
                 ]]>
                     </SQL>
                  </Command>
               </Values>
               <Default>{0}</Default>
            </Input>

            <Input label="Factory Function" name="factoryFunction" style="list">
               <Values>
                  <Command>
                     <SQL>
                        <![CDATA[
SELECT	obj_name
FROM		v_monitor.user_library_manifest
WHERE    lib_name = '${libraryName}'
ORDER BY obj_name
                 ]]>
                     </SQL>
                  </Command>
               </Values>
               <Default>{0}</Default>
            </Input>
            <Input label="Not Fenced" name="fenced" style="check">
               <Values>NOT FENCED</Values>
            </Input>

            <Command exectype="asis">
               <SQL>
                  <![CDATA[
CREATE TRANSFORM FUNCTION "${schema}".${QB}${functionName}${QE}
AS LANGUAGE '${language}' NAME '${factoryFunction}' LIBRARY ${libraryName} ${fenced}
]]>
               </SQL>
            </Command>
            <Confirm>
               Create transform function ${schema}.${functionName}?
            </Confirm>
            <Result>
               Transform function ${schema}.${functionName} created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="UDXTransform">
         <Action id="vertica-udxtransform-drop" label="Drop Transform Function" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Transform Function Name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Arguments" style="text" editable="false">
               <Default>${arguments}</Default>
            </Input>

            <Command>
               <SQL>
                  <![CDATA[
DROP TRANSFORM FUNCTION "${schema}"."${objectname}"(${arguments})
]]>
               </SQL>
            </Command>
            <Confirm>
               Really drop transform function ${schema}.${objectname}?
            </Confirm>
            <Result>
               Transform function ${schema}.${objectname} has been dropped!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Procedures">
         <Action id="vertica-procedures-create" label="Create Procedure" reload="true" icon="add">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Procedure Name" name="procedureName" style="text"/>

            <Input label="Executable" name="executable" style="text"/>
            <Input label="Language" name="language" style="radio">
               <Values>External</Values>
               <Default>External</Default>
            </Input>
            <Input label="OS User" name="osuser" style="text"/>

            <Input label="Arguments" style="separator"/>

            <Input name="parameters" style="grid">
               <Arg name="output" value="${QB}${name}${QE} ${type}"/>
               <Arg name="newline" value=", "/>

               <Input name="name" label="Name" style="text">
                  <Default>parm</Default>
               </Input>
               <Input name="type" label="Type" style="text">
                  <Default>VARCHAR</Default>
               </Input>
            </Input>

            <SetVar name="_parameters" value='#parameters.trim().equals("") ? "()" : "(" + #parameters + ")"'/>

            <Command exectype="asis">
               <SQL>
                  <![CDATA[
CREATE PROCEDURE "${schema}".${QB}${procedureName}${QE} ${_parameters}
AS '${executable}'
LANGUAGE '${language}'
USER '${osuser}'
                  ]]>
               </SQL>
            </Command>
            <Confirm>
               Create procedure ${procedureName}?
            </Confirm>
            <Result>
               Procedure ${procedureName} created!
            </Result>
         </Action>
      </ActionGroup>

      <ActionGroup type="Procedure">
         <Action id="vertica-procedure-drop" label="Drop Procedure" reload="true" icon="remove">
            <Input label="Schema" style="text" editable="false">
               <Default>${schema}</Default>
            </Input>
            <Input label="Procedure Name" style="text" editable="false">
               <Default>${objectname}</Default>
            </Input>
            <Input label="Arguments" style="text" editable="false">
               <Default>${arguments}</Default>
            </Input>

            <Command><SQL><![CDATA[drop procedure "${schema}"."${objectname}"(${arguments})]]></SQL></Command>
            <Confirm>
               Really drop procedure ${schema}.${objectname}?
            </Confirm>
            <Result>
               Procedure ${schema}.${objectname} has been dropped!
            </Result>
         </Action>
      </ActionGroup>

      <!-- =================================================================== -->
      <!-- DBA object actions                                                  -->
      <!-- =================================================================== -->

      <ActionGroup type="Database">
         <Action id="vertica-system-refreshprojections" label="Refresh Projections">
            <Command>
               <SQL><![CDATA[SELECT start_refresh()]]></SQL>
            </Command>
            <Confirm>
               Really refresh projections that are not able to participate in query execution due to missing or out-of-date data?
            </Confirm>
            <Result>
               Projections has been refreshed!
            </Result>
         </Action>

         <Action id="vertica-system-analyzestats" label="Analyze Stats for Database">
            <Command>
               <SQL><![CDATA[SELECT analyze_statistics('')]]></SQL>
            </Command>
            <Confirm>
               Really Analyze Statistics on Entire Database?
            </Confirm>
         </Action>

         <If test="#SUPERUSER">
            <Action id="vertica-system-analyzeworkload" label="Analyze Workload For Database">
               <Command>
                  <SQL><![CDATA[SELECT analyze_workload('')]]></SQL>
               </Command>
               <Confirm>
                  Really Analyze Workload on Entire Database?
               </Confirm>
            </Action>
         </If>

         <If test="#SUPERUSER">
            <Action id="vertica-system-exportstats" label="Export Statistics">
               <Input label="File Path" name="filepath" style="text"/>
               <Command>
                  <SQL><![CDATA[SELECT export_statistics('${filepath}')]]></SQL>
               </Command>
               <Confirm>
                  Really Export Statistics to ${filepath}?
               </Confirm>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Users">
         <If test="#SUPERUSER">
            <Action id="vertica-users-add" label="Create User" reload="true" icon="add">
               <Input label="User Name" name="username" style="text"/>
               <Input label="Locked" name="locked" style="check">
                  <Values>LOCK</Values>
               </Input>
               <Input label="Password" name="password" style="password" linebreak="false"/>
               <Input label="Expired" name="expired" style="check" linebreak="true">
                  <Values>PASSWORD EXPIRE</Values>
               </Input>
               <Input label="Profile" name="profile" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[select profile_name from profiles order by 1]]></SQL>
                     </Command>
                  </Values>
               </Input>
               <Input label="Resource Pool" name="pool" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[select name from resource_pools order by 1]]></SQL>
                     </Command>
                  </Values>
                  <Default>general</Default>
               </Input>

               <!--Memory Cap-->
               <Input label="Memory Cap" name="memcap" style="radio" linebreak="false">
                  <Values>NONE|VALUE</Values>
                  <Labels>Unlimited|Value</Labels>
                  <Default>NONE</Default>
               </Input>
               <Input label="Value" name="memcapvalue" style="text" linebreak="false"
                       tip="Limits the amount of memory that the user's requests can use. This value is a number representing the amount of space, followed by a unit">
               </Input>
               <Input name="memcapunit" style="list" linebreak="true">
                  <Values>K|M|G|T|%</Values>
                  <Labels>KB|MB|GB|TB|%</Labels>
                  <Default>K</Default>
               </Input>

               <!--Temp Space Cap-->
               <Input label="Temp Space Cap" name="tempspacecap" style="radio" linebreak="false">
                  <Values>NONE|VALUE</Values>
                  <Labels>Unlimited|Value</Labels>
                  <Default>NONE</Default>
               </Input>
               <Input label="Value" name="tempspacecapvalue" style="text" linebreak="false"
                       tip="Limits the amount of temporary file storage the user's requests can use. This parameter's value has the same format as the Memory Cap value">
               </Input>
               <Input name="tempspacecapunit" style="list" linebreak="true">
                  <Values>K|M|G|T|%</Values>
                  <Labels>KB|MB|GB|TB|%</Labels>
                  <Default>K</Default>
               </Input>

               <!--Runtime Cap-->
               <Input label="Runtime Cap" name="runtimecap" style="radio" linebreak="false">
                  <Values>NONE|VALUE</Values>
                  <Labels>Unlimited|Value</Labels>
                  <Default>NONE</Default>
               </Input>
               <Input label="Value" name="runtimecapvalue" style="text" linebreak="true"
                       tip="Sets the maximum amount of time any of the user's queries can execute. Value is an interval, such as '1 minute', '100 seconds' or hours:minutes">
               </Input>

               <SetVar name="_memcap" value='#memcap.equals("NONE") ? "NONE" : "&#39;" + #memcapvalue + #memcapunit + "&#39;"'/>
               <SetVar name="_tempspacecap" value='#tempspacecap.equals("NONE") ? "NONE" : "&#39;" + #tempspacecapvalue + #tempspacecapunit + "&#39;"'/>
               <SetVar name="_runtimecap" value='#runtimecap.equals("NONE") ? "NONE" : "&#39;" + #runtimecapvalue + "&#39;"'/>

               <SetVar name="_locked" value='#locked.equals("") ? "UNLOCK" : #locked'/>
               <SetVar name="_password" value='#password.equals("") ? "" : " IDENTIFIED BY \"" +#password + "\""'/>
               <SetVar name="_expired" value='#expired.equals("") ? "" : #expired'/>

               <Command>
                  <SQL>
                     <![CDATA[
CREATE USER ${QB}${username}${QE}
ACCOUNT ${_locked} ${_expired}
IDENTIFIED BY '${password}'
PROFILE ${profile}
RESOURCE POOL ${pool}
MEMORYCAP ${_memcap}
TEMPSPACECAP ${_tempspacecap}
RUNTIMECAP ${_runtimecap}
                     ]]>
                  </SQL>
               </Command>
               <Result>
                  User ${username} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="User">
         <Action id="vertica-user-changepassword" label="Change Password">
            <Input label="User Name" style="text" editable="false">
               <Default>
                  ${objectname}
               </Default>
            </Input>
            <Input label="Current Password" name="oldpassword" style="password"/>
            <Input label="New Password" name="newpassword" style="password"/>
            <Command>
               <SQL>
                  <![CDATA[
ALTER USER "${objectname}"
IDENTIFIED BY '${newpassword}' REPLACE '${oldpassword}'
                     ]]>
               </SQL>
            </Command>
            <Confirm>
               Really change password for user ${objectname}?
            </Confirm>
            <Result>
               Password for ${objectname} changed!
            </Result>
         </Action>

         <If test="#SUPERUSER">
            <Action id="vertica-user-alter" label="Alter User" reload="true" icon="add">
               <Input label="User Name" style="text" editable="false">
                  <Default>
                     ${objectname}
                  </Default>
               </Input>

               <Input style="label" linebreak="false"/>
               <Input label="Locked" name="locked" style="check">
                  <Default>${deflocked}</Default>
               </Input>
               <Input label="Password Expired" name="expired" style="check" linebreak="true">
                  <Values>PASSWORD EXPIRE</Values>
               </Input>
               <Input label="Profile" name="profile" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[select profile_name from profiles order by 1]]></SQL>
                     </Command>
                  </Values>
                  <Default>${defprofile}</Default>
               </Input>
               <Input label="Resource Pool" name="pool" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[select name from resource_pools order by 1]]></SQL>
                     </Command>
                  </Values>
                  <Default>${defpool}</Default>
               </Input>

               <!--Memory Cap-->
               <SetVar name="_defmemcap"
                       value='#defmemcap.equals("unlimited") ? "NONE" : "VALUE"'
                       action="runwheninit"/>
               <Input label="Memory Cap" name="memcap" style="radio" linebreak="false">
                  <Values>NONE|VALUE</Values>
                  <Labels>Unlimited|Value</Labels>
                  <Default>${_defmemcap}</Default>
               </Input>
               <SetVar name="_defmemcapvalue"
                       value='#defmemcap.equals("unlimited") ? "" : #defmemcap'
                       action="runwheninit"/>
               <Input label="Value" name="memcapvalue" style="text" linebreak="false"
                       tip="Limits the amount of memory that the user's requests can use. This value is a number representing the amount of space, followed by a unit">
                  <Default>${_defmemcapvalue}</Default>
               </Input>
               <Input label="" name="memcapunit" style="list" linebreak="true">
                  <Values>K|M|G|T|%</Values>
                  <Labels>KB|MB|GB|TB|%</Labels>
                  <Default>K</Default>
               </Input>

               <!--Temp Space Cap-->
               <SetVar name="_deftempspacecap"
                       value='#deftempspacecap.equals("unlimited") ? "NONE" : "VALUE"'
                       action="runwheninit"/>
               <Input label="Temp Space Cap" name="tempspacecap" style="radio" linebreak="false">
                  <Values>NONE|VALUE</Values>
                  <Labels>Unlimited|Value</Labels>
                  <Default>${_deftempspacecap}</Default>
               </Input>
               <SetVar name="_deftempspacecapvalue"
                       value='#deftempspacecap.equals("unlimited") ? "" : #deftempspacecap'
                       action="runwheninit"/>
               <Input label="Value" name="tempspacecapvalue" style="text" linebreak="false"
                       tip="Limits the amount of temporary file storage the user's requests can use. This parameter's value has the same format as the Memory Cap value">
                  <Default>${_deftempspacecapvalue}</Default>
               </Input>
               <Input label="" name="tempspacecapunit" style="list" linebreak="true">
                  <Values>K|M|G|T|%</Values>
                  <Labels>KB|MB|GB|TB|%</Labels>
                  <Default>K</Default>
               </Input>

               <!--Runtime Cap-->
               <SetVar name="_defruntimecap"
                       value='#defruntimecap.equals("unlimited") ? "NONE" : "VALUE"'
                       action="runwheninit"/>
               <Input label="Runtime Cap" name="runtimecap" style="radio" linebreak="false">
                  <Values>NONE|VALUE</Values>
                  <Labels>Unlimited|Value</Labels>
                  <Default>${_defruntimecap}</Default>
               </Input>
               <SetVar name="_defruntimecapvalue"
                       value='#defruntimecap.equals("unlimited") ? "" : #defruntimecap'
                       action="runwheninit"/>
               <Input label="Value" name="runtimecapvalue" style="text" linebreak="true"
                       tip="Sets the maximum amount of time any of the user's queries can execute. Value is an interval, such as '1 minute', '100 seconds' or hours:minutes">
                  <Default>${_defruntimecapvalue}</Default>
               </Input>

               <SetVar name="_memcap" value='#memcap.equals("NONE") ? "NONE" : "&#39;" + #memcapvalue + #memcapunit + "&#39;"'/>
               <SetVar name="_tempspacecap" value='#tempspacecap.equals("NONE") ? "NONE" : "&#39;" + #tempspacecapvalue + #tempspacecapunit + "&#39;"'/>
               <SetVar name="_runtimecap" value='#runtimecap.equals("NONE") ? "NONE" : "&#39;" + #runtimecapvalue + "&#39;"'/>

               <SetVar name="_locked" value='#locked ? "UNLOCK" : "LOCK"'/>
               <SetVar name="_expired" value='#expired.equals("") ? "" : #expired'/>

               <Command>
                  <SQL>
                     <![CDATA[
ALTER USER "${objectname}"
ACCOUNT ${_locked} ${_expired}
PROFILE ${profile}
RESOURCE POOL ${pool}
MEMORYCAP ${_memcap}
TEMPSPACECAP ${_tempspacecap}
RUNTIMECAP ${_runtimecap}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Really modify user ${objectname}?
               </Confirm>
               <Result>
                  User ${objectname} modified!
               </Result>
            </Action>
         </If>

         <If test="#SUPERUSER">
            <Action id="vertica-user-drop" label="Drop User" reload="true" icon="remove">
               <Input label="User Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Cascade" name="cascade" style="check"
                      tip="Drops all user-defined objects created by the user dropped, including schema, table and all views that reference the table, and the table's associated projections">
                  <Values>cascade</Values>
               </Input>
               <Command>
                  <SQL><![CDATA[drop user "${objectname}" ${cascade}]]></SQL>
               </Command>
               <Confirm><![CDATA[Really drop user ${objectname}?]]></Confirm>
               <Result>
                  User ${objectname} dropped!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Roles">
         <If test="#SUPERUSER">
            <Action id="vertica-roles-add" label="Create Role" reload="true" icon="add">
               <Input label="Role Name" name="rolename" style="text"/>
               <Command>
                  <SQL><![CDATA[CREATE ROLE ${QB}${rolename}${QE}]]></SQL>
               </Command>
               <Result>
                  Role ${rolename} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Role">
         <If test="#SUPERUSER">
            <Action id="vertica-role-rename" label="Rename Role" reload="true" icon="rename">
               <Input label="Role" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="New Role Name" name="newRole" style="text"/>
               <Command>
                  <SQL><![CDATA[alter role "${objectname}" rename to ${QB}${newRole}${QE}]]></SQL>
               </Command>
               <Confirm>
                  Confirm rename of role ${objectname} to ${newRole}?
               </Confirm>
               <Result>
                  Role ${objectname} renamed to ${newRole}!
               </Result>
            </Action>

            <Action id="vertica-role-drop" label="Drop Role" reload="true" icon="remove">
               <Input label="Role" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Cascade" name="cascade" style="check"
                      tip="Revoke the role from users and other roles before dropping the role">
                  <Values>cascade</Values>
               </Input>
               <Command>
                  <SQL><![CDATA[drop role "${objectname}" ${cascade}]]></SQL>
               </Command>
               <Confirm>
                  Confirm drop of role ${objectname}?
               </Confirm>
               <Result>
                  Role ${objectname} dropped!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Profiles">
         <If test="#SUPERUSER">
            <Action id="vertica-profiles-add" label="Create Profile" reload="true" icon="add">
               <Input label="Profile Name" name="profilename" style="text"/>

               <Input label="Password Life Time" name="pwLifeTime" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwLifeTimeValue" style="number" linebreak="true"/>

               <Input label="Password Grace Time" name="pwGraceTime" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwGraceTimeValue" style="number" linebreak="true"/>

               <Input label="Failed Login Attempts" name="failedLoginAttempts" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="failedLoginAttemptsValue" style="number" linebreak="true"/>

               <Input label="Password Lock Time" name="pwLockTime" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwLockTimeValue" style="number" linebreak="true"/>

               <Input label="Password Reuse Max" name="pwReuseMax" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwReuseMaxValue" style="number" linebreak="true"/>

               <Input label="Password Reuse Time" name="pwReuseTime" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwReuseTimeValue" style="number" linebreak="true"/>

               <Input label="Password Max Length" name="pwMaxLength" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwMaxLengthValue" style="number" linebreak="true"/>

               <Input label="Password Min Length" name="pwMinLength" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwMinLengthValue" style="number" linebreak="true"/>

               <Input label="Password Min Letters" name="pwMinLetters" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwMinLettersValue" style="number" linebreak="true"/>

               <Input label="Password Min Uppercase Letters" name="pwMinUppercaseLetters" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwMinUppercaseLettersValue" style="number" linebreak="true"/>

               <Input label="Password Min Lowercase Letters" name="pwMinLowercaseLetters" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwMinLowercaseLettersValue" style="number" linebreak="true"/>

               <Input label="Password Min Digits" name="pwMinDigits" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>DEFAULT</Default>
               </Input>
               <Input name="pwMinDigitsValue" style="number" linebreak="true"/>

               <Input label="Password Min Symbols" name="pwMinSymbols" style="radio" linebreak="false">
                  <Values>DEFAULT|UNLIMITED|VALUE</Values>
                  <Default>${pwMinSymbols}</Default>
               </Input>
               <Input name="pwMinSymbolsValue" style="number" linebreak="true"/>

               <SetVar name="_pwLifeTime"            value='#pwLifeTime.equals("VALUE") ?            #pwLifeTimeValue : #pwLifeTime'/>
               <SetVar name="_pwGraceTime"           value='#pwGraceTime.equals("VALUE") ?           #pwGraceTimeValue : #pwGraceTime'/>
               <SetVar name="_failedLoginAttempts"   value='#failedLoginAttempts.equals("VALUE") ?   #failedLoginAttemptsValue : #failedLoginAttempts'/>
               <SetVar name="_pwLockTime"            value='#pwLockTime.equals("VALUE") ?            #pwLockTimeValue : #pwLockTime'/>
               <SetVar name="_pwReuseMax"            value='#pwReuseMax.equals("VALUE") ?            #pwReuseMaxValue : #pwReuseMax'/>
               <SetVar name="_pwReuseTime"           value='#pwReuseTime.equals("VALUE") ?           #pwReuseTimeValue : #pwReuseTime'/>
               <SetVar name="_pwMaxLength"           value='#pwMaxLength.equals("VALUE") ?           #pwMaxLengthValue : #pwMaxLength'/>
               <SetVar name="_pwMinLength"           value='#pwMinLength.equals("VALUE") ?           #pwMinLengthValue : #pwMinLength'/>
               <SetVar name="_pwMinLetters"          value='#pwMinLetters.equals("VALUE") ?          #pwMinLettersValue : #pwMinLetters'/>
               <SetVar name="_pwMinUppercaseLetters" value='#pwMinUppercaseLetters.equals("VALUE") ? #pwMinUppercaseLettersValue : #pwMinUppercaseLetters'/>
               <SetVar name="_pwMinLowercaseLetters" value='#pwMinLowercaseLetters.equals("VALUE") ? #pwMinLowercaseLettersValue : #pwMinLowercaseLetters'/>
               <SetVar name="_pwMinDigits"           value='#pwMinDigits.equals("VALUE") ?           #pwMinDigitsValue : #pwMinDigits'/>
               <SetVar name="_pwMinSymbols"          value='#pwMinSymbols.equals("VALUE") ?           #pwMinSymbolsValue : #pwMinSymbols'/>

               <Command>
                  <SQL>
                     <![CDATA[
CREATE PROFILE ${QB}${profilename}${QE} LIMIT
PASSWORD_LIFE_TIME ${_pwLifeTime}
PASSWORD_GRACE_TIME ${_pwGraceTime}
FAILED_LOGIN_ATTEMPTS ${_failedLoginAttempts}
PASSWORD_LOCK_TIME ${_pwLockTime}
PASSWORD_REUSE_MAX ${_pwReuseMax}
PASSWORD_REUSE_TIME ${_pwReuseTime}
PASSWORD_MAX_LENGTH ${_pwMaxLength}
PASSWORD_MIN_LENGTH ${_pwMinLength}
PASSWORD_MIN_LETTERS ${_pwMinLetters}
PASSWORD_MIN_UPPERCASE_LETTERS ${_pwMinUppercaseLetters}
PASSWORD_MIN_LOWERCASE_LETTERS ${_pwMinLowercaseLetters}
PASSWORD_MIN_DIGITS ${_pwMinDigits}
PASSWORD_MIN_SYMBOLS ${_pwMinSymbols}
                     ]]>
                  </SQL>
               </Command>
               <Result>
                  Profile ${profilename} created!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Profile">
         <If test="#SUPERUSER">
            <Action id="vertica-profile-alter" label="Alter Profile" reload="true">
               <Input label="Profile Name" name="profilename" style="text">
                  <Default>${objectname}</Default>
               </Input>

               <SetVar name="_pwLifeTimeValue"
                       value='#_pwLifeTime.equals("default") or #_pwLifeTime.equals("unlimited") ? "0" : #_pwLifeTime'
                       action="runwheninit"/>
               <SetVar name="_pwLifeTime"
                       value='#_pwLifeTime.equals("default") or #_pwLifeTime.equals("unlimited") ? #_pwLifeTime : "value"'
                       action="runwheninit"/>
               <Input label="Password Life Time" name="pwLifeTime" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwLifeTime}</Default>
               </Input>
               <Input name="pwLifeTimeValue" style="number" linebreak="true">
                  <Default>${_pwLifeTimeValue}</Default>
               </Input>

               <SetVar name="_pwGraceTimeValue"
                       value='#_pwGraceTime.equals("default") or #_pwGraceTime.equals("unlimited") ? "0" : #_pwGraceTime'
                       action="runwheninit"/>
               <SetVar name="_pwGraceTime"
                       value='#_pwGraceTime.equals("default") or #_pwGraceTime.equals("unlimited") ? #_pwGraceTime : "value"'
                       action="runwheninit"/>
               <Input label="Password Grace Time" name="pwGraceTime" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwGraceTime}</Default>
               </Input>
               <Input name="pwGraceTimeValue" style="number" linebreak="true">
                  <Default>${_pwGraceTimeValue}</Default>
               </Input>

               <SetVar name="_failedLoginAttemptsValue"
                       value='#_failedLoginAttempts.equals("default") or #_failedLoginAttempts.equals("unlimited") ? "0" : #_failedLoginAttempts'
                       action="runwheninit"/>
               <SetVar name="_failedLoginAttempts"
                       value='#_failedLoginAttempts.equals("default") or #_failedLoginAttempts.equals("unlimited") ? #_failedLoginAttempts : "value"'
                       action="runwheninit"/>
               <Input label="Failed Login Attempts" name="failedLoginAttempts" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_failedLoginAttempts}</Default>
               </Input>
               <Input name="failedLoginAttemptsValue" style="number" linebreak="true">
                  <Default>${_failedLoginAttemptsValue}</Default>
               </Input>

               <SetVar name="_pwLockTimeValue"
                       value='#_pwLockTime.equals("default") or #_pwLockTime.equals("unlimited") ? "0" : #_pwLockTime'
                       action="runwheninit"/>
               <SetVar name="_pwLockTime"
                       value='#_pwLockTime.equals("default") or #_pwLockTime.equals("unlimited") ? #_pwLockTime : "value"'
                       action="runwheninit"/>
               <Input label="Password Lock Time" name="pwLockTime" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwLockTime}</Default>
               </Input>
               <Input name="pwLockTimeValue" style="number" linebreak="true">
                  <Default>${_pwLockTimeValue}</Default>
               </Input>

               <SetVar name="_pwReuseMaxValue"
                       value='#_pwReuseMax.equals("default") or #_pwReuseMax.equals("unlimited") ? "0" : #_pwReuseMax'
                       action="runwheninit"/>
               <SetVar name="_pwReuseMax"
                       value='#_pwReuseMax.equals("default") or #_pwReuseMax.equals("unlimited") ? #_pwReuseMax : "value"'
                       action="runwheninit"/>
               <Input label="Password Reuse Max" name="pwReuseMax" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwReuseMax}</Default>
               </Input>
               <Input name="pwReuseMaxValue" style="number" linebreak="true">
                  <Default>${_pwReuseMaxValue}</Default>
               </Input>

               <SetVar name="_pwReuseTimeValue"
                       value='#_pwReuseTime.equals("default") or #_pwReuseTime.equals("unlimited") ? "0" : #_pwReuseTime'
                       action="runwheninit"/>
               <SetVar name="_pwReuseTime"
                       value='#_pwReuseTime.equals("default") or #_pwReuseTime.equals("unlimited") ? #_pwReuseTime : "value"'
                       action="runwheninit"/>
               <Input label="Password Reuse Time" name="pwReuseTime" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwReuseTime}</Default>
               </Input>
               <Input name="pwReuseTimeValue" style="number" linebreak="true">
                  <Default>${_pwReuseTimeValue}</Default>
               </Input>

               <SetVar name="_pwMaxLengthValue"
                       value='#_pwMaxLength.equals("default") or #_pwMaxLength.equals("unlimited") ? "0" : #_pwMaxLength'
                       action="runwheninit"/>
               <SetVar name="_pwMaxLength"
                       value='#_pwMaxLength.equals("default") or #_pwMaxLength.equals("unlimited") ? #_pwMaxLength : "value"'
                       action="runwheninit"/>
               <Input label="Password Max Length" name="pwMaxLength" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwMaxLength}</Default>
               </Input>
               <Input name="pwMaxLengthValue" style="number" linebreak="true">
                  <Default>${_pwMaxLengthValue}</Default>
               </Input>

               <SetVar name="_pwMinLengthValue"
                       value='#_pwMinLength.equals("default") or #_pwMinLength.equals("unlimited") ? "0" : #_pwMinLength'
                       action="runwheninit"/>
               <SetVar name="_pwMinLength"
                       value='#_pwMinLength.equals("default") or #_pwMinLength.equals("unlimited") ? #_pwMinLength : "value"'
                       action="runwheninit"/>
               <Input label="Password Min Length" name="pwMinLength" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwMinLength}</Default>
               </Input>
               <Input name="pwMinLengthValue" style="number" linebreak="true">
                  <Default>${_pwMinLengthValue}</Default>
               </Input>

               <SetVar name="_pwMinLettersValue"
                       value='#_pwMinLetters.equals("default") or #_pwMinLetters.equals("unlimited") ? "0" : #_pwMinLetters'
                       action="runwheninit"/>
               <SetVar name="_pwMinLetters"
                       value='#_pwMinLetters.equals("default") or #_pwMinLetters.equals("unlimited") ? #_pwMinLetters : "value"'
                       action="runwheninit"/>
               <Input label="Password Min Letters" name="pwMinLetters" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwMinLetters}</Default>
               </Input>
               <Input name="pwMinLettersValue" style="number" linebreak="true">
                  <Default>${_pwMinLettersValue}</Default>
               </Input>

               <SetVar name="_pwMinUppercaseLettersValue"
                       value='#_pwMinUppercaseLetters.equals("default") or #_pwMinUppercaseLetters.equals("unlimited") ? "0" : #_pwMinUppercaseLetters'
                       action="runwheninit"/>
               <SetVar name="_pwMinUppercaseLetters"
                       value='#_pwMinUppercaseLetters.equals("default") or #_pwMinUppercaseLetters.equals("unlimited") ? #_pwMinUppercaseLetters : "value"'
                       action="runwheninit"/>
               <Input label="Password Min Uppercase Letters" name="pwMinUppercaseLetters" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwMinUppercaseLetters}</Default>
               </Input>
               <Input name="pwMinUppercaseLettersValue" style="number" linebreak="true">
                  <Default>${_pwMinUppercaseLettersValue}</Default>
               </Input>

               <SetVar name="_pwMinLowercaseLettersValue"
                       value='#_pwMinLowercaseLetters.equals("default") or #_pwMinLowercaseLetters.equals("unlimited") ? "0" : #_pwMinLowercaseLetters'
                       action="runwheninit"/>
               <SetVar name="_pwMinLowercaseLetters"
                       value='#_pwMinLowercaseLetters.equals("default") or #_pwMinLowercaseLetters.equals("unlimited") ? #_pwMinLowercaseLetters : "value"'
                       action="runwheninit"/>
               <Input label="Password Min Lowercase Letters" name="pwMinLowercaseLetters" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwMinLowercaseLetters}</Default>
               </Input>
               <Input name="pwMinLowercaseLettersValue" style="number" linebreak="true">
                  <Default>${_pwMinLowercaseLettersValue}</Default>
               </Input>

               <SetVar name="_pwMinDigitsValue"
                       value='#_pwMinDigits.equals("default") or #_pwMinDigits.equals("unlimited") ? "0" : #_pwMinDigits'
                       action="runwheninit"/>
               <SetVar name="_pwMinDigits"
                       value='#_pwMinDigits.equals("default") or #_pwMinDigits.equals("unlimited") ? #_pwMinDigits : "value"'
                       action="runwheninit"/>
               <Input label="Password Min Digits" name="pwMinDigits" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwMinDigits}</Default>
               </Input>
               <Input name="pwMinDigitsValue" style="number" linebreak="true">
                  <Default>${_pwMinDigitsValue}</Default>
               </Input>

               <SetVar name="_pwMinSymbolsValue"
                       value='#_pwMinSymbols.equals("default") or #_pwMinSymbols.equals("unlimited") ? "0" : #_pwMinSymbols'
                       action="runwheninit"/>
               <SetVar name="_pwMinSymbols"
                       value='#_pwMinSymbols.equals("default") or #_pwMinSymbols.equals("unlimited") ? #_pwMinSymbols : "value"'
                       action="runwheninit"/>
               <Input label="Password Min Symbols" name="pwMinSymbols" style="radio" linebreak="false">
                  <Labels>DEFAULT|UNLIMITED|VALUE</Labels>
                  <Values>default|unlimited|value</Values>
                  <Default>${_pwMinSymbols}</Default>
               </Input>
               <Input name="pwMinSymbolsValue" style="number" linebreak="true">
                  <Default>${_pwMinSymbolsValue}</Default>
               </Input>

               <SetVar name="_pwLifeTime"            value='#pwLifeTime.equalsIgnoreCase("value") ?            #pwLifeTimeValue : #pwLifeTime'/>
               <SetVar name="_pwGraceTime"           value='#pwGraceTime.equalsIgnoreCase("value") ?           #pwGraceTimeValue : #pwGraceTime'/>
               <SetVar name="_failedLoginAttempts"   value='#failedLoginAttempts.equalsIgnoreCase("value") ?   #failedLoginAttemptsValue : #failedLoginAttempts'/>
               <SetVar name="_pwLockTime"            value='#pwLockTime.equalsIgnoreCase("value") ?            #pwLockTimeValue : #pwLockTime'/>
               <SetVar name="_pwReuseMax"            value='#pwReuseMax.equalsIgnoreCase("value") ?            #pwReuseMaxValue : #pwReuseMax'/>
               <SetVar name="_pwReuseTime"           value='#pwReuseTime.equalsIgnoreCase("value") ?           #pwReuseTimeValue : #pwReuseTime'/>
               <SetVar name="_pwMaxLength"           value='#pwMaxLength.equalsIgnoreCase("value") ?           #pwMaxLengthValue : #pwMaxLength'/>
               <SetVar name="_pwMinLength"           value='#pwMinLength.equalsIgnoreCase("value") ?           #pwMinLengthValue : #pwMinLength'/>
               <SetVar name="_pwMinLetters"          value='#pwMinLetters.equalsIgnoreCase("value") ?          #pwMinLettersValue : #pwMinLetters'/>
               <SetVar name="_pwMinUppercaseLetters" value='#pwMinUppercaseLetters.equalsIgnoreCase("value") ? #pwMinUppercaseLettersValue : #pwMinUppercaseLetters'/>
               <SetVar name="_pwMinLowercaseLetters" value='#pwMinLowercaseLetters.equalsIgnoreCase("value") ? #pwMinLowercaseLettersValue : #pwMinLowercaseLetters'/>
               <SetVar name="_pwMinDigits"           value='#pwMinDigits.equalsIgnoreCase("value") ?           #pwMinDigitsValue : #pwMinDigits'/>
               <SetVar name="_pwMinSymbols"          value='#pwMinSymbols.equalsIgnoreCase("value") ?          #pwMinSymbolsValue : #pwMinSymbols'/>

               <Command>
                  <SQL>
                     <![CDATA[
ALTER PROFILE "${profilename}" LIMIT
PASSWORD_LIFE_TIME ${_pwLifeTime}
PASSWORD_GRACE_TIME ${_pwGraceTime}
FAILED_LOGIN_ATTEMPTS ${_failedLoginAttempts}
PASSWORD_LOCK_TIME ${_pwLockTime}
PASSWORD_REUSE_MAX ${_pwReuseMax}
PASSWORD_REUSE_TIME ${_pwReuseTime}
PASSWORD_MAX_LENGTH ${_pwMaxLength}
PASSWORD_MIN_LENGTH ${_pwMinLength}
PASSWORD_MIN_LETTERS ${_pwMinLetters}
PASSWORD_MIN_UPPERCASE_LETTERS ${_pwMinUppercaseLetters}
PASSWORD_MIN_LOWERCASE_LETTERS ${_pwMinLowercaseLetters}
PASSWORD_MIN_DIGITS ${_pwMinDigits}
PASSWORD_MIN_SYMBOLS ${_pwMinSymbols}
                     ]]>
                  </SQL>
               </Command>
               <Confirm>
                  Confirm modifying profile ${objectname}?
               </Confirm>
               <Result>
                  Profile ${profilename} created!
               </Result>
            </Action>

            <Action id="vertica-profile-drop" label="Drop Profile" reload="true" icon="remove">
               <Input label="Profile Name" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Input label="Cascade" name="cascade" style="check"
                      tip="All users assigned to the profile will be moved to the DEFAULT profile">
                  <Values>cascade</Values>
               </Input>
               <Command>
                  <SQL><![CDATA[drop profile "${objectname}" ${cascade}]]></SQL>
               </Command>
               <Confirm>
                  Confirm drop of profile ${objectname}?
               </Confirm>
               <Result>
                  Profile ${objectname} dropped!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="Session">
         <If test="#SUPERUSER">
            <Action id="vertica-session-close" label="Close Session" reload="true" icon="remove">
               <Input label="Session ID" style="text" editable="false">
                  <Default>${objectname}</Default>
               </Input>
               <Command>
                  <SQL><![CDATA[select close_session('${objectname}')]]></SQL>
               </Command>
               <Confirm><![CDATA[Really close session ${objectname}?]]></Confirm>
               <Result>
                  Session ${objectname} has been closed!
               </Result>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="License">
         <If test="#SUPERUSER">
            <Action id="vertica-license-auditlicensesize" label="Audit License Size">
               <Command>
                  <SQL><![CDATA[SELECT audit_license_size()]]></SQL>
               </Command>
               <Confirm><![CDATA[
                  Trigger an immediate audit of the database size to determine if it is in license compliance?
               ]]>
               </Confirm>
            </Action>
            <Action id="vertica-license-auditlicenseterm" label="Audit License Term">
               <Command>
                  <SQL><![CDATA[SELECT audit_license_term()]]></SQL>
               </Command>
               <Confirm><![CDATA[
                  Trigger an immediate audit to determine if the HP Vertica license has expired?
               ]]>
               </Confirm>
            </Action>
         </If>
      </ActionGroup>

      <ActionGroup type="TupleMover">
         <If test="#SUPERUSER">
            <Action id="vertica-tuplemover-table" label="Run Tuple Mover on Table" reload="true">
               <Input label="Task" name="task" style="radio">
                  <Values>moveout|mergeout|analyze_row_count</Values>
                  <Default>moveout</Default>
               </Input>
               <Input label="Table" name="tablename" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[select table_schema || '.' || table_name from v_catalog.tables where table_schema not in ('v_catalog', 'v_monitor') order by 1]]></SQL>
                     </Command>
                  </Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[select do_tm_task('${task}', '${tablename}')]]></SQL>
               </Command>
               <Confirm><![CDATA[Really run ${task} on '${tablename}'?]]></Confirm>
               <Result>
                  Moveout has been kicked off!
               </Result>
            </Action>
            <Action id="vertica-tuplemover-projection" label="Run Tuple Mover on Projection" reload="true">
               <Input label="Task" name="task" style="radio">
                  <Values>moveout|mergeout|analyze_row_count</Values>
                  <Default>moveout</Default>
               </Input>
               <Input label="Projection" name="projname" style="list">
                  <Values>
                     <Command>
                        <SQL>
                           <![CDATA[select projection_schema || '.' || projection_name from projections order by 1]]></SQL>
                     </Command>
                  </Values>
               </Input>
               <Command>
                  <SQL>
                     <![CDATA[select do_tm_task('${task}', '${projname}')]]></SQL>
               </Command>
               <Confirm><![CDATA[Really run ${task} on '${projname}'?]]></Confirm>
               <Result>
                  Moveout has been kicked off!
               </Result>
            </Action>
         </If>
      </ActionGroup>

   </ObjectsActionDef>

   <!-- ================================================================ -->
   <!-- Definition of the ObjectsTreeDef showing the database hierarchy -->
   <!-- ================================================================ -->

   <ObjectsTreeDef extends="false">

      <GroupNode type="Schemas" label="Schemas">
         <DataNode type="Schema" label="${vertica.getNonSystemSchemas.schema_name}">
            <SetVar name="schema" value="${vertica.getNonSystemSchemas.schema_name}"/>
            <Command idref="vertica.getNonSystemSchemas">
               <Filter index="schema_name" label="Name"/>
            </Command>

            <GroupNode type="Tables" label="Tables">
               <DataNode type="Table" label="${vertica.getTables.Table Name}">
                  <SetVar name="objectname" value="${vertica.getTables.Table Name}"/>
                  <SetVar name="owner" value="${vertica.getTables.Owner}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="vertica.getTables">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                     <Input name="type" value="TABLE"/>
                  </Command>

                  <!--
                  Need to keep the objectname for the current table in a new
                  variable so that the viewers will be able to pick up the
                  correct input to display
                  -->
                  <SetVar name="theTableName" value="${objectname}"/>
                  <SetVar name="theColumnName" value="%"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumnDefinitions.COLUMN_NAME}"
                               label1="${getColumnDefinitions.TYPE_NAME}" isLeaf="true"
                               icon="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'PrimaryKey' : 'Column'"
                               tip="#dataMap.get('getColumnDefinitions.IS_PRIMARY_KEY') eq true ? 'This is a primary key column' : ''">
                        <SetVar name="objectname" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <Command idref="getColumnDefinitions">
                           <Input name="catalog" value="${catalog}"/>
                           <Input name="schema" value="${schema}"/>
                           <Input name="objectname" value="${theTableName}"/>
                           <Input name="tableType" value="Table"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>

                        <GroupNode type="ProjectionsTable" label="Projections containing Column">
                           <DataNode type="Projection"
                                     label="${vertica.getProjectionsForTable.Name}" isLeaf="true"
                                     label1="${vertica.getProjectionsForTable.Schema}"
                                     icon="#dataMap.get('vertica.getProjectionsForTable.Prejoin') eq true ? 'ProjectionPrejoin' : 'Projections'"
                                     tip="#dataMap.get('vertica.getProjectionsForTable.Prejoin') eq true ? 'This is a pre-join projection' : ''">
                              <SetVar name="objectname" value="${vertica.getProjectionsForTable.Name}"/>
                              <Command idref="vertica.getProjectionsForTable">
                                 <Input name="schema" value="${schema}"/>
                                 <Input name="tableName" value="${theTableName}"/>
                                 <Input name="columnName" value="${theColumnName}"/>
                                 <Filter index="Schema" label="Schema"/>
                              </Command>

                              <!--
                              Need to keep the objectname for the current projection in a new
                              variable so that the viewers will be able to pick up the
                              correct input to display
                              -->
                              <SetVar name="theProjectionId" value="${vertica.getProjectionsForTable.Projection Id}"/>

                           </DataNode>
                        </GroupNode>
                     </DataNode>
                  </GroupNode>

                  <GroupNode type="ProjectionsTable" label="Projections">
                     <DataNode type="Projection"
                               label="${vertica.getProjectionsForTable.Name}"
                               label1="${vertica.getProjectionsForTable.Schema}"
                               isLeaf="true"
                               icon="#dataMap.get('vertica.getProjectionsForTable.Prejoin') eq true ? 'ProjectionPrejoin' : 'Projections'"
                               tip="#dataMap.get('vertica.getProjectionsForTable.Prejoin') eq true ? 'This is a pre-join projection' : ''">
                        <SetVar name="objectname" value="${vertica.getProjectionsForTable.Name}"/>
                        <Command idref="vertica.getProjectionsForTable">
                           <Input name="schema" value="${schema}"/>
                           <Input name="tableName" value="${theTableName}"/>
                           <Input name="columnName" value="%"/>
                           <Filter index="Schema" label="Schema"/>
                        </Command>

                        <!--
                        Need to keep the objectname for the current projection in a new
                        variable so that the viewers will be able to pick up the
                        correct input to display
                        -->
                        <SetVar name="theProjectionId" value="${vertica.getProjectionsForTable.Projection Id}"/>
                     </DataNode>
                  </GroupNode>
               </DataNode>
            </GroupNode>

            <GroupNode type="GlobalTempTables" label="Global Temp Tables">
               <SetVar name="type" value="GLOBAL TEMPORARY"/>

               <DataNode type="TempTable" label="${vertica.getTables.Table Name}">
                  <SetVar name="objectname" value="${vertica.getTables.Table Name}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="vertica.getTables">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                     <Input name="type" value="${type}"/>
                  </Command>

                  <!--
                  Need to keep the objectname for the current table in a new
                  variable so that the viewers will be able to pick up the
                  correct input to display
                  -->
                  <SetVar name="theTableName" value="${objectname}"/>
                  <SetVar name="theColumnName" value="%"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumnDefinitions.COLUMN_NAME}"
                               label1="${getColumnDefinitions.TYPE_NAME}" isLeaf="true">
                        <SetVar name="objectname" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <Command idref="getColumnDefinitions">
                           <Input name="catalog" value="${catalog}"/>
                           <Input name="schema" value="${schema}"/>
                           <Input name="objectname" value="${theTableName}"/>
                           <Input name="tableType" value="Table"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>
                     </DataNode>
                  </GroupNode>
               </DataNode>
            </GroupNode>

            <If test="#util.isDatabaseVersionGTE(7)">
               <GroupNode type="FlexTables" label="Flex Tables">
                  <DataNode type="FlexTable" label="${vertica.getFlexTables.Table Name}">
                     <SetVar name="objectname" value="${vertica.getFlexTables.Table Name}"/>
                     <SetVar name="rowcount" value="true"/>
                     <SetVar name="acceptInQB" value="true"/>
                     <Command idref="vertica.getFlexTables">
                        <Input name="schema" value="${schema}"/>
                        <Input name="objectname" value="%"/>
                     </Command>

                     <!--
                     Need to keep the objectname for the current table in a new
                     variable so that the viewers will be able to pick up the
                     correct input to display
                     -->
                     <SetVar name="theTableName" value="${objectname}"/>
                     <SetVar name="theColumnName" value="%"/>

                     <GroupNode type="Columns" label="Columns">
                        <DataNode type="Column" label="${getColumnDefinitions.COLUMN_NAME}"
                                  label1="${getColumnDefinitions.TYPE_NAME}" isLeaf="true">
                           <SetVar name="objectname" value="${getColumnDefinitions.COLUMN_NAME}"/>
                           <Command idref="getColumnDefinitions">
                              <Input name="catalog" value="${catalog}"/>
                              <Input name="schema" value="${schema}"/>
                              <Input name="objectname" value="${theTableName}"/>
                              <Input name="tableType" value="Table"/>
                              <Filter index="TYPE_NAME" label="Type"/>
                           </Command>
                        </DataNode>
                     </GroupNode>
                  </DataNode>
               </GroupNode>
            </If>

            <GroupNode type="Views" label="Views">
               <DataNode type="View" label="${vertica.getViews.Table Name}">
                  <SetVar name="objectname" value="${vertica.getViews.Table Name}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="vertica.getViews">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                  </Command>

                  <SetVar name="theTableName" value="${objectname}"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumnDefinitions.COLUMN_NAME}"
                               label1="${getColumnDefinitions.TYPE_NAME}" isLeaf="true">
                        <SetVar name="objectname" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <!-- Save the Column Name -->
                        <SetVar name="theColumnName" value="${getColumnDefinitions.COLUMN_NAME}"/>
                        <Command idref="getColumnDefinitions">
                           <Input name="catalog" value="${catalog}"/>
                           <Input name="schema" value="${schema}"/>
                           <Input name="objectname" value="${theTableName}"/>
                           <Input name="tableType" value="View"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>
                     </DataNode>
                  </GroupNode>
               </DataNode>
            </GroupNode>

            <GroupNode type="ProjectionsSchema" label="Projections">
               <DataNode type="Projection" label="${vertica.getProjectionsForSchema.Name}" isLeaf="true"
                         icon="#dataMap.get('vertica.getProjectionsForSchema.Prejoin') eq true ? 'ProjectionPrejoin' : 'Projections'"
                         tip="#dataMap.get('vertica.getProjectionsForTable.Prejoin') eq true ? 'This is a pre-join projection' : ''">
                  <SetVar name="objectname" value="${vertica.getProjectionsForSchema.Name}"/>
                  <Command idref="vertica.getProjectionsForSchema">
                     <Input name="schema" value="${schema}"/>
                  </Command>

                  <!--
                  Need to keep the objectname for the current projection in a new
                  variable so that the viewers will be able to pick up the
                  correct input to display
                  -->
                  <SetVar name="theProjectionId" value="${vertica.getProjectionsForSchema.Projection Id}"/>
               </DataNode>
            </GroupNode>

            <GroupNode type="Sequences" label="Sequences">
               <DataNode type="Sequence" label="${vertica.getSequences.sequence_name}" isLeaf="true">
                  <SetVar name="objectname" value="${vertica.getSequences.sequence_name}"/>
                  <Command idref="vertica.getSequences">
                     <Input name="schema" value="${schema}"/>
                     <Input name="name" value="%"/>
                  </Command>
               </DataNode>
            </GroupNode>

            <GroupNode type="Functions" label="Functions (SQL)">
               <DataNode type="Function" label="${vertica.getSQLFunctions.function_name} (${vertica.getSQLFunctions.function_argument_type})"
                         isLeaf="true">
                  <SetVar name="objectname" value="${vertica.getSQLFunctions.function_name}"/>
                  <SetVar name="arguments" value="${vertica.getSQLFunctions.function_argument_type}"/>
                  <SetVar name="getDDLName" value="${vertica.getSQLFunctions.function_name} (${vertica.getSQLFunctions.function_argument_type})"/>
                  <Command idref="vertica.getSQLFunctions">
                     <Input name="schema" value="${schema}"/>
                  </Command>
               </DataNode>
            </GroupNode>

            <GroupNode type="Libraries" label="Libraries">
               <DataNode type="Library" label="${vertica.getLibraries.LIB_NAME}">
                  <SetVar name="objectname" value="${vertica.getLibraries.LIB_NAME}"/>
                  <SetVar name="filename" value="${vertica.getLibraries.lib_file_name}"/>
                  <Command idref="vertica.getLibraries">
                     <Input name="schema" value="${schema}"/>
                  </Command>

                  <GroupNode type="FactoryFunctions" label="Factory Functions">
                     <DataNode type="FactoryFunction" label="${vertica.getLibraryManifest.OBJ_NAME}" isLeaf="true">
                        <SetVar name="objectname" value="${vertica.getLibraryManifest.OBJ_NAME}"/>
                        <Command idref="vertica.getLibraryManifest">
                           <Input name="library" value="${objectname}"/>
                        </Command>
                     </DataNode>
                  </GroupNode>
               </DataNode>
            </GroupNode>

            <GroupNode type="UDX" label="UDFs">
               <GroupNode type="UDXAggregates" label="Aggregates">
                  <DataNode type="UDXAggregate" label="${vertica.getUDX.function_name}"
                            label1="${vertica.getUDX.function_argument_type}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${vertica.getUDX.function_name}"/>
                     <SetVar name="arguments" value="${vertica.getUDX.function_argument_type}"/>
                     <Command idref="vertica.getUDX">
                        <Input name="type" value="'User Defined Aggregate'"/>
                        <Filter index="function_argument_type" label="Type"/>
                     </Command>
                  </DataNode>
               </GroupNode>

               <GroupNode type="UDXAnalytics" label="Analytics">
                  <DataNode type="UDXAnalytic" label="${vertica.getUDX.function_name}"
                            label1="${vertica.getUDX.function_argument_type}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${vertica.getUDX.function_name}"/>
                     <Command idref="vertica.getUDX">
                        <Input name="type" value="'User Defined Analytic'"/>
                        <Filter index="function_argument_type" label="Type"/>
                     </Command>
                  </DataNode>
               </GroupNode>

               <GroupNode type="UDXFilters" label="Filters">
                  <DataNode type="UDXFilter" label="${vertica.getUDX.function_name}"
                            label1="${vertica.getUDX.function_argument_type}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${vertica.getUDX.function_name}"/>
                     <Command idref="vertica.getUDX">
                        <Input name="type" value="'User Defined Filter'"/>
                        <Filter index="function_argument_type" label="Type"/>
                     </Command>
                  </DataNode>
               </GroupNode>

               <GroupNode type="UDXFunctions" label="Functions">
                  <DataNode type="UDXFunction" label="${vertica.getUDX.function_name}"
                            label1="${vertica.getUDX.function_argument_type}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${vertica.getUDX.function_name}"/>
                     <SetVar name="arguments" value="${vertica.getUDX.function_argument_type}"/>
                     <Command idref="vertica.getUDX">
                        <Input name="type" value="'User Defined Function'"/>
                        <Filter index="function_argument_type" label="Type"/>
                     </Command>
                  </DataNode>
               </GroupNode>

               <GroupNode type="UDXParsers" label="Parsers">
                  <DataNode type="UDXParser" label="${vertica.getUDX.function_name}"
                            label1="${vertica.getUDX.function_argument_type}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${vertica.getUDX.function_name}"/>
                     <Command idref="vertica.getUDX">
                        <Input name="type" value="'User Defined Parser'"/>
                        <Filter index="function_argument_type" label="Type"/>
                     </Command>
                  </DataNode>
               </GroupNode>

               <GroupNode type="UDXSources" label="Sources">
                  <DataNode type="UDXSource" label="${vertica.getUDX.function_name}"
                            label1="${vertica.getUDX.function_argument_type}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${vertica.getUDX.function_name}"/>
                     <Command idref="vertica.getUDX">
                        <Input name="type" value="'User Defined Source'"/>
                        <Filter index="function_argument_type" label="Type"/>
                     </Command>
                  </DataNode>
               </GroupNode>

               <GroupNode type="UDXTransforms" label="Transforms">
                  <DataNode type="UDXTransform" label="${vertica.getUDX.function_name}"
                            label1="${vertica.getUDX.function_argument_type}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${vertica.getUDX.function_name}"/>
                     <SetVar name="arguments" value="${vertica.getUDX.function_argument_type}"/>
                     <Command idref="vertica.getUDX">
                        <Input name="type" value="'User Defined Transform'"/>
                        <Filter index="function_argument_type" label="Type"/>
                     </Command>
                  </DataNode>
               </GroupNode>

               <GroupNode type="UDXOthers" label="Other">
                  <DataNode type="UDXOther" label="${vertica.getUDOther.function_name}"
                            label1="${vertica.getUDOther.function_argument_type}"
                            isLeaf="true">
                     <SetVar name="objectname" value="${vertica.getUDOther.function_name}"/>
                     <Command idref="vertica.getUDOther">
                        <Filter index="function_argument_type" label="Type"/>
                     </Command>
                  </DataNode>
               </GroupNode>
            </GroupNode>

            <GroupNode type="Procedures" label="Procedures">
               <DataNode type="Procedure" label="${vertica.getProcedures.Procedure Name}"
                         label1="${vertica.getProcedures.Arguments}"
                         isLeaf="true">
                  <SetVar name="objectname" value="${vertica.getProcedures.Procedure Name}"/>
                  <SetVar name="arguments" value="${vertica.getProcedures.Arguments}"/>
                  <Command idref="vertica.getProcedures"/>
               </DataNode>
            </GroupNode>
         </DataNode>
      </GroupNode>

      <GroupNode type="SystemSchemas" label="System Schemas">
         <DataNode type="SystemSchema" label="${vertica.getSystemSchemas.schema_name}">
            <SetVar name="schema" value="${vertica.getSystemSchemas.schema_name}"/>
            <Command idref="vertica.getSystemSchemas"/>

            <GroupNode type="SystemTables" label="System Tables">
               <DataNode type="SystemTable" label="${vertica.getSystemTables.Table Name}">
                  <SetVar name="objectname" value="${vertica.getSystemTables.Table Name}"/>
                  <SetVar name="rowcount" value="true"/>
                  <SetVar name="acceptInQB" value="true"/>
                  <Command idref="vertica.getSystemTables">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="%"/>
                  </Command>

                  <!--
                  Need to keep the objectname for the current table in a new
                  variable so that the viewers will be able to pick up the
                  correct input to display
                  -->
                  <SetVar name="theTableName" value="${objectname}"/>

                  <GroupNode type="Columns" label="Columns">
                     <DataNode type="Column" label="${getColumns.COLUMN_NAME}"
                               label1="${getColumns.TYPE_NAME}"
                               isLeaf="true">
                        <SetVar name="objectname" value="${getColumns.COLUMN_NAME}"/>
                        <Command idref="getColumns">
                           <Input name="schema" value="${schema}"/>
                           <Input name="objectname" value="${objectname}"/>
                           <Filter index="TYPE_NAME" label="Type"/>
                        </Command>
                     </DataNode>
                  </GroupNode>
               </DataNode>
            </GroupNode>
         </DataNode>
      </GroupNode>

      <GroupNode type="LocalTempTables" label="Local Temp Tables">
         <SetVar name="type" value="LOCAL TEMPORARY"/>
         <SetVar name="schema" value="v_temp_schema"/>

         <DataNode type="TempTable" label="${vertica.getTables.Table Name}">
            <SetVar name="objectname" value="${vertica.getTables.Table Name}"/>
            <SetVar name="rowcount" value="true"/>
            <SetVar name="acceptInQB" value="true"/>
            <Command idref="vertica.getTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
               <Input name="type" value="${type}"/>
            </Command>

            <!--
            Need to keep the objectname for the current table in a new
            variable so that the viewers will be able to pick up the
            correct input to display
            -->
            <SetVar name="theTableName" value="${objectname}"/>
            <SetVar name="theColumnName" value="%"/>

            <GroupNode type="Columns" label="Columns">
               <DataNode type="Column" label="${getColumns.COLUMN_NAME}"
                         label1="${getColumns.TYPE_NAME}"
                         isLeaf="true">
                  <SetVar name="objectname" value="${getColumns.COLUMN_NAME}"/>
                  <SetVar name="theColumnName" value="${getColumns.COLUMN_NAME}"/>

                  <Command idref="getColumns">
                     <Input name="schema" value="${schema}"/>
                     <Input name="objectname" value="${objectname}"/>
                     <Filter index="TYPE_NAME" label="Type"/>
                  </Command>
               </DataNode>
            </GroupNode>
         </DataNode>
      </GroupNode>

      <GroupNode type="DBA" label="DBA Views">
         <GroupNode type="Databases" label="Databases">
            <DataNode type="Database" label="${vertica.getDatabases.DATABASE_NAME}" isLeaf="true">
               <Command idref="vertica.getDatabases"/>
            </DataNode>
         </GroupNode>

         <GroupNode type="Users" label="Users">
            <DataNode type="User" label="${vertica.getUsers.Name}" isLeaf="true">
               <SetVar name="objectname" value="${vertica.getUsers.Name}"/>
               <!--These are used by the Alter User action-->
               <SetVar name="deflocked"       value='${vertica.getUsers.Locked}'/>
               <SetVar name="defmemcap"       value='${vertica.getUsers.Memory Cap (KB)}'/>
               <SetVar name="defprofile"      value='${vertica.getUsers.Profile Name}'/>
               <SetVar name="defpool"         value='${vertica.getUsers.Resource Pool}'/>
               <SetVar name="defruntimecap"   value='${vertica.getUsers.Run Time Cap}'/>
               <SetVar name="deftempspacecap" value='${vertica.getUsers.Temp Space Cap (KB)}'/>
               <Command idref="vertica.getUsers"/>
            </DataNode>
         </GroupNode>

         <GroupNode type="Roles" label="Roles">
            <DataNode type="Role" label="${vertica.getRoles.name}">
               <SetVar name="objectname" value="${vertica.getRoles.name}"/>
               <Command idref="vertica.getRoles"/>
               <DataNode type="User" label="${vertica.getUsersFromRole.user_name}" isLeaf="true">
                  <Command idref="vertica.getUsersFromRole"/>
               </DataNode>
            </DataNode>
         </GroupNode>

         <GroupNode type="Profiles" label="Profiles">
            <DataNode type="Profile" label="${vertica.getProfiles.profile_name}">
               <SetVar name="objectname" value="${vertica.getProfiles.profile_name}"/>
               <!--These are used by the Alter Profile action-->
               <SetVar name="_pwLifeTime"            value='${vertica.getProfiles.password_life_time}'/>
               <SetVar name="_pwGraceTime"           value='${vertica.getProfiles.password_grace_time}'/>
               <SetVar name="_failedLoginAttempts"   value='${vertica.getProfiles.failed_login_attempts}'/>
               <SetVar name="_pwLockTime"            value='${vertica.getProfiles.password_lock_time}'/>
               <SetVar name="_pwReuseMax"            value='${vertica.getProfiles.password_reuse_max}'/>
               <SetVar name="_pwReuseTime"           value='${vertica.getProfiles.password_reuse_time}'/>
               <SetVar name="_pwMaxLength"           value='${vertica.getProfiles.password_max_length}'/>
               <SetVar name="_pwMinLength"           value='${vertica.getProfiles.password_min_length}'/>
               <SetVar name="_pwMinLetters"          value='${vertica.getProfiles.password_min_letters}'/>
               <SetVar name="_pwMinUppercaseLetters" value='${vertica.getProfiles.password_min_uppercase_letters}'/>
               <SetVar name="_pwMinLowercaseLetters" value='${vertica.getProfiles.password_min_lowercase_letters}'/>
               <SetVar name="_pwMinDigits"           value='${vertica.getProfiles.password_min_digits}'/>
               <SetVar name="_pwMinSymbols"          value='${vertica.getProfiles.password_min_symbols}'/>
               <Command idref="vertica.getProfiles"/>
               <DataNode type="User" label="${vertica.getUsersFromProfile.user_name}" isLeaf="true">
                  <SetVar name="objectname" value="${vertica.getUsersFromProfile.user_name}"/>
                  <Command idref="vertica.getUsersFromProfile"/>
               </DataNode>
            </DataNode>
         </GroupNode>

         <!-- This node needs to be fixed. See comments above the "Transactions View Type (below) -->
         <!--
         <GroupNode type="Transactions" label="Histogram Error" isLeaf="true" />
         -->

         <GroupNode type="RecentQueries" label="Recent Queries" isLeaf="true"/>
         <GroupNode type="System" label="System" isLeaf="true"/>
         <GroupNode type="Locks" label="Locks" isLeaf="true"/>
         <GroupNode type="Sessions" label="Sessions">
            <DataNode type="Session" label="${vertica.getSessions.Session ID}" isLeaf="true">
               <SetVar name="objectname" value="${vertica.getSessions.Session ID}"/>
               <Command idref="vertica.getSessions"/>
            </DataNode>
         </GroupNode>
         <GroupNode type="License" label="Licenses" isLeaf="true"/>
         <GroupNode type="Streams" label="Load Streams" isLeaf="true"/>
         <GroupNode type="TupleMover" label="Tuple Mover Operations" isLeaf="true"/>
         <GroupNode type="TuningRecommendations" label="Tuning Recommendations" isLeaf="true"/>
         <GroupNode type="Nodes" label="Nodes">
            <DataNode type="Node" label="${vertica.getNodes.Name}" isLeaf="true">
               <SetVar name="objectname" value="${vertica.getNodes.Name}"/>
               <SetVar name="hostname" value="${vertica.getNodes.Node Address}"/>
               <Command idref="vertica.getNodes"/>
            </DataNode>
         </GroupNode>
         <GroupNode type="SchedulerJobs" label="Resource Pools">
            <DataNode type="SchedulerJob" label="${vertica.getResourcePools.Name}" isLeaf="true">
               <SetVar name="objectname" value="${vertica.getResourcePools.Name}"/>
               <Command idref="vertica.getResourcePools"/>
            </DataNode>
         </GroupNode>
      </GroupNode>

   </ObjectsTreeDef>

   <!-- =================================================================== -->
   <!-- Definition of the database objects views -->
   <!-- =================================================================== -->

   <ObjectsViewDef extends="true">

      <!-- ================================================================= -->
      <!-- Databases/schemas related views -->
      <!-- ================================================================= -->

      <ObjectView type="Schemas">
         <DataView id="generic-schemas-schemas" drop-on-condition="always"/>

         <DataView id="vertica-schemas-schemas" icon="Schemas" label="Schemas" viewer="grid">
            <Command idref="vertica.getNonSystemSchemas"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Catalog" drop-on-condition="always"/>
      <ObjectView type="Schema" drop-on-condition="always"/>

      <!-- ================================================================= -->
      <!-- Table Related Views -->
      <!-- ================================================================= -->

      <ObjectView type="Tables">
         <DataView id="generic-tables-tables" drop-on-condition="always"/>
         <DataView id="generic-tables-references" drop-on-condition="always"/>

         <DataView id="vertica-tables-tables" icon="Tables" label="Tables" viewer="grid">
            
            <Input name="menuItem" value="Open in New Tab...">
               <Input name="action" value="open-object-in-new-tab-command ${schema||Schema}${object||Table Name}"/>
            </Input>
            <Input name="menuItem" value="Open in Floating Tab...">
               <Input name="action" value="open-object-in-floating-tab-command ${schema||Schema}${object||Table Name}"/>
            </Input>
            <Input name="menuItem" value="Script: SELECT ALL (Max 50000)">
               <Input name="command" value="SELECT * FROM ${schema||Schema}${object||Table Name} limit 50000"/>
            </Input>
            <Input name="menuItem" value="Script: DROP TABLE">
               <Input name="command" value="DROP table ${schema||Schema}${object||Table Name} CASCADE"/>
            </Input>

            <Command idref="vertica.getTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
               <Input name="type" value="TABLE"/>
            </Command>
         </DataView>
         <DataView id="vertica-tables-references" icon="References" label="References" viewer="tables-refs"
                   doclink="/doclink/show-references">
            <Command idref="getTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
               <Input name="tableType" value="TABLE"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Table">
         <DataView id="generic-table-indexes" drop-on-condition="always"/>
         <DataView id="generic-table-rowid" drop-on-condition="always"/>
         <DataView id="generic-table-grants" drop-on-condition="always"/>
         <DataView id="generic-table-ddl" drop-on-condition="always"/>

         <!-- Add the Projection Storage Across Nodes -->
         <DataView id="vertica-table-storage" icon="Storage" label="Projection Storage" viewer="form">
            <Command idref="vertica.getProjectionStorageAcrossNodesForAnchorTable">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <!-- Add the Constraints view -->
         <DataView id="vertica-table-constraints" icon="Constraints" label="Constraints" viewer="grid">
            <Command idref="vertica.getTableConstraints">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <!-- Add the Grants view -->
         <DataView id="vertica-table-grants" icon="TablePrivileges" label="Grants" viewer="grid">
            <Command idref="vertica.getTableGrants">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="vertica-table-ddl" icon="Source" label="DDL" viewer="text">
            <Input name="dataColumn" value="export_objects"/>
            <Input name="formatSQL" value="false"/>

            <Command idref="vertica.getExportObject">
               <Input name="schema" value="${schema}"/>
               <Input name="name" value="${objectname}"/>
               <Input name="addKsafeFlag" value="true"/>
            </Command>
            <Message>
               <![CDATA[
<html>
This view shows the DDL produced by the Vertica "EXPORT_OBJECTS" command.
</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Views Related -->
      <!-- ================================================================= -->

      <ObjectView type="Views">
         <DataView id="vertica-views-views" icon="Views" label="Views" viewer="grid">
            <Input name="menuItem" value="Open in New Tab...">
               <Input name="action" value="open-object-in-new-tab-command ${schema||schema_name}${object||table_name}"/>
            </Input>
            <Input name="menuItem" value="Open in Floating Tab...">
               <Input name="action" value="open-object-in-floating-tab-command ${schema||schema_name}${object||table_name}"/>
            </Input>
            <Input name="menuItem" value="Script: SELECT ALL (Max 50000)">
               <Input name="command" value="SELECT * FROM ${schema||schema_name}${object||table_name} limit 50000"/>
            </Input>
            <Input name="menuItem" value="Script: DROP TABLE">
               <Input name="command" value="DROP table ${schema||schema_name}${object||table_name} CASCADE"/>
            </Input>

            <Command idref="vertica.getViews">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="View">
         <DataView id="vertica-view-columns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="getColumns">
               <Input name="catalog" value="${catalog}"/>
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="vertica-view-data" icon="Data" label="Data" viewer="table-data" doclink="/doclink/table-data">
            <!--Views cannot be edited in Vertica-->
            <Input name="disableEdit" value="true"/>
         </DataView>

         <DataView id="vertica-view-rowcount" icon="RowCount" label="Row Count" viewer="table-rowcount"/>

         <DataView id="vertica-view-references" icon="References" label="References" viewer="table-refs"
                   doclink="/doclink/show-references"/>

         <DataView id="vertica-view-navigator" icon="Navigator" label="Navigator" viewer="navigator"
            doclink="/doclink/navigate-references"/>

         <DataView id="vertica-view-constraints" icon="Constraints" label="Constraints" viewer="grid">
            <Command idref="vertica.getTableConstraints">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="vertica-view-source" icon="Source" label="DDL" viewer="text">
            <Input name="dataColumn" value="export_objects"/>
            <Input name="formatSQL" value="false"/>

            <Command idref="vertica.getExportObject">
               <Input name="schema" value="${schema}"/>
               <Input name="name" value="${objectname}"/>
               <Input name="addKsafeFlag" value="true"/>
            </Command>
            <Message>
               <![CDATA[
<html>
This view shows the DDL produced by the Vertica "EXPORT_OBJECTS" command.
</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Temp Tables -->
      <!-- ================================================================= -->

      <ObjectView type="GlobalTempTables">
         <DataView id="vertica-globaltemptables-tables" icon="Tables" label="Tables" viewer="grid">
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||Schema}${object||Table Name}"/>
            </Input>

            <Command idref="vertica.getTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
               <Input name="type" value="${type}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="LocalTempTables">
         <DataView id="vertica-localtemptables-tables" icon="Tables" label="Tables" viewer="grid">
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||Schema}${object||Table Name}"/>
            </Input>

            <Command idref="vertica.getTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
               <Input name="type" value="${type}"/>
            </Command>
            <Message>
               <![CDATA[
<html>
Local Temp Tables are displayed only when <b>Use a Single Shared Physical Connection</b> is on.
Note also that the <b>ON COMMIT PRESERVE ROWS</b> setting for the tables in combination with
the <b>Auto Commit</b> property in DbVisualizer will impact whether tables are displayed.
</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="TempTable">
         <DataView id="vertica-temptable-columns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="getColumns">
               <Input name="catalog" value="${catalog}"/>
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="vertica-temptable-data" icon="Data" label="Data" viewer="table-data" doclink="/doclink/table-data">
            <Message>
               <![CDATA[
<html>
Temp Table data is displayed only when <b>Use a Single Shared Physical Connection</b> is on.
Note also that the <b>ON COMMIT PRESERVE ROWS</b> setting for the table in combination with
the <b>Auto Commit</b> property in DbVisualizer will impact whether table data is displayed.
</html>
               ]]>
            </Message>
         </DataView>

         <DataView id="vertica-temptable-rowcount" icon="RowCount" label="Row Count" viewer="table-rowcount"/>

         <DataView id="vertica-temptable-source" icon="Source" label="DDL" viewer="text">
            <Input name="dataColumn" value="export_objects"/>
            <Input name="formatSQL" value="false"/>

            <Command idref="vertica.getExportObject">
               <Input name="schema" value="${schema}"/>
               <Input name="name" value="${objectname}"/>
               <Input name="addKsafeFlag" value="true"/>
            </Command>
            <Message>
               <![CDATA[
<html>
This view shows the DDL produced by the Vertica "EXPORT_OBJECTS" command.
</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Flex Tables Related -->
      <!-- ================================================================= -->

      <ObjectView type="FlexTables">
         <DataView id="vertica-flextables-tables" icon="Tables" label="Tables" viewer="grid">
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||Schema}${object||Table Name}"/>
            </Input>

            <Command idref="vertica.getFlexTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="FlexTable">
         <DataView id="vertica-flextable-columns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="getColumns">
               <Input name="catalog" value="${catalog}"/>
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="vertica-flextable-data" icon="Data" label="Data" viewer="table-data" doclink="/doclink/table-data"/>

         <DataView id="vertica-flextable-maptostring" icon="Data" label="Map to String" viewer="grid">
            <Command idref="vertica.getFlexTableMapToString">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="${objectname}"/>
            </Command>
         </DataView>

         <DataView id="vertica-flextable-rowcount" icon="RowCount" label="Row Count" viewer="table-rowcount"/>

         <DataView id="vertica-flextable-source" icon="Source" label="DDL" viewer="text">
            <Input name="dataColumn" value="export_objects"/>
            <Input name="formatSQL" value="false"/>

            <Command idref="vertica.getExportObject">
               <Input name="schema" value="${schema}"/>
               <Input name="name" value="${objectname}"/>
               <Input name="addKsafeFlag" value="true"/>
            </Command>
            <Message>
               <![CDATA[
<html>
This view shows the DDL produced by the Vertica "EXPORT_OBJECTS" command.
</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- System Tables Related -->
      <!-- ================================================================= -->

      <ObjectView type="SystemTables">
         <DataView id="vertica-systemtables-tables" icon="Tables" label="Tables" viewer="grid">
            <Input name="menuItem" value="Script: SELECT ALL">
               <Input name="command" value="select * from ${schema||Schema}${object||Table Name}"/>
            </Input>

            <Command idref="vertica.getSystemTables">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="SystemTable">
         <DataView id="vertica-systemtable-data" icon="Data" label="Data" viewer="table-data" doclink="/doclink/table-data">
            <Input name="editDisabled" value="true"/>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Commons defs -->
      <!-- ================================================================= -->

      <ObjectView type="Column">
         <DataView id="vertica-column-statistics" icon="Statistics" label="Statistics" viewer="grid">
            <Command idref="vertica.getColumnAnalyticStats">
               <Input name="objectname" value="${objectname}"/>
               <Input name="theTableName" value="${theTableName}"/>
            </Command>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- DBA Dedicated-Query View and Skew View Related -->
      <!-- ================================================================= -->

      <!-- This View needs a better type (better icon) and also the command used to populate it
           and create the necessary views needs to be polished up to only aggregate columns from
           a single oid instead of column names (that is, at the moment it is doing the error
           analysis on all columns having the same name, regardless of whether they are from the
           same table -->
      <ObjectView type="Transactions">
         <DataView id="vertica-transactions-histogram" icon="Histogram" label="Histogram Error" viewer="grid">
            <Command idref="vertica.queryPHEH"/>
         </DataView>
      </ObjectView>

      <ObjectView type="RecentQueries">
         <DataView id="vertica-recentqueries-recentqueries" icon="RecentQueries" label="Recent Queries" viewer="grid">
            <Command idref="vertica.getRecentQueries"/>
         </DataView>
         <DataView id="vertica-recentqueries-longqueries" icon="LongQueries" label="Long Queries" viewer="grid">
            <Command idref="vertica.getRecentLongQueries"/>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Projection Related -->
      <!-- ================================================================= -->

      <ObjectView type="ProjectionsSchema">
         <DataView id="vertica-projectionsschema-projections" icon="Projections" label="Projections" viewer="grid">
            <Command idref="vertica.getProjectionsForSchema">
               <Input name="schema" value="${schema}"/>
            </Command>
         </DataView>
         <DataView id="vertica-projectionsschema-storage" icon="Storage" label="Storage" viewer="grid">
            <Command idref="vertica.getProjectionsStorageForSchema">
               <Input name="schema" value="${schema}"/>
            </Command>
         </DataView>
         <DataView id="vertica-projectionsschema-activity" icon="SystemStatistics" label="Activity" viewer="grid">
            <Command idref="vertica.getProjectionsActivityForSchema">
               <Input name="schema" value="${schema}"/>
            </Command>
         </DataView>
         <DataView id="vertica-projectionsschema-refreshes" icon="SystemStatistics" label="Refreshes" viewer="grid">
            <Command idref="vertica.getProjectionsRefreshesForSchema">
               <Input name="schema" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="ProjectionsTable">
         <DataView id="vertica-projectionstable-projections" icon="Projections" label="Projections" viewer="grid">
            <Command idref="vertica.getProjectionsForTable">
               <Input name="schema" value="${schema}"/>
               <Input name="tableName" value="${theTableName}"/>
               <Input name="columnName" value="${theColumnName}"/>
            </Command>
         </DataView>
      </ObjectView>

      <!-- Sub def of the Projection type view -->
      <ObjectView type="Projection">
         <DataView id="vertica-projection-projectioncolumns" icon="Columns" label="Columns" viewer="grid">
            <Command idref="vertica.getProjectionColumnsForTable">
               <Input name="projectionId" value="${theProjectionId}"/>
            </Command>
         </DataView>
         <DataView id="vertica-projection-data" icon="Data" label="Data" viewer="table-data" doclink="/doclink/table-data"/>
         <DataView id="vertica-projection-projectionstorage" icon="Storage" label="Storage" viewer="form">
            <Command idref="vertica.getProjectionStorage">
               <Input name="projectionId" value="${theProjectionId}"/>
            </Command>
         </DataView>
         <DataView id="vertica-projection-projectionstoragecontainers" icon="Storage" label="Storage Containers" viewer="grid">
            <Command idref="vertica.getProjectionStorageContainers">
               <Input name="projectionId" value="${theProjectionId}"/>
            </Command>
         </DataView>
         <DataView id="vertica-projection-projectionpartitions" icon="Storage" label="Partitions" viewer="grid">
            <Command idref="vertica.getProjectionPartitions">
               <Input name="projectionId" value="${theProjectionId}"/>
            </Command>
         </DataView>
         <DataView id="vertica-projection-source" icon="Source" label="DDL" viewer="text">
            <Input name="dataColumn" value="export_objects"/>
            <Input name="formatSQL" value="false"/>
            <Command idref="vertica.getExportObject">
               <Input name="schema" value="${schema}"/>
               <Input name="name" value="${objectname}"/>
               <Input name="addKsafeFlag" value="false"/>
            </Command>
            <Message> <![CDATA[
				<html> This view shows the DDL produced by the Vertica "EXPORT_OBJECTS" command. </html> ]]>
            </Message>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Sequences Related -->
      <!-- ================================================================= -->

      <ObjectView type="Sequences">
         <DataView id="vertica-sequences-sequences" icon="Sequences" label="Sequences" viewer="grid">
            <Command idref="vertica.getSequences">
               <Input name="owner" value="${schema}"/>
               <Input name="name" value="%"/>
            </Command>
            <Input name="menuItem" value="Script: DROP SEQUENCE">
               <Input name="command" value="drop sequence ${schema||SEQUENCE_SCHEMA}${object||SEQUENCE_NAME}"/>
            </Input>
         </DataView>
      </ObjectView>

      <ObjectView type="Sequence">
         <DataView id="vertica-sequence-info" icon="Info" label="Info" viewer="node-form"/>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Functions (SQL) Related -->
      <!-- ================================================================= -->

      <ObjectView type="Functions">
         <DataView id="vertica-functions-functions" icon="Functions" label="Functions" viewer="grid">
            <Command idref="vertica.getSQLFunctions">
               <Input name="owner" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Function">
         <DataView id="vertica-function-functioneditor" icon="SourceEditor" label="Function Editor"
            viewer="procedure-editor"
            classargs="FUNCTION"
            doclink="/doclink/edit-code-object"/>
         <DataView id="vertica-function-info" icon="Info" label="Info" viewer="node-form"/>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Libraries Related -->
      <!-- ================================================================= -->

      <ObjectView type="Libraries">
         <DataView id="vertica-libraries-libraries" icon="Libraries" label="Libraries" viewer="grid">
            <Command idref="vertica.getLibraries">
               <Input name="owner" value="${schema}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Library">
         <DataView id="vertica-library-info" icon="Info" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="FactoryFunctions">
         <DataView id="vertica-factoryfunctions-functions" icon="Class" label="Factory Functions" viewer="grid">
            <Command idref="vertica.getLibraryManifest">
               <Input name="library" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="FactoryFunction">
         <DataView id="vertica-factoryfunction-info" icon="Info" label="Info" viewer="node-form"/>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- UDX Related -->
      <!-- ================================================================= -->

      <ObjectView type="UDX">
         <DataView id="vertica-udx-list" icon="UDX" label="User Defined Extensions" viewer="grid">
            <Command idref="vertica.getAllUDX"/>
         </DataView>
      </ObjectView>

      <ObjectView type="UDXAggregates">
         <DataView id="vertica-udxaggregates-list" icon="UDXAggregates" label="Aggregates" viewer="grid">
            <Command idref="vertica.getUDX">
               <Input name="type" value="'User Defined Aggregate'"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="UDXAggregate">
         <DataView id="vertica-udxaggregate-info" icon="Info" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="UDXAnalytics">
         <DataView id="vertica-udxanalytics-list" icon="UDXAggregate" label="Analytics" viewer="grid">
            <Command idref="vertica.getUDX">
               <Input name="type" value="'User Defined Analytic'"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="UDXAnalytic">
         <DataView id="vertica-udxanalytic-info" icon="Info" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="UDXFilters">
         <DataView id="vertica-udxfilters-list" icon="UDXAnalytic" label="Filters" viewer="grid">
            <Command idref="vertica.getUDX">
               <Input name="type" value="'User Defined Filter'"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="UDXFilter">
         <DataView id="vertica-udxfilter-info" icon="UDXFilter" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="UDXFunctions">
         <DataView id="vertica-udxfunctions-list" icon="UDXFunctions" label="Functions" viewer="grid">
            <Command idref="vertica.getUDX">
               <Input name="type" value="'User Defined Function'"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="UDXFunction">
         <DataView id="vertica-udxfunction-info" icon="UDXFunction" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="UDXParsers">
         <DataView id="vertica-udxparsers-list" icon="UDXParsers" label="Parsers" viewer="grid">
            <Command idref="vertica.getUDX">
               <Input name="type" value="'User Defined Parser'"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="UDXParser">
         <DataView id="vertica-udxparser-info" icon="UDXParser" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="UDXSources">
         <DataView id="vertica-udxsources-list" icon="UDXSources" label="Sources" viewer="grid">
            <Command idref="vertica.getUDX">
               <Input name="type" value="'User Defined Source'"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="UDXSource">
         <DataView id="vertica-udxsource-info" icon="UDXSource" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="UDXTransforms">
         <DataView id="vertica-udxtransforms-list" icon="UDXTransforms" label="Transforms" viewer="grid">
            <Command idref="vertica.getUDX">
               <Input name="type" value="'User Defined Transform'"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="UDXTransform">
         <DataView id="vertica-udxtransform-info" icon="UDXTransform" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="UDXOthers">
         <DataView id="vertica-udxothers-list" icon="UDXOthers" label="Other" viewer="grid">
            <Command idref="vertica.getUDOther"/>
         </DataView>
      </ObjectView>

      <ObjectView type="UDXOther">
         <DataView id="vertica-udxother-info" icon="UDXOther" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="Procedures">
         <DataView id="generic-procedures-procedures" drop-on-condition="always"/>

         <DataView id="vertica-procedures-procedures" icon="Procedures" label="Procedures" viewer="grid">
            <Command idref="vertica.getProcedures">
               <Input name="schema" value="${schema}"/>
               <Input name="objectname" value="%"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Procedure">
         <DataView id="generic-procedure-columns" drop-on-condition="always"/>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Database instances related -->
      <!-- ================================================================= -->

      <ObjectView type="Databases">
         <DataView id="vertica-databases-databases" icon="Databases" label="Databases" viewer="grid">
            <Command idref="vertica.getDatabases"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Database">
         <DataView id="vertica-database-database" icon="Database" label="Info" viewer="node-form"/>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- User related -->
      <!-- ================================================================= -->

      <ObjectView type="Users">
         <DataView id="vertica-users-users" icon="Users" label="Users" viewer="grid">
            <Command idref="vertica.getUsers"/>
         </DataView>
      </ObjectView>

      <ObjectView type="User">
         <DataView id="vertica-user-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="vertica-user-passwords" icon="Password" label="Passwords" viewer="grid">
            <Command idref="vertica.getUserPasswords">
               <Input name="user_name" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>

      <ObjectView type="Roles">
         <DataView id="vertica-roles-roles" icon="Groups" label="Roles" viewer="grid">
            <Command idref="vertica.getRoles"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Profiles">
         <DataView id="vertica-profiles-profiles" icon="Profiles" label="Profiles" viewer="grid">
            <Command idref="vertica.getProfiles"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Profile">
         <DataView id="vertica-profile-info" icon="Info" label="Info" viewer="node-form"/>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Various -->
      <!-- ================================================================= -->

      <ObjectView type="System">
         <DataView id="vertica-system-system" icon="Info" label="System" viewer="form">
            <Command idref="vertica.getSystem"/>
            <Message>
               <![CDATA[
<html>Monitors the overall state of the database.</html>
               ]]>
            </Message>
         </DataView>
         <DataView id="vertica-system-session-settings" icon="Settings" label="Session Settings" viewer="grid">
            <Command idref="vertica.getSessionSettings"/>
            <Message>
               <![CDATA[
<html>Run-time settings for this session.</html>
               ]]>
            </Message>
         </DataView>
         <DataView id="vertica-system-system-settings" icon="Settings" label="System Settings" viewer="grid">
            <Command idref="vertica.getSettings"/>
            <Message>
            <![CDATA[
<html>Configuration parameters currently in use by the system.</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="Sessions">
         <DataView id="vertica-sessions-sessions" icon="Sessions" label="Sessions" viewer="grid">
            <Command idref="vertica.getSessions"/>
            <Input name="menuItem" value="Script: KILL SESSION">
               <Input name="command" value="SELECT close_session('${object||Session Id||||nq}')"/>
            </Input>
         </DataView>
      </ObjectView>

      <ObjectView type="Session">
         <DataView id="vertica-session-info" icon="Session" label="Info" viewer="node-form"/>
      </ObjectView>

      <ObjectView type="Locks">
         <DataView id="vertica-locks-locks" icon="Locks" label="Locks" viewer="grid">
            <Command idref="vertica.getLocks"/>
         </DataView>
      </ObjectView>

      <ObjectView type="License">
         <DataView id="vertica-license-licenses" icon="License" label="Licenses" viewer="grid">
            <Command idref="vertica.getLicenses"/>
            <Message>
               <![CDATA[
<html>
For all licenses, provides information information on license types, the dates
for which licenses are valid, and the limits the licenses impose.
</html>
               ]]>
            </Message>
         </DataView>
         <DataView id="vertica-license-licenseaudits" icon="Audit" label="License Audits" viewer="grid">
            <Command idref="vertica.getLicenseAudits"/>
            <Message>
               <![CDATA[
<html>
Lists the results of HP Vertica's license automatic compliance audits.
</html>
               ]]>
            </Message>
         </DataView>
         <DataView id="vertica-license-licensecompliancestatus" icon="LicenseCheck" label="License Compliance" viewer="text">
            <Command idref="vertica.getLicenseComplianceStatus"/>
            <Message>
               <![CDATA[
<html>
Displays whether your database is in compliance with your HP Vertica license agreement.
This information includes the results of HP Vertica's most recent audit of the
database size (if your license has a data allowance as part of its terms), and
the license term (if your license has an end date).
</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="Streams">
         <DataView id="vertica-streams-loadstreams" icon="Streams" label="Load Streams" viewer="grid">
            <Command idref="vertica.getLoadStreams"/>
            <Message>
               <![CDATA[
<html>
Monitors active and historical load metrics for load streams on each node.
This is useful for obtaining statistics about how many records got loaded and
rejected from the previous load. HP Vertica maintains system table metrics until
they reach a designated size quota (in kilobytes). The quota is set through internal
processes and cannot be set or viewed directly.
</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <ObjectView type="TupleMover">
         <DataView id="vertica-tuplemover-tuplemoveroperations" icon="TupleMover" label="Tuple Mover Operations" viewer="grid">
            <Command idref="vertica.getTupleMoverOperations"/>
         </DataView>
      </ObjectView>

      <ObjectView type="TuningRecommendations">
         <DataView id="vertica-tuningrecommendations-tuningrecommendations" icon="TuningRecommendations" label="Tuning Recommendations" viewer="grid">
            <Command idref="vertica.getTuningRecommendations"/>
            <Message>
               <![CDATA[
<html>
Shows the tuning recommendation results from the last ANALYZE_WORKLOAD() call.
This information is useful for letting you build filters on the Workload Analyzer result set.
</html>
               ]]>
            </Message>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Nodes Related -->
      <!-- ================================================================= -->

      <ObjectView type="Nodes">
         <DataView id="vertica-nodes-nodes" icon="Nodes" label="Nodes" viewer="grid">
            <Command idref="vertica.getNodes"/>
         </DataView>
      </ObjectView>

      <ObjectView type="Node">
         <DataView id="vertica-node-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="vertica-node-hostresource" icon="Node" label="Host Resources" viewer="form">
            <Command idref="vertica.getHostResources">
               <Input name="host_name" value="${hostname}"/>
            </Command>
         </DataView>
         <DataView id="vertica-node-noderesources" icon="Node" label="Node Resources" viewer="form">
            <Command idref="vertica.getNodeResources">
               <Input name="node_name" value="${objectname}"/>
            </Command>
         </DataView>
         <DataView id="vertica-node-noderesourceusage" icon="Usage" label="Node Resource Usage" viewer="form">
            <Command idref="vertica.getNodeResourceUsage">
               <Input name="node_name" value="${objectname}"/>
            </Command>
         </DataView>
         <DataView id="vertica-node-diskresourcerejetions" icon="Warnings" label="Disk Resource Rejections" viewer="grid">
            <Command idref="vertica.getNodeDiskResourceRejections">
               <Input name="node_name" value="${objectname}"/>
            </Command>
         </DataView>
         <DataView id="vertica-node-diskstorage" icon="Storage" label="Disk Storage" viewer="grid">
            <Command idref="vertica.getNodeDiskStorage">
               <Input name="node_name" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>

      <!-- ================================================================= -->
      <!-- Resource Pool Related -->
      <!-- ================================================================= -->

      <ObjectView type="SchedulerJobs">
         <DataView id="vertica-schedulerjobs-resourcepools" icon="SchedulerJobs" label="Resource Pools" viewer="grid">
            <Command idref="vertica.getResourcePools"/>
         </DataView>
      </ObjectView>

      <ObjectView type="SchedulerJob">
         <DataView id="vertica-schedulerjob-info" icon="Info" label="Info" viewer="node-form"/>
         <DataView id="vertica-schedulerjob-status" icon="SchedulerJob" label="Status" viewer="form">
            <Command idref="vertica.getResourcePoolStatus">
               <Input name="pool_name" value="${objectname}"/>
            </Command>
         </DataView>
         <DataView id="vertica-schedulerjob-queues" icon="SchedulerJob" label="Queues" viewer="grid">
            <Command idref="vertica.getResourcePoolQueues">
               <Input name="pool_name" value="${objectname}"/>
            </Command>
         </DataView>
         <DataView id="vertica-schedulerjob-rejections" icon="Warnings" label="Rejections" viewer="grid">
            <Command idref="vertica.getResourcePoolRejections">
               <Input name="pool_name" value="${objectname}"/>
            </Command>
         </DataView>
      </ObjectView>

   </ObjectsViewDef>

</DatabaseProfile>
