This document describes how to create custom Data Catalog entries. To integrate your custom data sources, call Data Catalog APIs that allow you to create and manage Data Catalog entries with custom data resource types. In this document, an entry for a custom data resource type is referred to as a "custom entry".
Create entry groups and custom entries
Custom entries must be placed within a user-created entry group. You create the entry group, then create the custom entry within the entry group. For more information, see Entries and entry groups.
After creating an entry, you can set IAM policies on the entry group to define who has access to the entry group and the entries inside.
Java
  
  
  
  
  
  
  
    
  
  
  
  
    
  
  
 
      
        
          Before trying this sample, follow the Java setup instructions in the
          Data Catalog quickstart using
            client libraries.
        
      
      
  For more information, see the
  Data Catalog Java API
    reference documentation.
  
     
      To authenticate to Data Catalog, set up Application Default Credentials.
      For more information, see
      
        Set up authentication for a local development environment.
      
    
Node.js
  
  
  
  
  
  
  
    
  
  
  
  
    
  
  
 
      
        
          Before trying this sample, follow the Node.js setup instructions in the
          Data Catalog quickstart using
            client libraries.
        
      
      
  For more information, see the
  Data Catalog Node.js API
    reference documentation.
  
     
      To authenticate to Data Catalog, set up Application Default Credentials.
      For more information, see
      
        Set up authentication for a local development environment.
      
    
Python
  
  
  
  
  
  
  
    
  
  
  
  
    
  
  
 
      
        
          Before trying this sample, follow the Python setup instructions in the
          Data Catalog quickstart using
            client libraries.
        
      
      
  For more information, see the
  Data Catalog Python API
    reference documentation.
  
     
      To authenticate to Data Catalog, set up Application Default Credentials.
      For more information, see
      
        Set up authentication for a local development environment.
      
    
REST & CMD LINE
  
  
  
    
  
 See the following examples and refer to the Data Catalog REST API
entryGroups.create
and
entryGroups.entries.create
documentation. 
  Before using any of the request data,
  make the following replacements:
 
  HTTP method and URL:
 
  Request JSON body:
 To send your request, expand one of these options: You should receive a JSON response similar to the following: 
  Before using any of the request data,
  make the following replacements:
 
  HTTP method and URL:
 
  Request JSON body:
 To send your request, expand one of these options: You should receive a JSON response similar to the following:REST
  
  
  
  
1. Create an entry group
  
  
  
    
    
  
  
  
    
  
  
POST https://datacatalog.googleapis.com/v1/projects/project-id/locations/region/entryGroups?entryGroupId=entryGroupId
{
  "displayName": "Entry Group display name"
}
{
  "name": "projects/my_projectid/locations/us-central1/entryGroups/my_entry_group",
  "displayName": "Entry Group display name",
  "dataCatalogTimestamps": {
    "createTime": "2019-10-19T16:35:50.135Z",
    "updateTime": "2019-10-19T16:35:50.135Z"
  }
}
2. Create a custom entry within the entry group
  
  
  
    
    
  
  
  
    
  
  
{ ...
  "schema": {
    "columns": [
      {
        "column": "first_name",
        "description": "First name",
        "mode": "REQUIRED",
        "type": "STRING"
      },
      {
        "column": "last_name",
        "description": "Last name",
        "mode": "REQUIRED",
        "type": "STRING"
      },
      {
        "column": "address",
        "description": "Address",
        "mode": "REPEATED",
        "subcolumns": [
          {
            "column": "city",
            "description": "City",
            "mode": "NULLABLE",
            "type": "STRING"
          },
          {
            "column": "state",
            "description": "State",
            "mode": "NULLABLE",
            "type": "STRING"
          }
        ],
        "type": "RECORD"
      }
    ]
  }
...
}
POST https://datacatalog.googleapis.com/v1/projects/project_id/locations/region/entryGroups/entryGroupId/entries?entryId=entryId
{
  "description": "Description",
  "displayName": "Display name",
  "userSpecifiedType": "my_type",
  "userSpecifiedSystem": "my_system",
  "linkedResource": "example.com/def",
  "schema": { schema }
}
{
  "name": "projects/my_project_id/locations/us-central1/entryGroups/my_entryGroup_id/entries/my_entry_id",
  "userSpecifiedType": "my-type",
  "userSpecifiedSystem": "my_system",
  "displayName": "On-prem entry",
  "description": "My entry description.",
  "schema": {
    "columns": [
      {
        "type": "STRING",
        "description": "First name",
        "mode": "REQUIRED",
        "column": "first_name"
      },
      {
        "type": "STRING",
        "description": "Last name",
        "mode": "REQUIRED",
        "column": "last_name"
      },
      {
        "type": "RECORD",
        "description": "Address",
        "mode": "REPEATED",
        "column": "address",
        "subcolumns": [
          {
            "type": "STRING",
            "description": "City",
            "mode": "NULLABLE",
            "column": "city"
          },
          {
            "type": "STRING",
            "description": "State",
            "mode": "NULLABLE",
            "column": "state"
          }
        ]
      }
    ]
  },
  "sourceSystemTimestamps": {
    "createTime": "2019-10-23T23:11:26.326Z",
    "updateTime": "2019-10-23T23:11:26.326Z"
  },
"linkedResource": "example.com/def"
}