Implementing the Logical Data Warehouse with Oracle Big Data SQL
Matthias Fuchs
DWH Architekt
www.ise-informatik.de eXtreme Performance.
ISE Information Systems Engineering
Gegründet 1991
Mitarbeiteranzahl: 60
Hauptsitz in Gräfenberg, Niederlassungen in München und Nürnberg Schwerpunkte:
Oracle Engineered Systems (Exadata / Exalogic / Exalytics)
Data Warehousing & Business Intelligence
Oracle DB – Migrationen, Optimierungen, Hochverfügbarkeit
Managed Service für Datenbanken, BI und Middlewareapplikationen
www.ise-informatik.de eXtreme Performance.
www.ise-informatik.de eXtreme Performance.
Erstes und einziges
Exastack Technology Center
in
Deutschland in Nürnberg
ISE Oracle Technology Center
www.ise-informatik.de eXtreme Performance.
Agenda
LDW - Logical Datawarehouse Big Data SQL Infrastructure Sqoop - der Anfang
www.ise-informatik.de eXtreme Performance.
www.ise-informatik.de eXtreme Performance.
Logical Data Warehouse
Gartner Hype Cycle for Information Infrastructure, 2012,
“the Logical Data Warehouse (LDW) is a new data
management architecture for analytics which combines the
strengths of traditional repository warehouses with
alternative data management and access strategy. The
LDW will form a new best practices by the end of 2015.”
www.ise-informatik.de eXtreme Performance.
Repository Management
Verschiedene Typen u.a. Metadaten
Konsolidierung
Data Virtualization
Virtuelle Daten Schicht
Distributed Processes
Aufruf externer Prozesse
z.B. Bilder oder Content Analyse, aber auch MapReduce
Cloud
Auditing statistics and performance Evaluation
Statistik über Performance
End User, Applikationen oder Verbindungen
SLA Management
Metadataset über erwartete Ausführungenzeiten etc.
Überwachung und ggf. Änderung der Ausführung
Taxonomy - Ontology resolution
a taxonomy “tree” in an ontological “forest”
Metadata Management
www.ise-informatik.de eXtreme Performance.
Repository Management
Verschiedene Typen u.a. Metadaten
Konsolidierung
Data Virtualization
Virtuelle Daten Schicht
Distributed Processes
Aufruf externer Prozesse
z.B. Bilder oder Content Analyse, aber auch MapReduce
Cloud
Auditing statistics and performance Evaluation
Statistik über Performance
End User, Applikationen oder Verbindungen
SLA Management
Metadataset über erwartete Ausführungenzeiten etc.
Überwachung und ggf. Änderung der Ausführung
Taxonomy - Ontology resolution
a taxonomy “tree” in an ontological “forest”
Metadata Management
Gartner: Logical Dataware House
‚Data-to-insight cycle ' schneller
günstiges Framework um neue Inhalte einzubeziehen
www.ise-informatik.de eXtreme Performance.
Gartner: Übersicht
www.ise-informatik.de eXtreme Performance.
Information Management Reference Architecture Oracle
Data Reservoir & Enterprise Information Store – complete view
Enterprise Performance Management Virtua li s a tio n & Q ue ry Fe de rati on Pre-built & Ad-hoc BI Assets Information Services Data Ingestion Information Interpretation
Access & Performance Layer
Foundation Data Layer
Raw Data Reservoir
Data Science
Data Engines & Poly-structured sources
Content
Docs Web & Social Media
SMS Structured Data Sources • Operational Data • COTS Data
• Streaming & BAM
Immutable raw data reservoir Raw data at rest is not interpreted
Immutable modelled data. Business Process Neutral form. Abstracted from business process changes
Past, current and future interpretation of enterprise data. Structured to support agile access & navigation
Discovery Lab Sandboxes Rapid Development Sandboxes
Project based data stores to support specific discovery objectives
Project based data stored to facilitate rapid content / presentation delivery Data Sources Master & Reference Data Sources http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/2297765.pdf
www.ise-informatik.de eXtreme Performance.
www.ise-informatik.de eXtreme Performance.
Big Data Sql - Übersicht
Oracle Big Data SQL Cloudera Hadoop NOSQL R Advanced Analytics Exadata Advanced Analytics Advanced Security Connectors ODI Or BigData Lite VM
www.ise-informatik.de eXtreme Performance.
Big Data Systemübersicht
Storage Layer
Filesystem (HDFS)
Resource Management YARN + MapReduce
Processing Layer
www.ise-informatik.de eXtreme Performance.
Big Data und DB im LDW
ODI, BPM, SOA
Enterprise Metadata Management
Oracle Big Data Appliance
Repository Management
Data Virtualization
Distributed Processes
Auditing statistics and performance
SLA Management
www.ise-informatik.de eXtreme Performance.
www.ise-informatik.de eXtreme Performance.
Sqoop = SQL- to – Hadoop
Paralleles kopieren von JDBC <-> HDFS
MapReduce jobs zum Daten laden/schreiben
Sqoop
DB
HDFS
Mapwww.ise-informatik.de eXtreme Performance.
OraOOP Guy Harrison team Quest (Dell) Ab version 1.4.5 (CDH 5.1)
Oracle direct path (non-buffered) IO for all reads Auf mappers werden Anzahl Blöcke verteilt
Bei partitionierten Tabellen, kann der Mapper pro Partition arbeiten
Sqoop mit Oracle
ORACLE
TABLE
HDFS
HADOOP MAPPER ORACLE SESSION HADOOP MAPPER ORACLE SESSIONwww.ise-informatik.de eXtreme Performance.
Oracle Change Data Capture
Supported in 11.2 – but not recommended by Oracle
Desupported in 12.1 Oracle Golden Gate
1. RDBMS to HIVE
2. RDBMS to Flume
3. RDBMS to HDFS Andere Hersteller:
(Dell) Quest SharePlex – Auslesen redologs
(VMWare) Continuent Tungsten – uses CDC im Hintergrund
Libellewww.ise-informatik.de eXtreme Performance.
www.ise-informatik.de eXtreme Performance.
Ziel
Daten von Servicecalls (OSB) auswerten
Daten Historisieren
Feststellen von Anomalien
Mappen von Strukturierten und Unstrukturierten Daten Tabellen/View und Datei Import
Auswertung mit ausgewählten Werkzeugen
Analyse von Infrastrukturdaten
HDFS Analytic output Weblogs CC RDBMS Flume SQOOP YARN/MR • R • Elasticsearch
www.ise-informatik.de eXtreme Performance.
Wahl der Hadoop Distribution
Cloudera – Oracle supported
Ohne -> sehr aufwendig Filedaten
Flume
Weblogic und Apache Logs
Gut dokumentiert im Netz
Ggf. Realtime Auswertung mit Elasticsearch or Solr Hive
CDH 5.1
OCRFile Formatwww.ise-informatik.de eXtreme Performance.
Optimized Row Columnar File Format light-weight indexes bereits im Fileformat
block-mode compression auf basis des Datentyps
Hive ORCFile
TPC-DS Scale 500 Dataset GB, Hortonworks
585
• Encoded Text • CSV File
505
• RCFile
• Record Columnar File
221
• Parquet
• Columnar Storage Format, impala
131 • ORCFile • Hive Größenvergleich über verschiedene Typen
www.ise-informatik.de eXtreme Performance.
Teil 1 Datenladen
Teil 2
Create Big Data SQL Layer
Ablauf Datenintegration
DB
HDFS HIVE
www.ise-informatik.de eXtreme Performance. Prozess Teil 1 DB HDFS HIVE
• Start sqoop job to HDFS
• Create external table on
HDFS Files
• insert as select in hive ocr data table
• Import parallel 1, da view daten
• Kein primary key, keine parallelen MapReduce Prozesse • Direct read notwendig, da sonst tmp Tablespace zu klein • Start mit sqoop2, ende mit sqoop1 inklusiv Optimierung • ODI statt oozie
www.ise-informatik.de eXtreme Performance.
Suche Tabelle in Hive aus DB
select table_name, input_format, Location from ALL_HIVE_tables
where table_name like '%oem%';
www.ise-informatik.de eXtreme Performance.
Create Table in DB (nur in Test VM)
DDL mit CREATE_EXTDDL_FOR_HIVE erzeugen
DDL ausführen Prozess Teil 2 dbms_hadoop.create_extddl_for_hive( CLUSTER_ID=>'bigdatalite', DB_NAME=>'default', HIVE_TABLE_NAME=>'oem_data', HIVE_PARTITION=>FALSE, TABLE_NAME=>'oem_data', PERFORM_DDL=>FALSE, TEXT_OF_DDL=>DDLout );CREATE TABLE OEM_DATA ( target_name VARCHAR2(4000), target_guid …..
key_value6 VARCHAR2(4000),
collection_timestamp VARCHAR2(4000)) ORGANIZATION EXTERNAL
(TYPE ORACLE_HIVE
DEFAULT DIRECTORY DEFAULT_DIR ACCESS PARAMETERS ( com.oracle.bigdata.cluster=bigdatalite com.oracle.bigdata.tablename=default.oem_ data) ) ; DDL Erzeugen DDL Asuführen
www.ise-informatik.de eXtreme Performance.
www.ise-informatik.de eXtreme Performance.
Daten für einen Tag
~ 239.634.928 Zeilen/12 Spalten TXT Files
~100 G unkomprimiert
Ladezeit ca. 1h aus CC DB OCR Files in hive
~ 27 M komprimiert
~ Ladezeit ca. 30 Minuten
Ergebnisse: Laden der Daten
Type Größe Select
count Where Oem_data BigDataSQL 2,8 MB 2,1 Mio 11s 8s Oem_data local kopiert Oracle 558 MB 2,1 Mio 0,5s 0,5s Oem_data Hive 57s 50s
Teil 1
Teil 2
www.ise-informatik.de eXtreme Performance.
Only data retrieval (TABLE ACCESS FULL und Filter ) werden
offloaded!
Datenbearbeitung im DB Layer
GROUP BY, ORDER BY, JOIN, PL/SQL etc
BigDataSQL 2.0 (Aggregation in Hadoop?) Alternativ Connect über ODBC
Lastverteilung Big Data SQL
Tool Beschreibung Decompress
CPU
Filtering CPU Datatype
Conversion
Sqoop Hadoop Oracle Oracle
Oracle SQL Connector für HDFS Text Dateien HDFS oder DataPump HDFS Oracle Oracle Big Data SQL 12c Exadata&BDA
www.ise-informatik.de eXtreme Performance. Zusammenfassung Exadata €€€ DB/EMC €€€ Integration Layer Exadata € DB/EMC €
Hadoop
€
Vorher: Nacher:www.ise-informatik.de eXtreme Performance.