mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-25 02:04:39 +00:00
Modified snowflake view def query (#14994)
This commit is contained in:
parent
0d001c31d3
commit
131e5f5767
@ -120,13 +120,10 @@ def get_view_definition( # pylint: disable=unused-argument
|
|||||||
schema = schema or self.default_schema_name
|
schema = schema or self.default_schema_name
|
||||||
if schema:
|
if schema:
|
||||||
cursor = connection.execute(
|
cursor = connection.execute(
|
||||||
"SHOW /* sqlalchemy:get_view_definition */ VIEWS "
|
f"SELECT GET_DDL('VIEW','{schema}.{view_name}') AS \"text\""
|
||||||
f"LIKE '{view_name}' IN {schema}"
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
cursor = connection.execute(
|
cursor = connection.execute(f"SELECT GET_DDL('VIEW','{view_name}') AS \"text\"")
|
||||||
"SHOW /* sqlalchemy:get_view_definition */ VIEWS " f"LIKE '{view_name}'"
|
|
||||||
)
|
|
||||||
n2i = self.__class__._map_name_to_idx(cursor) # pylint: disable=protected-access
|
n2i = self.__class__._map_name_to_idx(cursor) # pylint: disable=protected-access
|
||||||
try:
|
try:
|
||||||
ret = cursor.fetchone()
|
ret = cursor.fetchone()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user