-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question related to unsparsify #1495
Comments
@aborruso most definitely this cannot be accommodated within CSV output format:
This is not at all related to unsparsify. It's because CSV output must have the same keys for all rows. I had really hoped the error message we're seeing now would be clear ... and to me it is ... but it is not clear to everyone ... 🤔 |
Please don't hate me if I write stupid things now. But wasn't automatic unsparsify introduced if the output is csv? I'll try to explain with examples. If I use Miller 5 I have this output, I have a sparsified output:
If I use Miller 6 I have the error, because CSV output must have the same keys for all rows. If I in fact apply unsparsify in 6 I have no error
So I thought that without unsparsify I could have in Miller 6 one of these two outputs:
For the error message, you are right, it is understandable. |
Dear @johnkerl I probably wasn't very clear and I'll try to explain again. If I have this input
I can write Instead if I have this input
and I run Couldn't it always be put as a final verb, implied, whenever the output is a rectangular format? Thank you |
@aborruso this is one of those cases where we would need to read all output before procuding any output, and I'm not comfortable doing that as a default behavior. That would break Miller's streaming-when-it-can feature, which is one of its great strengths, only to accommodate some corner-case data. Since the data being produced here are irregular, manually specified unsparsify is the correct approach. |
Thank you very much |
@johnkerl for me you can close this. Thank you and sorry for this somewhat off-topic and erroneous issue |
Originally posted by @aborruso in #1418 (comment):
@johnkerl I have a unsparsify related question.
I have this input csv:
If I run
I have this error:
It's a wrong reshape, because I must cut Gender and id, but If I change format
--c2m
, I have no error, probably because the unsparsify command is not forced.So it is probably okay to have that error, but for the non-expert user it is a message that does not help to find the solution. What do you think about? I'm not making any suggestions for improvement, because I don't have any at the moment.
Thank you
The text was updated successfully, but these errors were encountered: