Openrefine and wikidata: how to get values (not reconciliation) - wikidata

I was wondering if there's a way to take some values from wikidata through openrefine. For instance: I've got the wikidata ID of a painting. Inside Openrefine it is possible to create a new column with the wikidata author ID?
Thanks

Yes, use the Add columns from reconciled values operation. Note: you will need to reconcile your column (even if your column already contains Wikidata identifiers - in that case reconciliation should be quicker than usual).

Related

Aggregation tool in BIRT : display a count like number on a table column

It must be very easy, baut i can't display a very simple filtered agregation on a table header row in BIRT 3.7. I manage to use count aggregation on groups headers or footers, buet not a filtered aggregation on a simple column table.
USE case : my sql statement car return the string value "ERROR..." for a string field name TEST. The query returns 734 results. My table display all the results.
In the header row i just want to diplay a count of which would be in SQL a count like "ERROR%".
I can't manage to do that whit the aggregation tool !
aggregation builder
Many thanks for your help.
Julien
as i can't manage to find the correct way of filtering my aggregation, i provide the results from my SQL request. By i'd be glad to find the dynamic way of filtering it.
Here is an image of a column that contains strings with "ERR". Le top field in red is my aggregation field served by a slq like '%ERR :%' statement.
example

Create wikidata items from records in OpenRefine (and not rows)?

I read that OpenRefine Wikidata plugins always operates in row mode.
I am in a situation where I have data in records mode : The record is a serial/magazine, and the rows in this records are the various formats of the same serial/magazine (typically, paper and electronic version). Each row has a unique ISSN identifier.Wikidata considers there is only one item for the serial/magazine (my records), but no separate items for each of the formats (my rows).
When reconciling data to Wikidata, all rows of the same record will typically match the same wikidata item, or none of the rows will match, or sometines only one row of the record will match (e.g. if only one ISSN of the format - say paper format - is known in Wikidata, but not the others).
What I would like to do is create items in Wikidata for each records for which no reconciliation result was found (iow, for which no rows has matched), and not for each row. And, when creating this item, I would like to add the ISSNs of all the rows in this record.
I am wondering if it is possible to do that ? and how ?
Thanks
Yes, it is possible. You need to perform the reconciliation operation on the first column instead.
As mentioned by the documentation, use the Fill down operation on the first column, which defines your records;
Reconcile the column to Wikidata;
Then, the Create one new item for similar cells action (in the Reconcile -> Actions menu)
Create a schema where the first column is used as subject id.
Assuming the values in your first column are initially distinct (which is the case in your example), this will create one item per record.
In your example, because your first column contains ISSNs and not titles, I would first create a root column with titles instead (before the process explained above). In rows mode, facet to keep the first row of each record by selecting non-blank values in the first column, and then copy your column with titles, and move this new column in first position. This should ensure that reconciliation picks up existing items. Note that if the same title is used by multiple journals this will create a single item for both of them, unless you add other properties in your reconciliation configuration (such as ISSN).

Need help in apply kibana query

I want to know the query for kibana, i tried terms and agg, but didnt get right output, so need to filter the data based on distinct query in kibana.
I want to apply query in following input data in elasticsearch
Rows and columns
CELLID|MCC|MNC|
1222|405|861|
1222|405|861|
1222|405|122|
1233|406|861|
1233|406|861|
1224|407|777|
1224|407|777|
need to apply query such a way, it will remove the same CELL ID with different MNC, so expecting output like this
CELLID|MCC|MNC|
1233|406|861|
1233|406|861|
1224|407|777|
1224|407|777|
As you know, it's impossible to have such row vs column infrastructure within Kibana graphs as of now. Cos this feature is yet be made to the new versions as an enhancement.
But then if you're simply trying to print out the count|sum or let it be whatever the aggregation you need, you can have a Data Table visualization with a metric of count and then within your buckets you could define multiple terms-aggregation. In your case, you should have CELLID|MCC|MNC being split by terms-aggregation which should do the job for you. Hope this helps!

Akeneo: Get attributes from a Variant group

I want to check if some attribute values have changed after editing a Variant group in Akeneo V. 1.3.
Unfortunately I am a little bit lost: Is there a way to get from a Pim\Bundle\CatalogBundle\Entity\Group to the attribute values? Is there another better way to get these values of a Variant group that was edited?
I cannot even find out in which table the attribute values are stored in MySQL (I've just found pim_catalog_product_value for the product values).
Yes, it's not easy to dig into this part.
The values of a variant group are not stored in the same way than the products values.
These variant group values are only used to be copied in related products and are stored in a product template.
From a product template, you can fetch the values normalized in json with
$group->getProductTemplate()->getValuesData()`.
You can take a look on ProductTemplateApplier and ProductTemplateUpdater to see how we apply variant group values on products (json format is useable almost directly with product updater).
When we edit a variant group, to be able to use the same form than for the product, we use a subscriber TransformProductTemplateValuesSubscriber.
It denormalizes json values to product values objects with
$this->denormalizer->denormalize($data->getValuesData(), 'ProductValue[]', 'json');`
Don't hesitate if you need any further information.

Why doesn't wordpress create an unique index for `wp_users`.`user_login`?

In this page, you can see what I mean,
http://codex.wordpress.org/Database_Description#Table:_wp_users
It only creates a normal index for the user_login column while I think an unique index should be created for it.
Well since the unique index (primary key) is the ID column, the coder probably didn't see the need to define another column in the table as unique. As you point out, though, user_login column is indexed so that gives the performance advantages when querying that table.
Don't know wp, but maybe it needs to allow for multiple user_logins with different user_status?

Resources