| 
									
										
										
										
											2020-07-22 19:39:58 -07:00
										 |  |  | -- create metadata aspect table
 | 
					
						
							| 
									
										
										
										
											2021-06-03 13:24:33 -07:00
										 |  |  | create table metadata_aspect_v2 (
 | 
					
						
							| 
									
										
										
										
											2020-07-22 19:39:58 -07:00
										 |  |  |   urn                           varchar(500) not null,
 | 
					
						
							|  |  |  |   aspect                        varchar(200) not null,
 | 
					
						
							|  |  |  |   version                       bigint(20) not null,
 | 
					
						
							|  |  |  |   metadata                      longtext not null,
 | 
					
						
							| 
									
										
										
										
											2021-06-03 13:24:33 -07:00
										 |  |  |   systemmetadata                longtext,
 | 
					
						
							| 
									
										
										
										
											2020-07-22 19:39:58 -07:00
										 |  |  |   createdon                     datetime(6) not null,
 | 
					
						
							|  |  |  |   createdby                     varchar(255) not null,
 | 
					
						
							|  |  |  |   createdfor                    varchar(255),
 | 
					
						
							| 
									
										
										
										
											2021-06-23 13:49:49 -07:00
										 |  |  |   constraint pk_metadata_aspect_v2 primary key (urn,aspect,version)
 | 
					
						
							| 
									
										
										
										
											2020-07-22 19:39:58 -07:00
										 |  |  | );
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2022-12-02 09:13:47 +00:00
										 |  |  | create index timeIndex ON metadata_aspect_v2 (createdon);
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-06-03 13:24:33 -07:00
										 |  |  | insert into metadata_aspect_v2 (urn, aspect, version, metadata, createdon, createdby) values(
 | 
					
						
							| 
									
										
										
										
											2020-07-22 19:39:58 -07:00
										 |  |  |   'urn:li:corpuser:datahub',
 | 
					
						
							| 
									
										
										
										
											2021-06-03 13:24:33 -07:00
										 |  |  |   'corpUserInfo',
 | 
					
						
							| 
									
										
										
										
											2020-07-22 19:39:58 -07:00
										 |  |  |   0,
 | 
					
						
							|  |  |  |   '{"displayName":"Data Hub","active":true,"fullName":"Data Hub","email":"datahub@linkedin.com"}',
 | 
					
						
							|  |  |  |   now(),
 | 
					
						
							| 
									
										
										
										
											2021-09-28 16:30:49 -07:00
										 |  |  |   'urn:li:corpuser:__datahub_system'
 | 
					
						
							| 
									
										
										
										
											2020-07-22 19:39:58 -07:00
										 |  |  | ), (
 | 
					
						
							|  |  |  |   'urn:li:corpuser:datahub',
 | 
					
						
							| 
									
										
										
										
											2021-06-03 13:24:33 -07:00
										 |  |  |   'corpUserEditableInfo',
 | 
					
						
							| 
									
										
										
										
											2020-07-22 19:39:58 -07:00
										 |  |  |   0,
 | 
					
						
							| 
									
										
										
										
											2022-04-04 21:39:30 +02:00
										 |  |  |   '{"skills":[],"teams":[],"pictureLink":"https://raw.githubusercontent.com/datahub-project/datahub/master/datahub-web-react/src/images/default_avatar.png"}',
 | 
					
						
							| 
									
										
										
										
											2020-07-22 19:39:58 -07:00
										 |  |  |   now(),
 | 
					
						
							| 
									
										
										
										
											2021-09-28 16:30:49 -07:00
										 |  |  |   'urn:li:corpuser:__datahub_system'
 | 
					
						
							| 
									
										
										
										
											2021-08-24 21:40:39 -07:00
										 |  |  | );
 |