Reply
Highlighted
New Contributor
Posts: 5
Registered: ‎10-17-2018

Importing actual report files to hive

[ Edited ]

Good day Guru's,

 

Please advise on how to import flat files wherein there are 7 lines as actual hear reports, then 8th row is the column names then the following rows are the actual records  until an ** END OF REPORT **,,,,,,,,,,  text is present... 

 

Target is hive table.

 

please see sample report below,.

 

 

,,,,,,,,,,PAGE 1
Secret Bank,,,,,,,,,,
JOURNAL BY Machine,,,,,,,,,,
FOR Aug 12, 2018,,,,,,,,,,
UNI ,My CENTER,,,,,,,,,
RUN DATE,08/13/2012,,,,,,,,,
RUN TIME,00:18:44,,,,,,,,,
TERMINAL ID,07141742 - My Company 1,,,,,,,,,
DATE,TIME,CARD ACCOUNT NUMBER,AMOUNT,TYPE,CB,ACCOUNT NUMBER,AVAILABLE FUNDS,SEQ,RESPONSE CODE,EMV FLAG
,,INSITUTION NAME,,PAYOR ACCT NUMBER,,,,,,

** END OF REPORT **,,,,,,,,,,
,,,,,,,,,,PAGE 2
YOur Bank,,,,,,,,,,
JOURNAL BY Machine,,,,,,,,,,
FOR Aug 12, 2012,,,,,,,,,,
UNI ,My CENTER,,,,,,,,,
RUN DATE,08/13/2012,,,,,,,,,
RUN TIME,00:18:44,,,,,,,,,
TERMINAL ID,01131746 - Company Ave,,,,,,,,,
DATE,TIME,CARD ACCOUNT NUMBER,AMOUNT,TYPE,CB,ACCOUNT NUMBER,AVAILABLE FUNDS,SEQ,RESPONSE CODE,EMV FLAG
,,INSITUTION NAME,,PAYOR ACCT NUMBER,,,,,,

08/12,08:22:35,5892708286881766,0.00,Balance Inquiry,0928,0000009019240202,"91,691.83",152612,000 Approved,EMV
,,,,,,,,,,
08/12,08:23:00,5952708286881766,"4,900.00",Cash Withdrawal,0928,0000009019240202,"86,791.83",152614,000 Approved,EMV
,,,,,,,,,,
08/12,10:43:12,5395646209529472,"5,000.00",Cash Withdrawal,0928,0000009025206413,"3,000.00",152616,000 Approved,EMV
,,,,,,,,,,
** END OF REPORT **,,,,,,,,,,
,,,,,,,,,,PAGE 3
YOur Bank,,,,,,,,,,
JOURNAL BY Machine,,,,,,,,,,
FOR Aug 12, 2012,,,,,,,,,,
UNI ,MY CENTER,,,,,,,,,
RUN DATE,08/13/2012,,,,,,,,,
RUN TIME,00:18:44,,,,,,,,,
TERMINAL ID,01131746 - Company Ave,,,,,,,,,
DATE,TIME,CARD ACCOUNT NUMBER,AMOUNT,TYPE,CB,ACCOUNT NUMBER,AVAILABLE FUNDS,SEQ,RESPONSE CODE,EMV FLAG
,,INSITUTION NAME,,PAYOR ACCT NUMBER,,,,,,

08/12,15:21:12,9564996209193444,"7,000.00",Cash Withdrawal,0928,0000009024842598,"8,201.50",152634,000 Approved,EMV
,,,,,,,,,,
08/12,15:32:43,9564996206055745,"5,000.00",Cash Withdrawal,0928,0000009021586922,"10,051.07",152636,000 Approved,EMV
,,,,,,,,,,
** END OF REPORT **,,,,,,,,,,

New Contributor
Posts: 5
Registered: ‎10-17-2018

Re: Importing actual report files to hive

how to I apply RegSerDe on this non delimited flat file? or is there another way?