-
Notifications
You must be signed in to change notification settings - Fork 4
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
Chained Features in Quadruplicate #17
Comments
This happens because the ID
App-Schema is expecting a normalized table with an unique identifier, when the second, third and fourth borehole with the same ID appears App-Schema thinks they are the same and just merges the nested entities. Moving forward, @KathiSchleidt are this four boreholes expected? is there any issue whit the ID we are using? For reference, this is the root query send by App-Schema:
|
Cool! OK, will check ks_borehole_mv and see what went wrong there - thanks! |
OK, got it, the (not longer required) join with the facility was causing the duplicates in ks_borehole_mv. drop MATERIALIZED VIEW app_diffussion_wfs3.ks_borehole_mv |
Hi @KathiSchleidt, I run the query above and indeed it removed the repeated borehole 😃: But some repeat elements still remain:
I investigate the first one, `associationMethod, and indeed repeated result are returned: SELECT *
FROM "app_diffussion_wfs3"."ks_georesource_mv"
INNER JOIN "app_diffussion_wfs3"."ks_borehole_mv"
ON ("ks_borehole_mv"."indice" = "ks_georesource_mv"."indice")
WHERE "ks_borehole_mv"."indice" = '06268X0017'; I'm also copy pasting here all the SQL queries generated by App-Schema and send tot he database, let me know if you need help witht he investigation: SELECT "app_diffussion_wfs3"."ks_borehole_mv"."indice",
"app_diffussion_wfs3"."ks_borehole_mv"."bss_id",
"app_diffussion_wfs3"."ks_borehole_mv"."libelle",
"app_diffussion_wfs3"."ks_borehole_mv"."profondeur_investigation",
"app_diffussion_wfs3"."ks_borehole_mv"."z_ouvrage",
"app_diffussion_wfs3"."ks_borehole_mv"."code_etat",
"app_diffussion_wfs3"."ks_borehole_mv"."prec_xy",
"app_diffussion_wfs3"."ks_borehole_mv"."locmescode",
"app_diffussion_wfs3"."ks_borehole_mv"."locmeslibelle",
"app_diffussion_wfs3"."ks_borehole_mv"."elmescode",
"app_diffussion_wfs3"."ks_borehole_mv"."elmeslibelle",
"app_diffussion_wfs3"."ks_borehole_mv"."depth_date",
"app_diffussion_wfs3"."ks_borehole_mv"."depth_val",
"app_diffussion_wfs3"."ks_borehole_mv"."date_maj_dossier",
"app_diffussion_wfs3"."ks_borehole_mv"."code_statut_referentiel_point_eau",
"app_diffussion_wfs3"."ks_borehole_mv"."date_creation",
"app_diffussion_wfs3"."ks_borehole_mv"."code_insee",
"app_diffussion_wfs3"."ks_borehole_mv"."nom_commune",
"app_diffussion_wfs3"."ks_borehole_mv"."num_commune",
"app_diffussion_wfs3"."ks_borehole_mv"."num_departement",
"app_diffussion_wfs3"."ks_borehole_mv"."latitude",
"app_diffussion_wfs3"."ks_borehole_mv"."longitude",
encode(ST_AsEWKB("app_diffussion_wfs3"."ks_borehole_mv"."loc"),'base64') AS "loc"
FROM "app_diffussion_wfs3"."ks_borehole_mv"
INNER JOIN
(SELECT DISTINCT "ks_borehole_mv"."indice"
FROM "app_diffussion_wfs3"."ks_borehole_mv"
WHERE "indice" = '06268X0017') "temp_alias_used_for_filter" ON ("ks_borehole_mv"."indice" = "temp_alias_used_for_filter"."indice")
ORDER BY "app_diffussion_wfs3"."ks_borehole_mv"."indice" ASC LIMIT 1000000 ;
SELECT "app_diffussion_wfs3"."ks_parameter_mv"."indice",
"app_diffussion_wfs3"."ks_parameter_mv"."namestr",
"app_diffussion_wfs3"."ks_parameter_mv"."valuestr",
"app_diffussion_wfs3"."ks_borehole_mv"."indice" FOREIGN_ID_0_0
FROM "app_diffussion_wfs3"."ks_parameter_mv"
INNER JOIN "app_diffussion_wfs3"."ks_borehole_mv" ON ("ks_borehole_mv"."indice" = "ks_parameter_mv"."indice")
INNER JOIN
(SELECT DISTINCT "ks_borehole_mv"."indice"
FROM "app_diffussion_wfs3"."ks_borehole_mv"
WHERE "indice" = '06268X0017') "temp_alias_used_for_filter" ON ("ks_borehole_mv"."indice" = "temp_alias_used_for_filter"."indice")
ORDER BY "app_diffussion_wfs3"."ks_borehole_mv"."indice" ASC ;
SELECT "app_diffussion_wfs3"."ks_borehole_use_mv"."date_debut",
"app_diffussion_wfs3"."ks_borehole_use_mv"."date_fin",
"app_diffussion_wfs3"."ks_borehole_use_mv"."bss_id",
"app_diffussion_wfs3"."ks_borehole_use_mv"."indice",
"app_diffussion_wfs3"."ks_borehole_use_mv"."code_sandre",
"app_diffussion_wfs3"."ks_borehole_mv"."indice" FOREIGN_ID_0_0
FROM "app_diffussion_wfs3"."ks_borehole_use_mv"
INNER JOIN "app_diffussion_wfs3"."ks_borehole_mv" ON ("ks_borehole_mv"."indice" = "ks_borehole_use_mv"."indice")
INNER JOIN
(SELECT DISTINCT "ks_borehole_mv"."indice"
FROM "app_diffussion_wfs3"."ks_borehole_mv"
WHERE "indice" = '06268X0017') "temp_alias_used_for_filter" ON ("ks_borehole_mv"."indice" = "temp_alias_used_for_filter"."indice")
ORDER BY "app_diffussion_wfs3"."ks_borehole_mv"."indice" ASC 2019-05-16 22:58:20,
225 TRACE [org.geotools.data.complex.filter] - ENTRY FeatureImpl:BoreholeUse<BoreholeUseType id=ks_borehole_use_mv.fid-fdbc820_16a9b8f1c52_-774e>=[] FEATURE_LINK 06268X0017 NULL NULL ;
SELECT "app_diffussion_wfs3"."ks_borehole_use_mv"."date_debut",
"app_diffussion_wfs3"."ks_borehole_use_mv"."date_fin",
"app_diffussion_wfs3"."ks_borehole_use_mv"."bss_id",
"app_diffussion_wfs3"."ks_borehole_use_mv"."indice",
"app_diffussion_wfs3"."ks_borehole_use_mv"."code_sandre",
"app_diffussion_wfs3"."ks_borehole_mv"."indice" FOREIGN_ID_0_0
FROM "app_diffussion_wfs3"."ks_borehole_use_mv"
INNER JOIN "app_diffussion_wfs3"."ks_borehole_mv" ON ("ks_borehole_mv"."indice" = "ks_borehole_use_mv"."indice")
INNER JOIN
(SELECT DISTINCT "ks_borehole_mv"."indice"
FROM "app_diffussion_wfs3"."ks_borehole_mv"
WHERE "indice" = '06268X0017') "temp_alias_used_for_filter" ON ("ks_borehole_mv"."indice" = "temp_alias_used_for_filter"."indice")
ORDER BY "app_diffussion_wfs3"."ks_borehole_mv"."indice" ASC 2019-05-16 22:58:20,
435 TRACE [org.geotools.data.complex.filter] - ENTRY FeatureImpl:Purpose<PurposeType id=ks_borehole_use_mv.fid-fdbc820_16a9b8f1c52_-774b>=[] FEATURE_LINK 06268X0017 NULL NULL ;
SELECT "app_diffussion_wfs3"."ks_pe_sh_mv"."indice",
"app_diffussion_wfs3"."ks_pe_sh_mv"."date_debut",
"app_diffussion_wfs3"."ks_pe_sh_mv"."date_fin",
"app_diffussion_wfs3"."ks_pe_sh_mv"."code_station",
"app_diffussion_wfs3"."ks_pe_sh_mv"."date_fin_unknown",
"app_diffussion_wfs3"."ks_borehole_mv"."indice" FOREIGN_ID_0_0
FROM "app_diffussion_wfs3"."ks_pe_sh_mv"
INNER JOIN "app_diffussion_wfs3"."ks_borehole_mv" ON ("ks_borehole_mv"."indice" = "ks_pe_sh_mv"."indice")
INNER JOIN
(SELECT DISTINCT "ks_borehole_mv"."indice"
FROM "app_diffussion_wfs3"."ks_borehole_mv"
WHERE "indice" = '06268X0017') "temp_alias_used_for_filter" ON ("ks_borehole_mv"."indice" = "temp_alias_used_for_filter"."indice")
ORDER BY "app_diffussion_wfs3"."ks_borehole_mv"."indice" ASC ;
SELECT "app_diffussion_wfs3"."ks_alias_mv"."indice",
"app_diffussion_wfs3"."ks_alias_mv"."ident_pour_organisme",
"app_diffussion_wfs3"."ks_alias_mv"."nom_organisme",
"app_diffussion_wfs3"."ks_alias_mv"."datmaj",
"app_diffussion_wfs3"."ks_alias_mv"."bss_id",
"app_diffussion_wfs3"."ks_borehole_mv"."indice" FOREIGN_ID_0_0
FROM "app_diffussion_wfs3"."ks_alias_mv"
INNER JOIN "app_diffussion_wfs3"."ks_borehole_mv" ON ("ks_borehole_mv"."indice" = "ks_alias_mv"."indice")
INNER JOIN
(SELECT DISTINCT "ks_borehole_mv"."indice"
FROM "app_diffussion_wfs3"."ks_borehole_mv"
WHERE "indice" = '06268X0017') "temp_alias_used_for_filter" ON ("ks_borehole_mv"."indice" = "temp_alias_used_for_filter"."indice")
ORDER BY "app_diffussion_wfs3"."ks_borehole_mv"."indice" ASC ;
SELECT "app_diffussion_wfs3"."ks_georesource_mv"."indice",
"app_diffussion_wfs3"."ks_georesource_mv"."id",
"app_diffussion_wfs3"."ks_georesource_mv"."commentaire",
"app_diffussion_wfs3"."ks_georesource_mv"."date_debut",
"app_diffussion_wfs3"."ks_georesource_mv"."date_fin",
"app_diffussion_wfs3"."ks_georesource_mv"."prof_mur",
"app_diffussion_wfs3"."ks_georesource_mv"."prof_toit",
"app_diffussion_wfs3"."ks_georesource_mv"."entite_captee",
"app_diffussion_wfs3"."ks_georesource_mv"."code_entite",
"app_diffussion_wfs3"."ks_georesource_mv"."nom_entite",
"app_diffussion_wfs3"."ks_georesource_mv"."met_code",
"app_diffussion_wfs3"."ks_georesource_mv"."qua_code",
"app_diffussion_wfs3"."ks_borehole_mv"."indice" FOREIGN_ID_0_0
FROM "app_diffussion_wfs3"."ks_georesource_mv"
INNER JOIN "app_diffussion_wfs3"."ks_borehole_mv" ON ("ks_borehole_mv"."indice" = "ks_georesource_mv"."indice")
INNER JOIN
(SELECT DISTINCT "ks_borehole_mv"."indice"
FROM "app_diffussion_wfs3"."ks_borehole_mv"
WHERE "indice" = '06268X0017') "temp_alias_used_for_filter" ON ("ks_borehole_mv"."indice" = "temp_alias_used_for_filter"."indice")
ORDER BY "app_diffussion_wfs3"."ks_borehole_mv"."indice" ASC ; |
Byt he way @KathiSchleidt if you still have access \ permission problems let me know, you should be able now to do all the changes you need. |
OK, have permissions, am working! But, I fear that the issues are "below my control" |
purpose - here the 3 repeats are correct, end date is missing in the base table app_diffussion_wfs3.bss_ouvrage_fonction, so not provided, rest correct to the best of my knowledge |
ok, checked the other repeats, all good :) |
Issue with repeats in referentiel_externe.ln_entite_hydrogeol_bdlisa now #20 |
All chained elements are now provided 4 times :( Exception:
Example:
http://brgm-dev.geo-solutions.it/geoserver/wfs3/collections/eposb__Borehole/items/06268X0017?f=application%2Fgeo%2Bjson
Should have
SQL for checking the number of elements of the sub-view
eposb:georesourceFeature/eposb:BoreholeGeoresource
select * from app_diffussion_wfs3.ks_georesource_mv where indice = '06268X0017';
eposb:alias/eposb:Alias
select * from app_diffussion_wfs3.ks_alias_mv where indice = '06268X0017';
eposb:boreholeUse/eposb:BoreholeUse
select * from app_diffussion_wfs3.ks_borehole_use_mv where indice = '06268X0017';
eposb:BoreholeMonitoringFacility
select * from app_diffussion_wfs3.ks_pe_sh_mv where indice = '06268X0017';
The text was updated successfully, but these errors were encountered: