Openrefine - use API to retrieve a column from a loaded project












1














I have an active OpenRefine project running where data cleaning is incrementally being done by other team members. I want to extract (read-only) all values in one column, run computations on it in either javascript or python, and display stats on a team dashboard where we have other things being monitored too. For this I need to use the OpenRefine API.



What would be the query needed for retrieving data from one column (example: "dataclean")?



There is this in the documentation:



Export rows
Command: POST /command/core/export-rows

'project' : project id
'engine' : JSON string... (e.g. '{"facets":,"mode":"row-based"}')
'format' : format... (e.g 'tsv', 'csv')


Can I pass a `"mode" : "column-based" instead of "row-based" ? What else do I need to specify?










share|improve this question















migrated from superuser.com Dec 11 '18 at 20:38


This question came from our site for computer enthusiasts and power users.















  • lol, i had assumed stackoverflow folks will say this is a usage related question not a programming related one so go post it on superuser ;)
    – Nikhil VJ
    Dec 12 '18 at 6:46


















1














I have an active OpenRefine project running where data cleaning is incrementally being done by other team members. I want to extract (read-only) all values in one column, run computations on it in either javascript or python, and display stats on a team dashboard where we have other things being monitored too. For this I need to use the OpenRefine API.



What would be the query needed for retrieving data from one column (example: "dataclean")?



There is this in the documentation:



Export rows
Command: POST /command/core/export-rows

'project' : project id
'engine' : JSON string... (e.g. '{"facets":,"mode":"row-based"}')
'format' : format... (e.g 'tsv', 'csv')


Can I pass a `"mode" : "column-based" instead of "row-based" ? What else do I need to specify?










share|improve this question















migrated from superuser.com Dec 11 '18 at 20:38


This question came from our site for computer enthusiasts and power users.















  • lol, i had assumed stackoverflow folks will say this is a usage related question not a programming related one so go post it on superuser ;)
    – Nikhil VJ
    Dec 12 '18 at 6:46
















1












1








1







I have an active OpenRefine project running where data cleaning is incrementally being done by other team members. I want to extract (read-only) all values in one column, run computations on it in either javascript or python, and display stats on a team dashboard where we have other things being monitored too. For this I need to use the OpenRefine API.



What would be the query needed for retrieving data from one column (example: "dataclean")?



There is this in the documentation:



Export rows
Command: POST /command/core/export-rows

'project' : project id
'engine' : JSON string... (e.g. '{"facets":,"mode":"row-based"}')
'format' : format... (e.g 'tsv', 'csv')


Can I pass a `"mode" : "column-based" instead of "row-based" ? What else do I need to specify?










share|improve this question















I have an active OpenRefine project running where data cleaning is incrementally being done by other team members. I want to extract (read-only) all values in one column, run computations on it in either javascript or python, and display stats on a team dashboard where we have other things being monitored too. For this I need to use the OpenRefine API.



What would be the query needed for retrieving data from one column (example: "dataclean")?



There is this in the documentation:



Export rows
Command: POST /command/core/export-rows

'project' : project id
'engine' : JSON string... (e.g. '{"facets":,"mode":"row-based"}')
'format' : format... (e.g 'tsv', 'csv')


Can I pass a `"mode" : "column-based" instead of "row-based" ? What else do I need to specify?







api openrefine






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 13 '18 at 3:50







Nikhil VJ

















asked Dec 11 '18 at 9:53









Nikhil VJNikhil VJ

619825




619825




migrated from superuser.com Dec 11 '18 at 20:38


This question came from our site for computer enthusiasts and power users.






migrated from superuser.com Dec 11 '18 at 20:38


This question came from our site for computer enthusiasts and power users.














  • lol, i had assumed stackoverflow folks will say this is a usage related question not a programming related one so go post it on superuser ;)
    – Nikhil VJ
    Dec 12 '18 at 6:46




















  • lol, i had assumed stackoverflow folks will say this is a usage related question not a programming related one so go post it on superuser ;)
    – Nikhil VJ
    Dec 12 '18 at 6:46


















lol, i had assumed stackoverflow folks will say this is a usage related question not a programming related one so go post it on superuser ;)
– Nikhil VJ
Dec 12 '18 at 6:46






lol, i had assumed stackoverflow folks will say this is a usage related question not a programming related one so go post it on superuser ;)
– Nikhil VJ
Dec 12 '18 at 6:46














1 Answer
1






active

oldest

votes


















1














There is an undocumented parameter options that will do the trick for you. Just call with options : {"name":"Column+A"} (if the column you want is called "Column A"). You can specify a lot more things using this parameter. In OpenRefine, just go to "Export" -> "Custom tabular exporter..." and select the options you want. Then go on the "Option Code" tab, select the JSON and paste it in your query (the format option is ignored in this part, as it is specified using the dedicated parameter).






share|improve this answer





















  • sounds good! I'll give this a shot in a couple days time and get back.
    – Nikhil VJ
    Dec 13 '18 at 3:52











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53732002%2fopenrefine-use-api-to-retrieve-a-column-from-a-loaded-project%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














There is an undocumented parameter options that will do the trick for you. Just call with options : {"name":"Column+A"} (if the column you want is called "Column A"). You can specify a lot more things using this parameter. In OpenRefine, just go to "Export" -> "Custom tabular exporter..." and select the options you want. Then go on the "Option Code" tab, select the JSON and paste it in your query (the format option is ignored in this part, as it is specified using the dedicated parameter).






share|improve this answer





















  • sounds good! I'll give this a shot in a couple days time and get back.
    – Nikhil VJ
    Dec 13 '18 at 3:52
















1














There is an undocumented parameter options that will do the trick for you. Just call with options : {"name":"Column+A"} (if the column you want is called "Column A"). You can specify a lot more things using this parameter. In OpenRefine, just go to "Export" -> "Custom tabular exporter..." and select the options you want. Then go on the "Option Code" tab, select the JSON and paste it in your query (the format option is ignored in this part, as it is specified using the dedicated parameter).






share|improve this answer





















  • sounds good! I'll give this a shot in a couple days time and get back.
    – Nikhil VJ
    Dec 13 '18 at 3:52














1












1








1






There is an undocumented parameter options that will do the trick for you. Just call with options : {"name":"Column+A"} (if the column you want is called "Column A"). You can specify a lot more things using this parameter. In OpenRefine, just go to "Export" -> "Custom tabular exporter..." and select the options you want. Then go on the "Option Code" tab, select the JSON and paste it in your query (the format option is ignored in this part, as it is specified using the dedicated parameter).






share|improve this answer












There is an undocumented parameter options that will do the trick for you. Just call with options : {"name":"Column+A"} (if the column you want is called "Column A"). You can specify a lot more things using this parameter. In OpenRefine, just go to "Export" -> "Custom tabular exporter..." and select the options you want. Then go on the "Option Code" tab, select the JSON and paste it in your query (the format option is ignored in this part, as it is specified using the dedicated parameter).







share|improve this answer












share|improve this answer



share|improve this answer










answered Dec 12 '18 at 12:24









Frog23Frog23

13613




13613












  • sounds good! I'll give this a shot in a couple days time and get back.
    – Nikhil VJ
    Dec 13 '18 at 3:52


















  • sounds good! I'll give this a shot in a couple days time and get back.
    – Nikhil VJ
    Dec 13 '18 at 3:52
















sounds good! I'll give this a shot in a couple days time and get back.
– Nikhil VJ
Dec 13 '18 at 3:52




sounds good! I'll give this a shot in a couple days time and get back.
– Nikhil VJ
Dec 13 '18 at 3:52


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53732002%2fopenrefine-use-api-to-retrieve-a-column-from-a-loaded-project%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Сан-Квентин

8-я гвардейская общевойсковая армия

Алькесар