Skip to content

List Entities

NOTE: The list command will eventually be entirely replaced by get enola:/

enola list will retrieve a list of entities from connectors.

List Kinds

Because Entity Kinds are Entities themselves, you can also list them like this, with details:

$ ./enola list --model file:docs/use/library/model.yaml --format=yaml enola.entity_kind
id:
  ns: enola
  entity: entity_kind
  paths: [demo.book]
ts: 1970-01-01T00:00:01.000000001Z
data:
  schema:
    '@type': type.googleapis.com/dev.enola.core.meta.EntityKind
    id: {}
    label: Book (Copy)
    emoji: 📖
    related:
      library:
        id: {}
      kind:
        id: {}

id:
  ns: enola
  entity: entity_kind
  paths: [demo.book_kind]
ts: 1970-01-01T00:00:01.000000001Z
data:
  schema:
    '@type': type.googleapis.com/dev.enola.core.meta.EntityKind
    id: {}
    label: Book (Kind)
    emoji: 📗
    link:
      google: {label: Google Book Search, uriTemplate: 'https://www.google.com/search?tbm=bks&q=isbn:{path.isbn}'}

id:
  ns: enola
  entity: entity_kind
  paths: [demo.library]
ts: 1970-01-01T00:00:01.000000001Z
data:
  schema:
    '@type': type.googleapis.com/dev.enola.core.meta.EntityKind
    id: {}
    label: Library
    emoji: 📚

id:
  ns: enola
  entity: entity_kind
  paths: [enola.entity_kind]
ts: 1970-01-01T00:00:01.000000001Z
data:
  schema:
    '@type': type.googleapis.com/dev.enola.core.meta.EntityKind
    id: {}
    label: Enola.dev Entity Kind
    emoji: 🕵🏾‍♀️
    docUrl: https://docs.enola.dev/concepts/core-arch/
    data:
      schema: {label: Model, typeUrl: type.googleapis.com/dev.enola.core.meta.EntityKind}
    connectors:
    - {javaClass: dev.enola.core.meta.EntityKindAspect}

id:
  ns: enola
  entity: entity_kind
  paths: [enola.schema]
ts: 1970-01-01T00:00:01.000000001Z
data:
  schema:
    '@type': type.googleapis.com/dev.enola.core.meta.EntityKind
    id: {}
    label: Schema (Proto) used in Enola Entity Data
    emoji: 💠
    docUrl: https://docs.enola.dev/use/connector/#grpc
    data:
      proto: {label: Protocol Buffer Descriptor (Proto), description: This is the
          Proto ('Schema') for the 'Any' fields in the 'data' of a Connector.}
    connectors:
    - {javaClass: dev.enola.core.meta.SchemaAspect}

List Built-In Kinds

Note how the section above showed some additional entity kinds, in addition to those from the example. It’s possible to list only those built-in entity kinds, using an “empty” model URI, like this:

$ ./enola list --model "empty:?mediaType=application/json" enola.entity_kind
id:
  ns: enola
  entity: entity_kind
  paths: [enola.entity_kind]
ts: 1970-01-01T00:00:01.000000001Z
data:
  schema:
    '@type': type.googleapis.com/dev.enola.core.meta.EntityKind
    id: {}
    label: Enola.dev Entity Kind
    emoji: 🕵🏾‍♀️
    docUrl: https://docs.enola.dev/concepts/core-arch/
    data:
      schema: {label: Model, typeUrl: type.googleapis.com/dev.enola.core.meta.EntityKind}
    connectors:
    - {javaClass: dev.enola.core.meta.EntityKindAspect}

id:
  ns: enola
  entity: entity_kind
  paths: [enola.schema]
ts: 1970-01-01T00:00:01.000000001Z
data:
  schema:
    '@type': type.googleapis.com/dev.enola.core.meta.EntityKind
    id: {}
    label: Schema (Proto) used in Enola Entity Data
    emoji: 💠
    docUrl: https://docs.enola.dev/use/connector/#grpc
    data:
      proto: {label: Protocol Buffer Descriptor (Proto), description: This is the
          Proto ('Schema') for the 'Any' fields in the 'data' of a Connector.}
    connectors:
    - {javaClass: dev.enola.core.meta.SchemaAspect}

To get a list of only the names of Entity Kinds, just use e.g. yq.

The enola.schema kind listed above is explained in the Schema section.

Screencast (Asciinema)

Demo