Azure Blob SDK (Python azure-storage-blob) does not parse rows with tab separated columns in txt file

Volochy Grigory 16 Reputation points

I have .txt files pushed by Microsoft Academic Graph to Azure Blob storage.

And I'm building a python app that uses "azure-storage-blob" SDK for querying the .txt files to search certain entries by column values. For this, I'm using the following documentation:

I tested it for .csv files - and it works just fine: the columns are searchable by using the "query_blob" method of the "BlobClient" class. The files have columns in each row that are separated by comma sign ','

But when I'm trying to use it for those .txt files that have columns separated by the '\t' sign. Then in response to the query, I'm getting each row as a single column.
For example, if the file contains a row like:

95198407 14607 helpage international HelpAge International

Then, I expect to get all for columns searchable and get in response an object with four columns as it working for similar .csv files.
But instead of that, I'm getting a single row in response as a single column.

The live example of what I have in code:

And what I have in response:

I made multiple tests with parameter "delimiter" queal to:

And similar to those. But all time the result is either the same or some time it throws an error like:

Then I tried to set parameter "delimiter" to '\t\t\t\tt' and got the following response:

So, it looks like it does not matter how many '\t' signs I'm specifying for the "delimiter" parameter, they all are filtering out and the columns are treated as 't' characters separated in this case.

And it looks like I either can not figure out how to escape the '\t' sign properly and that is why it is filtering out and ignoring, or there is some another way to specify the 'tab separator". I checked the docs for the BlobClient class here:

And even looked inside the source code, but can't figure out how to solve the issue.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,270 questions
{count} vote