2022-07-27 21:14:01 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# Adding user metadata in DataHub
  
						 
					
						
							
								
									
										
										
										
											2021-12-10 11:02:09 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								This guide shares how you can add user metadata in DataHub. Usually you would want to use one of our sources for ingesting user metadata. But if there is no connector for your use case then you would want to use this guide.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								:::note
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-07-27 21:14:01 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								This does not allow you to add new users for Authentication. If you want to add a new user in DataHub for Login please refer to [Adding Users to DataHub ](../authentication/guides/add-users.md )
							 
						 
					
						
							
								
									
										
										
										
											2021-12-10 11:02:09 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								:::
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								You can look at all aspects supported for users in [CorpUserAspect ](../../metadata-models/src/main/pegasus/com/linkedin/metadata/aspect/CorpUserAspect.pdl )
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Using File-Based Ingestion Recipe
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Define a JSON File containing your user
							 
						 
					
						
							
								
									
										
										
										
											2025-04-16 16:55:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2021-12-10 11:02:09 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								```my-user.json
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        "auditHeader": null,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        "proposedSnapshot": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            "com.linkedin.pegasus2avro.metadata.snapshot.CorpUserSnapshot": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                "urn": "urn:li:corpuser:aseem.bansal",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                "aspects": [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        "com.linkedin.pegasus2avro.identity.CorpUserInfo": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "active": true,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "displayName": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                "string": "Aseem Bansal"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            },
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "email": "aseem+examples@acryl .io",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "title": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                "string": "Software Engineer"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            },
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "managerUrn": null,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "departmentId": null,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "departmentName": null,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "firstName": null,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "lastName": null,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "fullName": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                                "string": "Aseem Bansal"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            },
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                            "countryCode": null
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                        }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-28 23:34:33 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Define an [ingestion recipe ](https://docs.datahub.com/docs/metadata-ingestion/#recipes )
							 
						 
					
						
							
								
									
										
										
										
											2021-12-10 11:02:09 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								---
							 
						 
					
						
							
								
									
										
										
										
											2025-04-28 23:34:33 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# see https://docs.datahub.com/docs/generated/ingestion/sources/file for complete documentation
  
						 
					
						
							
								
									
										
										
										
											2021-12-10 11:02:09 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								source:
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  type: "file"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  config:
							 
						 
					
						
							
								
									
										
										
										
											2023-10-04 14:06:03 +05:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    path: "./my-user.json"
							 
						 
					
						
							
								
									
										
										
										
											2021-12-10 11:02:09 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-28 23:34:33 +09:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# see https://docs.datahub.com/docs/metadata-ingestion/sink_docs/datahub for complete documentation
  
						 
					
						
							
								
									
										
										
										
											2021-12-10 11:02:09 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								sink:
							 
						 
					
						
							
								
									
										
										
										
											2025-04-16 16:55:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								  ...
							 
						 
					
						
							
								
									
										
										
										
											2021-12-10 11:02:09 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Use [DataHub CLI ](../cli.md ) to do the ingestion.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								## Using Rest.li API
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								curl 'http://localhost:8080/entities?action=ingest' -X POST --data '{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									"entity": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										"value": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											"com.linkedin.metadata.snapshot.CorpUserSnapshot": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												"urn": "urn:li:corpuser:aseem.bansal",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												"aspects": [{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													"com.linkedin.identity.CorpUserInfo": {
							 
						 
					
						
							
								
									
										
										
										
											2025-04-16 16:55:51 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                        "active": true,
							 
						 
					
						
							
								
									
										
										
										
											2021-12-10 11:02:09 +05:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
														"displayName": "Aseem Bansal",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														"email": "aseem+example@acryl .io",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														"title": "Software Engineer",
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														"fullName": "Aseem Bansal"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												}]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}'
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```