Recurring Revenue Authors: Elizabeth White, Yeshim Deniz, Xenia von Wedel, Liz McMillan, Carmen Gonzalez

Related Topics: Microservices Expo, Recurring Revenue

Microservices Expo: Article

Economical Data Warehousing Using Amazon Web Services and Hadoop

How to transfer data between an Oracle database and Hadoop using Sqoop

Sqoop makes it very easy to transfer data between Oracle and Hadoop using a single command. The reason why we would want to import data from an Oracle database into Hadoop/Hive is that we might want to join Hive tables with Oracle lookup tables, or other data residing in Oracle database.

Data originating from an Oracle database can help better understand and analyze raw, more granular data contained in Hive/HDFS.

Sqoop uses JDBC driver to connect to an Oracle database. If you have a table results in your Oracle database and want data from it to be imported to Hadoop HDFS ( Hadoop Distributed File System ) for further processing by Hive you only need to issue a single command:

./sqoop import --connect jdbc:oracle:thin:@ec2-23-21-167-145.compute-1.amazonaws.com:1521:TEST --username system -P --table results --columns "owner" -m 1

This command will connect to the Oracle database TEST residing on Amazon Web Services server ec2-23-21-167-145.compute-1.amazonaws.com, as user system and import column owner from table results into HDFS.

It is now easy to load this table into Hive for further processing using HiveQL language. HiveQL is capable of SQL-like data processing while transparenlty utilizing MapReduce paradigm ( there is no need to write MapReduce programs ):

hive>LOAD DATA  INPATH '/usr/lib/hadoop-0.20/sqoop-1.3.0/bin/results/part-m-00000' OVERWRITE INTO TABLE results;
Loading data to table default.results
Deleted file:/user/hive/warehouse/results
Time taken: 0.166 seconds

We can now issue various HiveQL commands to query and further process this data:

hive> select * from results limit 10;
select * from results limit 10;

Time taken: 0.219 seconds

Once data warehousing analytics is completed in Amazon AWS Hadoop  it is often convenient to upload aggregate data ( results ) to relational database like Oracle for further data processing or visualization.

Let's say that result of our data analysis is contained in the file target.txt, residing in HDFS.

Following command will export file target.txt from HDFS into Oracle database ORCL, residing on the server  ec2-23-21-178102.compute1.amazonaws.com, connecting as user system. Data will be exported to the Oracle database table HADOOP_SOURCE.

$ sqoop export --connect jdbc:oracle:thin:@ec2-23-21-178-102.compute-1.amazonaws.com:1521:ORCL --username SYSTEM --table HADOOP_SOURCE  --export-dir /usr/lib/hadoop-0.20/input/target.txt -P

If your Hadoop cluser resides on Amazon Web Services it is very easy to add more processing power - Hadoop DataNodes. It is also possible to load extremely large volume of data ( petabytes ) using AWS Export/Import service. You can also upload data to AWS S3 service, or straight to AWS EC2 EBS volumes that can be attached to Hadoop DataNodes of your choice.

More Stories By Ranko Mosic

Ranko Mosic, BScEng, is specializing in Big Data/Data Architecture consulting services ( database/data architecture, machine learning ). His clients are in finance, retail, telecommunications industries. Ranko is welcoming inquiries about his availability for consulting engagements and can be reached at 408-757-0053 or [email protected]

IoT & Smart Cities Stories
Chris Matthieu is the President & CEO of Computes, inc. He brings 30 years of experience in development and launches of disruptive technologies to create new market opportunities as well as enhance enterprise product portfolios with emerging technologies. His most recent venture was Octoblu, a cross-protocol Internet of Things (IoT) mesh network platform, acquired by Citrix. Prior to co-founding Octoblu, Chris was founder of Nodester, an open-source Node.JS PaaS which was acquired by AppFog and ...
The deluge of IoT sensor data collected from connected devices and the powerful AI required to make that data actionable are giving rise to a hybrid ecosystem in which cloud, on-prem and edge processes become interweaved. Attendees will learn how emerging composable infrastructure solutions deliver the adaptive architecture needed to manage this new data reality. Machine learning algorithms can better anticipate data storms and automate resources to support surges, including fully scalable GPU-c...
Predicting the future has never been more challenging - not because of the lack of data but because of the flood of ungoverned and risk laden information. Microsoft states that 2.5 exabytes of data are created every day. Expectations and reliance on data are being pushed to the limits, as demands around hybrid options continue to grow.
JETRO showcased Japan Digital Transformation Pavilion at SYS-CON's 21st International Cloud Expo® at the Santa Clara Convention Center in Santa Clara, CA. The Japan External Trade Organization (JETRO) is a non-profit organization that provides business support services to companies expanding to Japan. With the support of JETRO's dedicated staff, clients can incorporate their business; receive visa, immigration, and HR support; find dedicated office space; identify local government subsidies; get...
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...
If a machine can invent, does this mean the end of the patent system as we know it? The patent system, both in the US and Europe, allows companies to protect their inventions and helps foster innovation. However, Artificial Intelligence (AI) could be set to disrupt the patent system as we know it. This talk will examine how AI may change the patent landscape in the years to come. Furthermore, ways in which companies can best protect their AI related inventions will be examined from both a US and...
The challenges of aggregating data from consumer-oriented devices, such as wearable technologies and smart thermostats, are fairly well-understood. However, there are a new set of challenges for IoT devices that generate megabytes or gigabytes of data per second. Certainly, the infrastructure will have to change, as those volumes of data will likely overwhelm the available bandwidth for aggregating the data into a central repository. Ochandarena discusses a whole new way to think about your next...
Charles Araujo is an industry analyst, internationally recognized authority on the Digital Enterprise and author of The Quantum Age of IT: Why Everything You Know About IT is About to Change. As Principal Analyst with Intellyx, he writes, speaks and advises organizations on how to navigate through this time of disruption. He is also the founder of The Institute for Digital Transformation and a sought after keynote speaker. He has been a regular contributor to both InformationWeek and CIO Insight...
Bill Schmarzo, Tech Chair of "Big Data | Analytics" of upcoming CloudEXPO | DXWorldEXPO New York (November 12-13, 2018, New York City) today announced the outline and schedule of the track. "The track has been designed in experience/degree order," said Schmarzo. "So, that folks who attend the entire track can leave the conference with some of the skills necessary to get their work done when they get back to their offices. It actually ties back to some work that I'm doing at the University of ...