Download presentation
Presentation is loading. Please wait.
Published byClaude Bryan Modified over 8 years ago
1
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Analytik Mittels R als übergreifende Plattform Detlef E. Schröder Oracle DWH Community STCC DB Mitte @DetEgbSchroeder, http://www.oracledwh.de
2
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Themen Anforderungen an Datenmanagement R - Grundsätzliches Die Datendrehscheibe Datenbank – Oracle Hadoop XML Office R- in der Mitte Fragen und Antworten
3
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Anforderungen an Datenmanagement Eingabe Hadoop – Big Data klassische Dateien XSLX,TXT,LST,Mail Web Inhalte – Referenzdaten Datenbanken Oracle Streams 3 Verarbeitung Bereinigen Transformieren Analysieren Anreichern Mining Ausgabe Grafiken Tabellen Excel / Office SQL Druck
4
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Anforderungen an Datenmanagement Eingabe Hadoop – Big Data klassische Dateien XSLX,TXT,LST,Mail Web Inhalte – Referenzdaten Datenbanken Oracle Streams 4 Verarbeitung Bereinigen Transformieren Analysieren Anreichern Mining Ausgabe Grafiken Tabellen Excel / Office SQL Druck
5
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | R - Grundsätzliches 5
6
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | R – Überblick R Statistische Programmiersprache users sales histor y retur ns onlin e PCA 5 Factor 3Factor 1Clustering 4 Groups 28 16 2 1 8080 6060 4040 2020 0
7
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Warum sollte man sich für R interessieren Gehört zu den neuen aufkommenden Trends – Next “big thing” in Avanced Analytics – Moderne statistische Programmiersprache – Ausbildungsinstitute und Universitäten nutzen R für die Ausbildung und ersetzen damit traditionelle Tools – Advanced Analytics ist zunehmend kritisches Unterscheidungsmerkmal im DWH Technologie Stack R wird durch Oracle R Enterprise skalierbar Kostengünstige Alternative zu SAS Kernfunktionalität
8
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Daten-Visualisierung mit R http://gallery.r-enthusiasts.com/
9
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle R-Angebote Oracle R Distribution – Free download, pre-installed on Oracle Big Data Appliance, bundled with Oracle Linux – Enterprise support for customers of Oracle R Enterprise, Big Data Appliance, and Oracle Linux – Contribute bug fixes and enhancements to open source R ROracle – Open source Oracle database interface driver for R based on OCI – Maintainer is Oracle – rebuilt from the ground up – Many bug fixes and optimizations Oracle R Enterprise – Transparent access to database-resident data from R – Embedded R script execution through database managed R engines – Statistics engine Oracle R Connector for Hadoop – R interface to Oracle Hadoop Cluster on BDA – Access and manipulate data in HDFS, database, and file system – Write MapReduce functions using R and execute through natural R interface
10
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Die Datendrehscheibe 10
11
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Lesen und schreiben in dei Oracle DB Mögliche Szenarien mit Oracle R-Enterprise R Engine Direkten Zugriff auf alle Tabellen in der Datenbank File System R Engine Auslagern der Analysen in die Datenbank Zurückholen der Ergebnisse Anlegen neuer Objekte in der Datenbank R Engine Parallelisierung durch die Datenbank File System R Engine R-Analysen über SQL-Funktionen (Batch) R Engine Parallelisierung durch die Datenbank File System SQL
12
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | ORE bietet eine “in-database execution” – Funktionalität als transparente Schicht an What’s transparent about it? – R Benutzter benötigen nur R Syntax – Benutzer sehen Datenbank-Objeckte als spezielle R Objekte – Unterstützt weden fast alle R-Funktionen des Basis-Pakets – Unterstützt R's Statistik und Graphik-Pakete Funktional vergleichbar mit SAS DATA STEP, läuft allerdings in-Datenbank! Transparency Layer Support
13
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | ORE Packages PackageDescription ORETop Level Package for Oracle R Enterprise OREbaseCorresponds to R’s base package OREstatCorresponds to R’s stat package OREgraphicsCorresponds to R’s graphics package OREedaORE’s exploratory data analysis package containing SAS PROC-equivalent functionality ORExmlORE’s package supporting XML translation between R and Oracle Database – internal ORHCOracle R Hadoop Connector
14
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Invoke in-database aggregation function Client R Engine Other R packages Oracle R package R user on desktop Oracle Database User tables Transparency Layer aggdata <- aggregate(ONTIME_S$DEST, by = list(ONTIME_S$DEST), FUN = length) class(aggdata) head(aggdata) Source data is an ore.frame ONTIME_S, which resides in Oracle Database The aggregate() function has been overloaded to accept ORE frames aggregate() transparently switches between code that works with standard R data.frames and ore.frames Returns an ore.frame In-db stats ©2012 Oracle – All Rights Reserved select DEST, count(*) from ONTIME_S group by DEST
15
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Gezieltes Ansteuern einer Verarbeitungsvariante (Beispiel Regressions Modell) mod <- ore.doEval( function(param) { library(ORE) ore.connect(user="RQUSER", password="RQUSER„, sid="ORCL", host="192.168.1.16",port=1521) ore.sync() ore.attach() mod <- lm(ARRDELAY ~ DISTANCE + DEPDELAY, dat) return (mod) }); mod_local <- ore.pull(mod) class(mod_local) summary(mod_local) Daten bleiben im Memory Der Oracle Datenbank mod <- ore.doEval( function(param) { dat <- ore.pull(ONTIME_S) mod <- lm(ARRDELAY ~ DISTANCE + DEPDELAY, dat) return( mod ) }); mod_local <- ore.pull(mod) class(mod_local) summary(mod_local) Daten im Memory der R-Engine auf dem DB-Server Laufzeit: 3 Sekunden Laufzeit: 110 Sekunden
16
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | R on Hadoop 16
17
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Integrierte R Umgebung Oracle R Connector for Hadoop Native R MapReduce Native R HDFS Zugriff Mehr Produktivität ORE Client Host R Engine Hadoop Cluster Software R Engine MapReduce Nodes HDFS Oracle Big Data Appliance Oracle Exadata R Engine ORE ORHC
18
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | R on Files TXT – Read.table > meinetabelle <- read.table("/Pfad/zur/Tabelle.txt", header=TRUE) CSV – Read.csv XLS – read.xls und andere ODBC – RODBC für alle Files, für die es ODBC Verbindungen gibt 18
19
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | R on http Rcurl – Zeilenweise lesen eines http – Requests – Verarbeiten von <> Tags Standard Informationen auf Wikipedia... 19
20
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | R – in der Mitte
21
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | SQL – Datenbank als Integration SQL auf R - Funktionen SQL auf Datenbankobjekte SQL auf Hadoop durch die DB (Big Data SQL) 21
22
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | XML – als Integration Für Grafiken und Tabellen Als Basis für alles was XML spricht Berichtswesen – Z.B: OBIP – Oracle BI Publisher 22
23
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Anzeige über Business Intelligence Als Funktion oder gespeicherte Ergebnisse Das Kundenranking wird mit in den Berichten angezeigt
24
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Einbindung von R-Grafiken in OBIEE Mit Parametern ©2011 Oracle – All Rights Reserved
25
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Grafiken exportieren JPG, PNG, BMP, TIFF, SVG, EPS,... Direkt in ein Verzeichnis für weitere Nutzung 25
26
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
30
XLS(X) – In die Officewelt Aus R in Excel Für Tabellen und Berechnungen Öffnet in die Anwenderschicht – write.xls() oder xlsReadWrite als Package 30
31
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.