archesproject / arches-her

6 stars 12 forks source link

Location Data branch file has missing default values for some nodes #1307

Closed aj-he closed 3 months ago

aj-he commented 3 months ago

Running the following SQL shows that there are some node default values that don't exist

SELECT valueid, value, conceptid, default_values.*
    FROM values v 
    RIGHT OUTER JOIN (
        SELECT g.name as graph, g.isresource, n.name as node, cnw.nodeid, cnw.config ->> 'defaultValue' AS default_value
        FROM cards_x_nodes_x_widgets cnw 
        JOIN nodes n on n.nodeid = cnw.nodeid
        JOIN graphs g on n.graphid = g.graphid
        WHERE n.datatype in ('concept', 'concept-list')
        AND cnw.config ->> 'defaultValue' != ''
    ) default_values 
    ON v.valueid::uuid = default_values.default_value::uuid
    --WHERE v.valueid IS null;

Image

aj-he commented 3 months ago

completed in #1308