data-api-builder icon indicating copy to clipboard operation
data-api-builder copied to clipboard

[Bug]: Quoted Table name are not supported

Open 33Moka33 opened this issue 1 year ago • 2 comments

What happened?

I tried to use DAB on my Postgresql DB. My table name are case sensitive. When i try to start i get a failure.

Here is a sample of my dab-config.json "AssetHealthState": { "source": { "object": "asset_health."AssetHealthState"", "type": "table" },

Version

Microsoft.DataApiBuilder 1.2.10+c7ca8db8558a63919c530e454c8f18b45d5b931c

What database are you using?

PostgreSQL

What hosting model are you using?

Local (including CLI)

Which API approach are you accessing DAB through?

REST

Relevant log output

failinfo: Azure.DataApiBuilder.Service.Startup[0]
      Unable to complete runtime initialization. Refer to exception for error details.
      Azure.DataApiBuilder.Service.Exceptions.DataApiBuilderException: Cannot obtain Schema for entity AssetHealthState with underlying database object source: asset_health."AssetHealthState" due to: 42P01: relation "asset_health."AssetHealthState"" does not exist

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

33Moka33 avatar Sep 16 '24 17:09 33Moka33

Do square brackets work?

{
   "object": "asset_health.[AssetHealthState]"
}

JerryNixon avatar Sep 16 '24 17:09 JerryNixon

with brackets i get this error fail: Azure.DataApiBuilder.Core.Resolvers.IQueryExecutor[0] Query execution error due to: 42P01: relation "asset_health.assethealthstate" does not exist Npgsql.PostgresException (0x80004005): 42P01: relation "asset_health.assethealthstate" does not exist

all seems to be converted to lower case

33Moka33 avatar Sep 16 '24 18:09 33Moka33