Page MenuHomePhabricator

Quarry run result in AWB make list
Open, Needs TriagePublic

Description

Hello. I opened today the AWB for the first time. It's great.
Is there a possibility to add a new option for make list - quarry run result, with input window for column number? Thank you.

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone

Event Timeline

IKhitron created this task.May 2 2016, 12:03 AM
Reedy added a comment.May 2 2016, 2:01 PM

I suspect column number isn't the most user friendly, specifying the actual could be more useful

So from https://quarry.wmflabs.org/run/84084/output/0/json-lines?download=true (or similar query), we just extract page_title (user input value), and add them to the listmaker?

You can also get the latest output for any query with the following URL format:

/query/<int:query_id>/result/latest/<string:resultset_id>/<string:format>

IKhitron added a comment.EditedMay 2 2016, 2:10 PM

Thank you that you are interested.
About column name - I thought about this, but sometimes it's not a good choice, because column name can be something as

concat((case page_namespace when 0 then "" when 4 then "Project" when 14 then ":Category" when 118 then "Draft" when 1
then "Talk" when 2 then "User" when 5 then "Project Talk" when 15 then "Category talk" else page_namespace end), ':', page_title)

If you can both - wonderful. If you can't, just a name can be a problem.

I don't know which format you prefer, because of encoding issue. It's not just extract, unfortunately, it also should be converted to "real" letters.

Thanks again.

Reedy added a comment.May 2 2016, 2:23 PM

Teaching a little SQL seems easier...

concat((case page_namespace when 0 then "" when 4 then "Project" when 14 then ":Category" when 118 then "Draft" when 1
then "Talk" when 2 then "User" when 5 then "Project Talk" when 15 then "Category talk" else page_namespace end), ':', page_title)

add an alias to your query and it's easier for nearly everyone

concat((case page_namespace when 0 then "" when 4 then "Project" when 14 then ":Category" when 118 then "Draft" when 1
then "Talk" when 2 then "User" when 5 then "Project Talk" when 15 then "Category talk" else page_namespace end), ':', page_title) AS new_page_title

But it shouldn't be too hard to use the column number if a numerical value has been entered, probably. Would have to look at how the json parser works and returns results

I knew about AS, of course. I just wanted make it possible usage of existing queries without any need to change them.

To explain you, what did I mean about encoding.
When I run Quarry, I never can just use the results. I open the CSV download in Notepad++, convert it to UTF8, save, and only then open in Excel.

Reedy added a comment.May 3 2016, 10:01 PM

Yeah, dealing with UTF-8 isn't an issue whatsoever