datacontract/datacontract-cli

Case issue on postgres table names

Closed this issue · 2 comments

I have the following in my data contract:

models:
  PaymentLinksV1:
    type: table
    fields:
    ...

However when I try to test the contract, I receive this error:
Screenshot 2024-07-03 at 13 37 42

It seems the YAML is correctly parsed, and case of the table name (PaymentLinksV1) is correctly retained - but then in the error message (relation does not exist) the table name is shown lowercase.

It looks like the table is not found because at some point the tablename is converted to lowercase. I suggest this because if I try this same test with a postgres table that has a lowercase-only name, I don't have this problem.

I would appreciate advice on this, if it's an issue or something I've missed. If the answer is just to only use lowercase table names then that's an option too.

Yes, I confirm this is a bug. Working on it.

Thanks for reporting.
Fix will come with v0.10.9.