File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
src/datahub/ingestion/source/snowflake Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,9 @@ class SnowflakeColumnReference(PermissiveModel):
66
66
class SnowflakeObjectAccessEntry (PermissiveModel ):
67
67
columns : Optional [List [SnowflakeColumnReference ]]
68
68
objectDomain : str
69
- objectId : int
70
69
objectName : str
70
+ # Seems like it should never be null, but in practice have seen null objectIds
71
+ objectId : Optional [int ]
71
72
stageKind : Optional [str ]
72
73
73
74
Original file line number Diff line number Diff line change 11
11
SnowflakeCloudProvider ,
12
12
)
13
13
from datahub .ingestion .source .snowflake .snowflake_config import SnowflakeV2Config
14
+ from datahub .ingestion .source .snowflake .snowflake_usage_v2 import (
15
+ SnowflakeObjectAccessEntry ,
16
+ )
14
17
from datahub .ingestion .source .snowflake .snowflake_v2 import SnowflakeV2Source
15
18
16
19
@@ -546,3 +549,16 @@ def test_unknown_cloud_region_from_snowflake_region_id():
546
549
"somecloud_someregion"
547
550
)
548
551
assert "Unknown snowflake region" in str (e )
552
+
553
+
554
+ def test_snowflake_object_access_entry_missing_object_id ():
555
+ SnowflakeObjectAccessEntry (
556
+ ** {
557
+ "columns" : [
558
+ {"columnName" : "A" },
559
+ {"columnName" : "B" },
560
+ ],
561
+ "objectDomain" : "View" ,
562
+ "objectName" : "SOME.OBJECT.NAME" ,
563
+ }
564
+ )
You can’t perform that action at this time.
0 commit comments