Last modified: 2014-02-24 21:54:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63881, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61881 - Possible wikidata merges
Possible wikidata merges
Status: NEW
Product: Tool Labs tools
Classification: Unclassified
tsreports (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Merlijn van Deen (test)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-24 21:49 UTC by Merlijn van Deen (test)
Modified: 2014-02-24 21:54 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Merlijn van Deen (test) 2014-02-24 21:49:42 UTC
https://tools.wmflabs.org/multichill/queries/wikidata/possible_merge.txt

/* Make a list of items that might be mergable.
   Still have to filter out items that already have a link to the language */
connect wikidatawiki_p wikidatawiki.labsdb;
SELECT CONCAT('* ', wbA.ips_site_page, ' - [[Q', wbA.ips_item_id, ']] & [[Q', wbC.ips_item_id, ']]')
FROM wb_items_per_site AS wbA
LEFT JOIN wb_items_per_site AS wbB
ON (wbA.ips_item_id=wbB.ips_item_id AND NOT wbA.ips_site_id=wbB.ips_site_id)
JOIN wb_items_per_site AS wbC
ON (wbA.ips_site_page=wbC.ips_site_page AND NOT wbA.ips_site_id=wbC.ips_site_id)
WHERE wbA.ips_site_id='nlwiki'
AND wbB.ips_site_id IS NULL
AND NOT EXISTS(
SELECT * FROM wb_items_per_site AS wbD
WHERE wbC.ips_item_id=wbD.ips_item_id
AND wbD.ips_site_id='nlwiki');
Comment 1 Merlijn van Deen (test) 2014-02-24 21:54:44 UTC
If this query needs caching, the following is needed:
 a) caching for queries with parameters, or
 b) inter-database queries, or
 c) being able to override the database connection.

If it doesn't, it can be implemented as a query with parameters.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links