-
Notifications
You must be signed in to change notification settings - Fork 1
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
Some tips #4
base: main
Are you sure you want to change the base?
Some tips #4
Conversation
Dear all, thanks for the guide, very usefull. I added three ideas: In create schema, I've added --createImportTabs useful for tracing import operations. added a new chapter: replace removed the constraint reference in datenintegration with the amt.t_id key. If you use the replace option with ili2pg the operation fail with constraint error. I hope this is usefull. Regards Giosia
Having a part describing the replace sounds nice. However I'm not really aware if this is a use case in real production world. |
Our business side want check daily the federal data and replace it in the db. |
No offense :) I can imagine there are use cases. Only wanted to do a statement that my review expertise it not about this :) |
No worries. Have a nice evening |
Thanks for the input. I think this documentation should describe which ili2pg- and SQL-commands are required to create the tables and its columns in order that the theme is accessible by pyramid_oereb. As I see, there are also some ili2pg-options that have no effect related to pyramid_oereb and can be used or not. Probably, the setting of creation and maintaining such a DB is different from canton to canton. Adding a "replacement" section is certainly helpful. I would probably keep the foreign key constraint in the table "datenintegration" as it shows the relation to the office table. But of course you can remove it in your application. |
Hi, yes of course. Feel free to implement or not. Imho, the relation is useless because the load process is done programmatically and if you use a replace ili2pg procedure generate problems. You could delete the row before insert but if ili2pg didn't end correctly you have to rollback or do something to reinsert the correct row in "datenintegration". |
@@ -42,6 +42,7 @@ java -jar $ili2pg --schemaimport \ | |||
--createMetaInfo \ # creates additional tables with information from the interlis model | |||
--createNumChecks \ # creates constraints for numerical data types | |||
--createUnique \ # creates unique constraints in the db for Interlis unique constraints | |||
--createImportTabs \ # creates import tables for trace import operations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would put this option under "Options that might be relevant dependent on individual settings"
@@ -121,11 +142,7 @@ CREATE TABLE IF NOT EXISTS :schema.datenintegration | |||
datum timestamp without time zone NOT NULL, | |||
amt bigint NOT NULL, | |||
checksum character varying COLLATE pg_catalog."default", | |||
CONSTRAINT datenintegration_pkey PRIMARY KEY (t_id), | |||
CONSTRAINT datenintegration_amt_fkey FOREIGN KEY (amt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of removing this, I would suggest to add a comment that the constraint "datenintegration_amt_fkey" might raise conflicts if a dataset is replaced by ili2pg and, therefore, a user has to decide if he wants to ommit it.
Dear all,
thanks for the guide, very usefull. I added three ideas:
In create schema, I've added --createImportTabs useful for tracing import operations.
added a new chapter: replace
removed the constraint reference in datenintegration with the amt.t_id key. If you use the replace option with ili2pg the operation fail with constraint error.
I hope this is usefull.
Regards
Giosia
/cc @vvmruder @vuilleumierc @michmuel