Skip to content

Renaming columns in queries #1728

Answered by seantleonard
BumpaRoy asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @BumpaRoy,

You can add column mappings (aliases) to your database columns to give more friendly names. See https://learn.microsoft.com/azure/data-api-builder/configuration-file#mappings

For each entity in your runtime config, you can add a mappings section like so, where the format is
"db_column_name": "Alias"

 "mappings": {
    "fpartno": "PartNo",
    "frev": "Revision"
  }

The mappings will apply to both GraphQL and REST endpoints.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BumpaRoy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants