mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-29 09:42:23 +00:00
parent
bbc450b2d1
commit
35d8c2a25c
@ -28,20 +28,6 @@ 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 column_projection as (
|
|
||||||
SELECT
|
|
||||||
column_id,
|
|
||||||
proj.projection_name
|
|
||||||
FROM v_catalog.columns col,
|
|
||||||
v_catalog.projections proj
|
|
||||||
where lower(table_name) = '{table}'
|
|
||||||
AND {schema_condition}
|
|
||||||
AND proj.projection_id in (
|
|
||||||
select
|
|
||||||
min(projection_id)
|
|
||||||
from v_catalog.projections sub_proj
|
|
||||||
where col.table_id=sub_proj.anchor_table_id
|
|
||||||
))
|
|
||||||
select
|
select
|
||||||
column_name,
|
column_name,
|
||||||
data_type,
|
data_type,
|
||||||
@ -50,12 +36,11 @@ VERTICA_GET_COLUMNS = textwrap.dedent(
|
|||||||
comment
|
comment
|
||||||
from
|
from
|
||||||
v_catalog.columns col
|
v_catalog.columns col
|
||||||
LEFT JOIN column_projection proj ON proj.column_id = col.column_id
|
LEFT JOIN v_catalog.comments cm
|
||||||
LEFT JOIN v_catalog.comments com ON com.object_type = 'COLUMN'
|
ON col.table_schema = cm.object_schema
|
||||||
AND com.object_name = CONCAT(
|
AND col.table_name = cm.object_name
|
||||||
CONCAT(proj.projection_name, '.'),
|
AND col.column_name = cm.child_object
|
||||||
col.column_name
|
AND cm.object_type = 'COLUMN'
|
||||||
)
|
|
||||||
WHERE
|
WHERE
|
||||||
lower(table_name) = '{table}'
|
lower(table_name) = '{table}'
|
||||||
AND {schema_condition}
|
AND {schema_condition}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user