如何将数据从大型机提取到Hadoop [英] How to pull data from Mainframe to Hadoop

查看:123
本文介绍了如何将数据从大型机提取到Hadoop的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mainframe中有文件。我希望将这些数据推送到Hadoop(HDFS)/ HIVE。

我可以将Sqoop用于大型机DB2数据库并将其导入到HIVE,但文件(像 COBOL VASM 等)。

任何自定义的flume源代码,我可以编写或使用一些替代工具在这里使用? 解决方案

COBOL是一种编程语言,而不是文件格式。如果你需要导出由COBOL程序产生的文件,你可以使用相同的技术,就好像这些文件是由C,C ++,Java,Perl,PL / I,Rexx等生成的一样。



一般而言,您将拥有三种不同的数据源:平面文件,VSAM文件和DBMS,如DB2或IMS。

DMBS具有导出实用程序将数据复制到平面文件。请记住,DB2中的数据可能会被标准化,因此您可能需要相关表格的内容才能理解数据。

可导出VSAM文件通过 IDCAMS平面文件实用程序。

我强烈建议您在将文件转换为另一个具有不同代码页的框之前,先将文件转换为文本格式。试图处理混合文本(必须翻译其代码页)和二进制文件(不能翻译其代码页,但可能必须从大端转换为小端),比先前进行转换更困难。 p>

转换可能通过大型机上的SORT实用程序完成。大型机SORT实用程序往往具有广泛的数据操作功能。还有其他一些机制可以使用(其他公用程序,用您选择的语言编写的自定义代码,购买的软件包),但这是我们在这些情况下倾向于做的。

一旦你的平面文件被转换成所有数据都是文本的,你可以通过FTP或SFTP或FTPS将它们传送到你的Hadoop盒子中。



这不是该主题的详尽报道,但它会让你开始。


I have files in Mainframe. I want these data to be pushed to Hadoop(HDFS)/HIVE.

I can use Sqoop for the Mainframe DB2 database and import it to HIVE, but what about files (like COBOL,VASM etc.)

Is there any custom flume source that I can write or some alternative tool to use here?

解决方案

COBOL is a programming language, not a file format. If what you need is to export files produced by COBOL programs, you can use the same technique as if those files were produced by C, C++, Java, Perl, PL/I, Rexx, etc.

In general, you will have three different data sources: flat files, VSAM files, and a DBMS such as DB2 or IMS.

DMBSs have export utilities to copy the data into flat files. Keep in mind that data in DB2 will likely be normalized and thus you likely need the contents of related tables in order to make sense of the data.

VSAM files can be exported to flat files via the IDCAMS utility.

I would strongly suggest you get the files into a text format before transferring them to another box with a different code page. Trying to deal with mixed text (which must have its code page translated) and binary (which must not have its code page translated but which likely must be converted from big endian to little endian) is harder than doing the conversion up front.

The conversion can likely be done via the SORT utility on the mainframe. Mainframe SORT utilities tend to have extensive data manipulation functions. There are other mechanisms you could use (other utilities, custom code written in the language of your choice, purchased packages) but this is what we tend to do in these circumstances.

Once you have your flat files converted such that all data is text, you can transfer them to your Hadoop boxes via FTP or SFTP or FTPS.

This isn't an exhaustive coverage of the topic, but it will get you started.

这篇关于如何将数据从大型机提取到Hadoop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆