"No key available" in Data Model design

I'm trying to create a relationship between two tables using 'Entity key' and 'Foreign key' field, but I'm unable to set the foreign key because the listbox is empty.

Below the first table

And the second table

Any ideia ?

Below information about the installed Metabase:

  "browser-info": {
    "language": "pt-BR",
    "platform": "Linux x86_64",
    "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36",
    "vendor": "Google Inc."
  "system-info": {
    "file.encoding": "UTF-8",
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.15+10",
    "java.vendor": "Eclipse Adoptium",
    "java.vendor.url": "https://adoptium.net/",
    "java.version": "11.0.15",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.15+10",
    "os.name": "Linux",
    "os.version": "5.4.0-120-generic",
    "user.language": "en",
    "user.timezone": "America/Sao_Paulo"
  "metabase-info": {
    "databases": [
    "hosting-env": "unknown",
    "application-database": "h2",
    "application-database-details": {
      "database": {
        "name": "H2",
        "version": "1.4.197 (2018-03-18)"
      "jdbc-driver": {
        "name": "H2 JDBC Driver",
        "version": "1.4.197 (2018-03-18)"
    "run-mode": "prod",
    "version": {
      "date": "2022-06-27",
      "tag": "v0.43.4",
      "branch": "release-x.43.x",
      "hash": "61cc28e"
    "settings": {
      "report-timezone": null

Hi @kleysonr
You need to change visibility, so it is included.
And migrate away from H2: https://www.metabase.com/docs/latest/operations-guide/migrating-from-h2.html

Hi @flamber,

Yes, changing the visibility worked :slight_smile:

But that's make no sense once the option 'Do not include' seems to be related only with the questions GUI.

Shouldn't the Data Model "see" the entity keys regardless the visibility configuration ?


@kleysonr https://github.com/metabase/metabase/issues/13129 - upvote by clicking :+1: on the first post