Another note: The replicas in labs now have the "term_full_entity_id" column now and you can query them instead of querying wb_entity_per_page table which will stop getting updated from tomorrow evening (UTC time)
Best On 6 October 2017 at 14:40, Amir Sarabadani <[email protected]> wrote: > Just a reminder, > We are starting to phase out the table, it will stop getting updated from > end of the next week and will be dropped two or three weeks from now, the > wb_terms table now have term_full_entity_id instead which is not replicated > to labs yet [0] but it will very soon. > > > [0]: https://phabricator.wikimedia.org/T167114 > > Best > > >> From: Magnus Manske <[email protected]> >> Date: Thu, Jun 1, 2017 at 5:21 PM >> Subject: Re: [Wikidata-tech] Breaking change: "wb_entity_per_page" table >> will not be updated and replicated on ToolLabs anymore >> To: Daniel Kinzler <[email protected]>, Wikidata technical >> discussion <[email protected]> >> >> >> The original code predated SPARQL, so I have to change it anyway. The >> example I gave is small enough for SPARQL, but others will not be. >> >> On Thu, Jun 1, 2017 at 4:11 PM Daniel Kinzler < >> [email protected]> wrote: >> >>> Am 01.06.2017 um 16:59 schrieb Magnus Manske: >>> > As an example from my BEACON tool, I want all properties that have a >>> formatter >>> > property, with English label. That SQL is now: >>> > >>> > SELECT DISTINCT page_title,term_text FROM pagelinks,page,wb_terms WHERE >>> > page_namespace=120 AND substr(page_title,2)=term_entity_id and >>> > term_entity_type='property' and term_language='en' and >>> term_type='label' and >>> > pl_from=page_id and pl_title='P1630' and pl_namespace=120 and >>> > pl_from_namespace=120 ORDER BY term_text >>> > >>> > Note the "substr". My first attempt was "page_title=concat('Q',term_en >>> tity_id)", >>> > but that took forever. >>> > >>> > If we indeed get a full entity ID=page title column for wb_terms, and >>> > for wb_items_per_site etc., that would at least fix the on-the-fly >>> compute. I >>> > shall thus wait with code updates until I get the full story, and not >>> just >>> > piece-by-piece... >>> >>> There is currently no plan to put the full ID into wb_items_per_site or >>> wb_property_info, because these tables are bound to a specific entity >>> type. >>> Whether we want to do this would be a whole new discussion. >>> >>> For what you are doing there, it's probably a lot easier to use the >>> query >>> service. SPARQL: >>> >>> SELECT DISTINCT ?property ?propertyLabel >>> WHERE { >>> ?property a wikibase:Property . >>> ?property wdt:P1630 ?format . >>> SERVICE wikibase:label { bd:serviceParam wikibase:language "en" } >>> } >>> >>> -- >>> Daniel Kinzler >>> Principal Platform Engineer >>> >>> Wikimedia Deutschland >>> Gesellschaft zur Förderung Freien Wissens e.V. >>> >> _______________________________________________ >> Wikidata-tech mailing list >> [email protected] >> https://lists.wikimedia.org/mailman/listinfo/wikidata-tech >> > > -- Amir Sarabadani Software Engineer Wikimedia Deutschland e. V. | Tempelhofer Ufer 23-24 | 10963 Berlin Tel. (030) 219 158 26-0 http://wikimedia.de Stellen Sie sich eine Welt vor, in der jeder Mensch an der Menge allen Wissens frei teilhaben kann. Helfen Sie uns dabei! http://spenden.wikimedia.de/ Wikimedia Deutschland – Gesellschaft zur Förderung Freien Wissens e. V. Eingetragen im Vereinsregister des Amtsgerichts Berlin-Charlottenburg unter der Nummer 23855 B. Als gemeinnützig anerkannt durch das Finanzamt für Körperschaften I Berlin, Steuernummer 27/029/42207.
_______________________________________________ Wikidata-tech mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikidata-tech
