What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

SEDE gives incorrect CSV for linked fields. The first 9 lines from the query where I noticed it:

 User Link,,Reputation
 {
   "title": "miguel.de.icaza",
   "id": 16929
 },9.8,8374
 {
   "title": "Joel Spolsky",
   "id": 4
 },9.054545,8175

And it also affects post links:

select id as [Post Link], owneruserid as [User Link] from posts where id=42;​​​​

Post Link,User Link
{
  "title": "Best way to allow plugins for a PHP application",
  "id": 42
},{
  "title": "Wally Lawless",
  "id": 37
}
share|improve this question

1 Answer 1

I just tried this now and got:

User Link,,Reputation
"{
  ""title"": ""John Resig"",
  ""id"": 6524
}","59.6","5807"
"{
  ""title"": ""Reto Meier"",
  ""id"": 822
}","12.140845","9574"

(Note the additional quoting and escaping.)

The second field does not have a column name because it isn't aliased in the source query.

Now, about the JSON-style column results -- is this supposed to be on a single line? This doesn't technically break CSV (or does it?), but it's much harder to process after the fact. Would people prefer it to be on a single line? Please let me know in comments.

I.e.,

User Link,,Reputation
"{""title"": ""John Resig"",""id"": 6524}","59.6","5807"
"{""title"": ""Reto Meier"",""id"": 822}","12.140845","9574"
share|improve this answer
    
Since I don't see anyone commenting, I'm going to assume the way it is now is sufficient. If you want it changed, file a feature request. :) –  Jon Seigel Jul 8 '11 at 23:28

You must log in to answer this question.