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

Incorrect join in qwat_od.vw_export_meter view #288

Closed
kandre opened this issue Feb 21, 2019 · 5 comments
Closed

Incorrect join in qwat_od.vw_export_meter view #288

kandre opened this issue Feb 21, 2019 · 5 comments

Comments

@kandre
Copy link
Contributor

kandre commented Feb 21, 2019

I think that the view qwat_od.vw_export_meter view has an incorrect join between qwat_od.district and qwat_od.vw_element_meter:
LEFT JOIN qwat_od.district district ON vw_element_meter.fk_pressurezone = district.id
In my opinion it should be changed to:
LEFT JOIN qwat_od.district district ON vw_element_meter.fk_district = district.id

Accordingly export_meter.py should probably be adapted from:


to:
fkey: fk_district

@kandre kandre changed the title Incorrect join on qwat_od.vw_export_meter view Incorrect join in qwat_od.vw_export_meter view Feb 21, 2019
@haubourg
Copy link
Contributor

good catch @kandre. Ping us if you need us to propose a pull request

@kandre
Copy link
Contributor Author

kandre commented Feb 22, 2019

@haubourg I guess in this case a delta should be written ?

@haubourg
Copy link
Contributor

@kandre yep, a PR for the core model associated with a delta file to migrate the existing databases.
If you need help to write your own PR, that would be a pleasure too!

ponceta added a commit to ponceta/qwat-data-model that referenced this issue Mar 5, 2019
@ponceta
Copy link
Member

ponceta commented Mar 5, 2019

In QWAT, there's no need to create deltas on views. Just fix the reference in the right export view generation file. See #293 for Fix.

This has just to be added to the bugfixes for next release.

@kandre
Copy link
Contributor Author

kandre commented Mar 5, 2019

Ok, good to know, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants