question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE] Add tsv (tab separated) as save format

See original GitHub issue

Is your feature request related to a problem? Please describe. TSV files are used extensively in bioinformatic spaces.

Describe the solution you’d like Support SAVE direct to tsv.

Describe alternatives you’ve considered Outputter following SAVE AND LOAD

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
goodwanghancommented, Jun 20, 2022

FYI, this doesn’t handle windows file paths:

File <string>:1
    "c:\Users\XXX\cleaned.tsv"
                                                                                                      ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

I had to do:

fe_output = f_output.replace("\\", "\\\\")
%%fsql
SELECT df_links.uuid, df_pcawg.*
    FROM df_pcawg
    INNER JOIN df_links ON df_pcawg.icgc_donor_id = df_links.DO
SAVE OVERWRITE CSV "{{fe_output}}" (sep="\t", header=TRUE)

This is actually a correct behavior. It may be tricky to understand, but let me use a native python code to illustrate: image

The eval here tries to parse the expression with double quotes, which is very similar to fsql. And you see I can reproduce the error you had. Let me know if you can understand what I try to explain.

1reaction
kvnkhocommented, Jun 17, 2022

Just adding notes, I was testing this and the issue is we don’t allow filename with .tsv extension. We should support it. For a lot of the engines, it’s jut changing the delimiter of the method to read csvs

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Create Tab Delimited Files - PaperCut
Creating a TSV File With Microsoft Excel​​ Click File (or the Office Button) → Save As. Change Save as type: to “Text (Tab...
Read more >
How To Use Tab Separated Value (TSV) files
Data tables are presented in text file format (tab delimited). ... To save a data table to disk, highlight the File link, right-click,...
Read more >
Open .tsv file as tab delimited file in Excel - Microsoft Community
I have documents saved as tsv (tab-separated values) files (similar to a csv). I want Excel to recognize the file extension and split...
Read more >
TSV, Tab-Separated Values - Library of Congress
A tab-separated values (TSV) file is a text format whose primary function is to store data in a table structure where each record...
Read more >
Tab-separated values - Wikipedia
A tab-separated values (TSV) file is a simple text format for storing data in a tabular structure, e.g., a database table or spreadsheet...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found