It may be that by "fixed width text", Flavio means a file in which the text 
columns are of fixed width: kind of like old-school punch cards.
Drill has no reader for this use case, but if you are a Java programmer, you 
can create one. See Drill Pull Request #1114 [1] for one example of a regex 
reader along with pointers to a second example I'm building for a book. Should 
be easy to adopt this code to take a list of column widths in place of the 
regex. Actually, you could use the regex with a pattern that just picks out a 
fixed number of characters.
Thanks,
- Paul

[1]  https://github.com/apache/drill/pull/1114


 

    On Monday, February 19, 2018, 12:52:42 PM PST, Kunal Khatua 
<kkha...@mapr.com> wrote:  
 
 As long as you have delimiters, you should be able to import it as a regular 
CSV file. Using views that define the fixed-width nature should help operators 
downstream work more efficiently. 

-----Original Message-----
From: Flavio Pompermaier [mailto:pomperma...@okkam.it] 
Sent: Monday, February 19, 2018 6:50 AM
To: user@drill.apache.org
Subject: Fixed-width files

Hi to all,
I'm currently looking for the best solution to load a fixed-width text file 
into Drill.
Is there any way right now to do that? Is there anyone that already have a 
working connector?
Is it better to implement a brand new FormatPluginConfig or StoragePluginConfig?

Best,
Flavio
  

Reply via email to