mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-12 01:08:18 +00:00
Fix E2E Vertica & System Metric (#11525)
This commit is contained in:
parent
cefce47ca4
commit
f7a0d3f5f2
@ -28,19 +28,16 @@ import textwrap
|
|||||||
# v_catalog.comments with v_catalog.columns.
|
# v_catalog.comments with v_catalog.columns.
|
||||||
VERTICA_GET_COLUMNS = textwrap.dedent(
|
VERTICA_GET_COLUMNS = textwrap.dedent(
|
||||||
"""
|
"""
|
||||||
WITH
|
WITH column_projection as (
|
||||||
column_projection as
|
SELECT
|
||||||
(SELECT
|
column_id,
|
||||||
column_name,
|
|
||||||
data_type,
|
|
||||||
column_default,
|
|
||||||
is_nullable,
|
|
||||||
table_name,
|
|
||||||
table_schema,
|
|
||||||
proj.projection_name
|
proj.projection_name
|
||||||
FROM v_catalog.columns col,
|
FROM v_catalog.columns col,
|
||||||
v_catalog.projections proj
|
v_catalog.projections proj
|
||||||
where proj.projection_id in (select
|
where lower(table_name) = '{table}'
|
||||||
|
AND {schema_condition}
|
||||||
|
AND proj.projection_id in (
|
||||||
|
select
|
||||||
min(projection_id)
|
min(projection_id)
|
||||||
from v_catalog.projections sub_proj
|
from v_catalog.projections sub_proj
|
||||||
where col.table_id=sub_proj.anchor_table_id
|
where col.table_id=sub_proj.anchor_table_id
|
||||||
@ -50,11 +47,17 @@ VERTICA_GET_COLUMNS = textwrap.dedent(
|
|||||||
data_type,
|
data_type,
|
||||||
column_default,
|
column_default,
|
||||||
is_nullable,
|
is_nullable,
|
||||||
comment from column_projection col
|
comment
|
||||||
LEFT JOIN v_catalog.comments com
|
from
|
||||||
ON com.object_type = 'COLUMN'
|
v_catalog.columns col
|
||||||
AND com.object_name = CONCAT(CONCAT(col.projection_name,'.'),col.column_name)
|
LEFT JOIN column_projection proj ON proj.column_id = col.column_id
|
||||||
WHERE lower(table_name) = '{table}'
|
LEFT JOIN v_catalog.comments com ON com.object_type = 'COLUMN'
|
||||||
|
AND com.object_name = CONCAT(
|
||||||
|
CONCAT(proj.projection_name, '.'),
|
||||||
|
col.column_name
|
||||||
|
)
|
||||||
|
WHERE
|
||||||
|
lower(table_name) = '{table}'
|
||||||
AND {schema_condition}
|
AND {schema_condition}
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
"""
|
"""
|
||||||
Test database connectors with CLI
|
Test database connectors with CLI
|
||||||
"""
|
"""
|
||||||
|
import time
|
||||||
from abc import abstractmethod
|
from abc import abstractmethod
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
@ -224,6 +225,9 @@ class CliDBBase(TestCase):
|
|||||||
)
|
)
|
||||||
self.delete_table_rows()
|
self.delete_table_rows()
|
||||||
self.update_table_row()
|
self.update_table_row()
|
||||||
|
# Add 10 second delay for system
|
||||||
|
# tables to register the change
|
||||||
|
time.sleep(10)
|
||||||
result = self.run_command("profile")
|
result = self.run_command("profile")
|
||||||
sink_status, source_status = self.retrieve_statuses(result)
|
sink_status, source_status = self.retrieve_statuses(result)
|
||||||
self.assert_for_system_metrics(source_status, sink_status)
|
self.assert_for_system_metrics(source_status, sink_status)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user