Create an Entity Using Gradle

You must create an entity before you can define the mappings between your source data and the publicly accessible data.

Before you begin

You need:


  1. Open a command-line window, and go to your project root directory.
  2. At your project root, run the Gradle task hubCreateEntity.
    ./gradlew hubCreateEntity -PentityName=your-entity-name -igradlew.bat hubCreateEntity -PentityName=your-entity-name -i
  3. Edit the new entity definition in your-project-root\entities\your-entity-name.entity.json.
    Warning: Avoid setting a range index on a property whose values will be unique for each record, such as the URI. Doing so would adversely affect the performance of Data Hub.