Anda di halaman 1dari 43

Pump up the Volume!

The APEX Data Loader Inside Out


Roel Hartman

Copyright 2012 Apex Evangelists http://apex-evangelists.com Thursday, November 29, 12 1

About Roel

Director of APEX Evangelists NL 20+ years of Oracle Experience RoelH in the APEX Forum Presenter at KSCOPE, OOW, Collaborate, DOAG, UKOUG, ... Oracle ACE Director Blog @ http://roelhartman.blogspot.com Twitter : @RoelH
2
Thursday, November 29, 12 Copyright 2012 Apex Evangelists http://apex-evangelists.com 2

A Small Ad...

3
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

How To Get Data Into The Database?


DBA ETL Tools Data Pump SQL Loader External Tables UTL_FILE XLS Upload File Upload Data Load Wizard Websheets
Copyright 2012 Apex Evangelists http://apex-evangelists.com

Developer

End User

4
Thursday, November 29, 12

Data Load Wizard - Wizard

Plain Insert Tweak User Experience Add Lookups Add Transformations Add Concurrency Under the Covers

5
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

Plain Insert
DEMONSTRATION

6
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

7
Thursday, November 29, 12 7

8
Thursday, November 29, 12 8

9
Thursday, November 29, 12 9

10
Thursday, November 29, 12 10

11
Thursday, November 29, 12 11

12
Thursday, November 29, 12 12

13
Thursday, November 29, 12 13

14
Thursday, November 29, 12 14

15
Thursday, November 29, 12 15

16
Thursday, November 29, 12 16

17
Thursday, November 29, 12 17

18
Thursday, November 29, 12 18

19
Thursday, November 29, 12 19

20
Thursday, November 29, 12 20

21
Thursday, November 29, 12 21

Tweak user experience


DEMONSTRATION

22
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

22

23
Thursday, November 29, 12 23

24
Thursday, November 29, 12 24

25
Thursday, November 29, 12 25

Add lookups
DEMONSTRATION

26
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

26

27
Thursday, November 29, 12 27

28
Thursday, November 29, 12 28

29
Thursday, November 29, 12 29

So Insert New Value only works with auto generated keys! (it does insert a record with ST = NULL...) So you have to manage that using triggers...

30
Thursday, November 29, 12 30

Add transformations
DEMONSTRATION

31
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

31

32
Thursday, November 29, 12 32

Only columns that are uploaded can be transformed...

33
Thursday, November 29, 12 33

Add concurrency
DEMONSTRATION

34
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

34

35
Thursday, November 29, 12 35

Does NOT work when you update the UK (First/Last Name) -> will do an insert (or when you delete the record -> will do an insert)
36
Thursday, November 29, 12 36

Under the covers

37
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

37

Collections Used

After Data Load Source



38
Thursday, November 29, 12

CLOB_CONTENT PARSE_COL_HEAD SPREADSHEET_CONTENT

After Data / Table Mapping


LOAD_COL_HEAD LOAD_CONTENT NOT_LOAD_CONTENT

After Data Validation


FIN_LOAD_CONTENT
Copyright 2012 Apex Evangelists http://apex-evangelists.com 38

One-to-many Mapping

Sales sheet
Customers Products Orders Order Items

Use view + Instead of Triggers

39
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

39

Conclusions

40
Thursday, November 29, 12

Copyright 2012 Apex Evangelists http://apex-evangelists.com

40

Conclusions

Data Load Wizard - Wizard is easy to use for an APEX Developer Data Load Wizard is easy to use for an End User Data Load Wizard is for 1:1 mappings to Tables Table Lookups + Manage Concurrency are nice features Easy Transformation Rules are ... easy Complex Transformation Rules are ... complex & limited
Better use View with Instead Of Triggers Supports one-to-many mapping
41
Thursday, November 29, 12 Copyright 2012 Apex Evangelists http://apex-evangelists.com 41

Q A
&
42
Thursday, November 29, 12 Copyright 2012 Apex Evangelists http://apex-evangelists.com 42

roel@apex-evangelists.com http://apex-evangelists.com

43
Thursday, November 29, 12

Copyright 2012 Apex Evangelists


43