mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 02:29:03 +00:00 
			
		
		
		
	
							parent
							
								
									73ac3b57a5
								
							
						
					
					
						commit
						ad7040e7cd
					
				| @ -454,10 +454,13 @@ class SampleDataSource(Source[Entity]): | |||||||
|         ) |         ) | ||||||
|         resp = self.metadata.list_entities(entity=User, limit=5) |         resp = self.metadata.list_entities(entity=User, limit=5) | ||||||
|         self.user_entity = resp.entities |         self.user_entity = resp.entities | ||||||
|  |         user_entity_len = min(len(self.user_entity), 5) | ||||||
|         for table in self.tables["tables"]: |         for table in self.tables["tables"]: | ||||||
|             try: |             try: | ||||||
|                 for sql_object in table["tableQueries"]: |                 for sql_object in table["tableQueries"]: | ||||||
|                     user_entity = self.user_entity[random.choice(range(5))] |                     user_entity = self.user_entity[ | ||||||
|  |                         random.choice(range(user_entity_len)) | ||||||
|  |                     ] | ||||||
|                     user_dict = { |                     user_dict = { | ||||||
|                         "id": user_entity.id.__root__, |                         "id": user_entity.id.__root__, | ||||||
|                         "name": user_entity.name.__root__, |                         "name": user_entity.name.__root__, | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Mayur Singal
						Mayur Singal