Lightning Talk: Get Even More Value from MongoDB Applications
- 2. 2
Big Data Since 1984
• Teradata Corporation – 30+ years experience
– Global Leader in Enterprise Data Warehousing
- Teradata/Aster Database Technology
- Teradata Applications
- Consulting Services
• Top 10 US Software Company
– Positioned in Gartner’s Leader’s Quadrant since 1999
– InformationWeek’s Top 10 Most Strategic Vendors
– Dow Jones Sustainability Index
– World’s Most Ethical Companies – Ethisphere Institute
– #2 in The 25 Best Companies in America - The Motley Fool
• Global presence and world-class customer list
– 1,500+ customers in ~70 countries
– 10,000+ data professionals world wide
- 4. 4
JSON in the Data Warehouse
• We added JSON to tables as columns
• Any user has easy access to JSON
– Dashboards, ad hoc, OLAP
– Predictive analytics, statistics, etc.
– Discovery analytics
Teradata
Databases
table
BI Tools
SQL
Source
data
ETL
JSON
- 5. 5
Scenario: Machines Packing Boxes Emits JSON
{ "MFG_Line": {
"Product”: {
"Color”: "Red”,
"Size”: "Large”
"Prod_ID”: 100,
"Create_Time”: "2013-06-15 20:07:27”
},
"Machine”: {
"Temp”: 95,
"Warning”: null,
"FW_Version”: 1.2,
"Sensor_Code”: 152
}
} }
- 6. 6
JSONPath in Teradata 15.0 SQL
Color Size Prod_ID Create_Time
----- ----- ------- -------------------
Blue Small 96 2013-06-17 20:07:27
SELECT
box.MFG_Line.Product.Color AS "Color",
box.MFG_Line.Product.Size AS "Size",
box.MFG_Line.Product.Prod_ID AS "Prod_ID",
box.MFG_Line.Product.Create_Time AS "Create_Time"
FROM mfgTable
WHERE CAST(box.MFG_Line.Product.Create_Time
AS TIMESTAMP) >= TIMESTAMP'2013-06-16 00:00:00'
AND box.MFG_Line.Product.Prod_ID = 96;
- 7. 7
eCommerce in Action: A Virtuous Cycle
Data
Warehouse
Buyer preferences
Sales catalog
Campaigns
Recent purchases
Profitability
Shard
Shard
Shard
Shard
Shard
Shard
Shard
Shard
- 8. 8
Call Center Efficiency
Data
Warehouse
Trouble tickets
Web clicks
Payment history
Claims
Up-sell offers
Shard
Shard
Shard
Shard
Shard
Shard
Shard
Shard
web logs
- 10. 10
Business users Data scientists
TERADATA
ASTER
SQL,
SQL-MR,
SQL-GR
OTHER
DATABASES
Remote
Data
Teradata and MongoDB: QueryGrid
TERADATA
DATABASE
Teradata
Systems
HADOOP
Push-down
to Hadoop
IDW
TERADATA
DATABASE
Discovery
ASTER
DATABASE
MONGODB
NoSQL
Database
- 11. 11
Example QueryGrid Syntax
• Standard Server Grammar
SELECT doc. item_id, doc.desc
FROM collection@MongoDBserver doc
WHERE doc.qty > 1;
• Foreign Table Select
SELECT doc.id, doc.desc
FROM FOREIGN TABLE (
‘testdb.products.find({ qty: { $lt: 25 } }, { item_id: 1, qty: 1,
desc: 1 }’ )@MongoDBserver AS imported_products(doc JSON(160000)) );
• Insert / Export
INSERT INTO testdb.customers@MongoDBserver
SELECT JSON_compose( item_id, doc.qty ) as document
FROM cust_data;
- 12. 12
SQL Connecting to MongoDB
• Parallel data transfer for queries without aggregation
• Foreign query pass-through for selection, projection of data in MongoDB
SELECT prod_doc.itemid, prod_doc.qty FROM FOREIGN TABLE (
‘testdb.products.find({ qty: { $lt: 25 } }, { item_id: 1,
qty: 1 }’ )
@MongoServer
RETURNS (prod_doc JSON(160000)) AS imported_products
INNER JOIN local_products ON
local_products.product.item=prod_doc.itemid;
- 13. 13
Scale-out NoSQL + Scale-out DW SQL
Application
NoSQL
Query router Query router Query router
Shard 1 Shard 2 Shard 3 Shard N
Primary Primary Primary Primary
SQL
PE
AMP AMP
PE
AMP AMP
PE
AMP AMP
PE
AMP AMP
- 14. 14
Query Router
Shard 1
Shard 2
Shard 3
Shard 4
Contract Phase
SQL
Teradata
node
AMP
AMP
AMP
AMP
PE
E
A
H
- 15. 15
Teradata
node
AMP
AMP
AMP
AMP
PE
E
A
H
Contract Phase
Query Router
Shard 1
Shard 2
Shard 3
Shard 4
- 16. 16
Import Data from Shards
Teradata
node
AMP
AMP
AMP
AMP
PE
E
A
H
Query Router
Shard 1
Shard 2
Shard 3
Shard 4
- 17. 17
Why Teradata and MongoDB Partnership?
• Teradata needs a partner with strong
JSON data solutions
• MongoDB = leader in new JSON
applications
• Operational + analytical
– Complementary
• Customers accelerate JSON analysis
Application Data
MongoDB Teradata
Analytics
- 20. Marketing
Applications
Business
Intelligence
Data
Mining
Math
and Stats
Languages
ANALYTIC TOOLS
& APPS
Customers
Partners
Business
Analysts
Data
Scientists
USERS
TERADATA UNIFIED DATA ARCHITECTURE
MOVE MANAGE ACCESS
INTEGRATED DATA
WAREHOUSE
INTEGRATED DISCOVERY
PLATFORM
ERP
SCM
CRM
Images
Audio
and Video
Machine
Logs
Text
Web and
Social
SOURCES
DATA
PLATFORM
Marketing
Executives
Operational
Systems
Frontline
Workers
Engineers
TERADATA
DATABASE
HORTONWORKS
CLOUDERA
MAPR
TERADATA DATABASE
TERADATA ASTER DATABASE