Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case sensitive generate model yaml #189

Closed
wants to merge 3 commits into from
Closed

Conversation

Thrasi
Copy link
Contributor

@Thrasi Thrasi commented Nov 11, 2024

resolves #188

This is a:

  • documentation update
  • bug fix with no breaking changes
  • new functionality
  • a breaking change

All pull requests from community contributors should target the main branch (default).

Description & motivation

Working with a database that has capitalised model and column names, the result of generate_model_yaml.sql doesn't match the database because generate_model_yaml lowers all names.
I added optional parameters to the macro to toggle this behaviour. Similar functionality has already been added to generate_source.sql. I see no reason why this shouldn't be supported for models.

Checklist

  • This code is associated with an issue which has been triaged and accepted for development.
  • I have verified that these changes work locally
  • I have updated the README.md (if applicable)
  • I have added tests & descriptions to my models (and macros if applicable)
  • I have added an entry to CHANGELOG.md

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 11, 2024
@Thrasi Thrasi closed this Nov 12, 2024
@henry-yu-gce
Copy link

I also had this issue with generate_model_yaml. Did this end up being resolved some other way since I see that this PR is not merged.

@Thrasi
Copy link
Contributor Author

Thrasi commented Feb 5, 2025

@henry-yu-gce I didn't have time to follow up on it but the issue #188 was closed since there was a similar one open #175
Which hasn't been resolved.
The changes worked as I expected, but the test I introduced didn't work with postgres all tables are lower cased.

But I haven't studied this with the added context of #188

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support preserving capitalisation for models and columns
2 participants