mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-31 02:37:05 +00:00 
			
		
		
		
	fix(ingest/snowflake): set platform instance for foreign keys (#9577)
This commit is contained in:
		
							parent
							
								
									aa28837eed
								
							
						
					
					
						commit
						e3f2c52d7e
					
				| @ -13,7 +13,6 @@ from snowflake.connector import SnowflakeConnection | ||||
| from datahub.configuration.pattern_utils import is_schema_allowed | ||||
| from datahub.emitter.mce_builder import ( | ||||
|     make_data_platform_urn, | ||||
|     make_dataset_urn, | ||||
|     make_dataset_urn_with_platform_instance, | ||||
|     make_schema_field_urn, | ||||
|     make_tag_urn, | ||||
| @ -1237,12 +1236,13 @@ class SnowflakeV2Source( | ||||
|     ) -> List[ForeignKeyConstraint]: | ||||
|         foreign_keys = [] | ||||
|         for fk in table.foreign_keys: | ||||
|             foreign_dataset = make_dataset_urn( | ||||
|                 self.platform, | ||||
|                 self.get_dataset_identifier( | ||||
|             foreign_dataset = make_dataset_urn_with_platform_instance( | ||||
|                 platform=self.platform, | ||||
|                 name=self.get_dataset_identifier( | ||||
|                     fk.referred_table, fk.referred_schema, fk.referred_database | ||||
|                 ), | ||||
|                 self.config.env, | ||||
|                 env=self.config.env, | ||||
|                 platform_instance=self.config.platform_instance, | ||||
|             ) | ||||
|             foreign_keys.append( | ||||
|                 ForeignKeyConstraint( | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Harshal Sheth
						Harshal Sheth