Define Default column name in Data Model

I’m not sure if this a bug or a feature request.
In the Data Model section you can define the names for the columns. I thought that was supposed to reflect in the questions results but it looks like that doesn’t work. I’m not sure if that’s the purpose of that field or if is used to something else.
Basically what would be nice to have is define this columns names in one place by default. For example for an Orders table “Id” could should as “Order Id” and I wouldn’t need to change that for every question.

Thanks!

{
  "browser-info": {
    "language": "en-US",
    "platform": "Win32",
    "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36",
    "vendor": "Google Inc."
  },
  "system-info": {
    "java.runtime.name": "OpenJDK Runtime Environment",
    "java.runtime.version": "11.0.4+11",
    "java.vendor": "AdoptOpenJDK",
    "java.vendor.url": "https://adoptopenjdk.net/",
    "java.version": "11.0.4",
    "java.vm.name": "OpenJDK 64-Bit Server VM",
    "java.vm.version": "11.0.4+11",
    "os.name": "Linux",
    "os.version": "4.14.138-89.102.amzn1.x86_64",
    "user.language": "en",
    "user.timezone": "GMT"
  },
  "metabase-info": {
    "databases": [
      "h2",
      "sqlserver"
    ],
    "hosting-env": "elastic-beanstalk",
    "application-database": "postgres",
    "run-mode": "prod",
    "version": {
      "date": "2019-09-20",
      "tag": "v0.33.3",
      "branch": "release-0.33.x",
      "hash": "86d32bf"
    },
    "settings": {
      "report-timezone": "US/Pacific"
    }
  }
}

Hi @fera320
That's how it works - the name you define in Data Model is used when creating non-Native questions.
There's a few issues with some cache that doesn't update correctly, so after changing the names in Data Model, you might need to refresh the browser to see them reflected when creating questions.
Here's the Sample Dataset, where I have changed column names:

By the way, latest release is 0.33.4

Oh ok, is not working for me on 0.33.3. I didn’t see that fix on the release notes so I guess that got fixed on the latest.

@fera320 I’m fairly sure it also worked on 0.33.3, so I’m not sure what’s going on with your setup, if it doesn’t work.

Found the issue. It doesn’t work for Native query questions.
Also it doesn’t gets the default value when using nested questions. I know this last one might be more challenging but that’s how we build most of our questions.

@fera320 Okay. When creating Native question (SQL), then you are in full control over column names and types, so Metabase does not inject anything there.
As for Nested questions, I don’t think I understand. If the Nested question is based on a Native question, then it’ll use the column names you have manually specified, and if it is based on a Custom question, then it will use the names specified in Data Model.
All in all, if you use Native questions anywhere in the process, then Data Model has no influence at all.

Okay. When creating Native question (SQL), then you are in full control over column names and types, so Metabase does not inject anything there.

Yes, I think you are right. I was expecting to read the values anyways since I'm doing a select from the same model, but this might not be intuitive. So yeah, makes sense.

As for Nested questions, I don’t think I understand. If the Nested question is based on a Native question, then it’ll use the column names you have manually specified, and if it is based on a Custom question, then it will use the names specified in Data Model.
All in all, if you use Native questions anywhere in the process, then Data Model has no influence at all.

Yes, the only issue here is that the columns formatting from the Nested questions doesn't get translated to the new Custom Query question. I don't know if I'm asking for too much but that would a nice thing to have

@fera320 Nested questions uses the raw-data, which actually what you want, so you can create many different types of questions based on that. Formatting is stored one question-by-question basis, so you need to create Native queries that return the column names and types you want, not use formatting.