mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-22 14:24:35 +00:00
[Snowflake] Handle cases when stream source is not retrievable (#23245)
(cherry picked from commit d926ed9dad2f500dd3bd3607aa00d09d39014ae3)
This commit is contained in:
parent
8cee06f583
commit
dc17db921b
@ -898,6 +898,8 @@ class SnowflakeSource(
|
||||
"""
|
||||
Get columns of table/view/stream
|
||||
"""
|
||||
# For streams, we will use source table/view's columns
|
||||
# since stream does not define columns separately in Snowflake
|
||||
if table_type == TableType.Stream:
|
||||
cursor = self.connection.execute(
|
||||
SNOWFLAKE_GET_STREAM.format(stream_name=table_name, schema=schema_name)
|
||||
@ -906,6 +908,13 @@ class SnowflakeSource(
|
||||
result = cursor.fetchone()
|
||||
if result:
|
||||
table_name = result[6].split(".")[-1]
|
||||
# Can't fetch source of stream is source is dropped or no priviledge
|
||||
if table_name == "No privilege or table dropped":
|
||||
logger.debug(
|
||||
f"Couldn't fetch columns of stream [{result and result[1]}],"
|
||||
f" due to error on source: {table_name}. Result: {result}"
|
||||
)
|
||||
return []
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user