49
SAP HANA Training 3 HANA ETL with BOBJ Data Services (BODS) 1

HANA Exercise 3

Embed Size (px)

DESCRIPTION

HANA Exercise 3

Citation preview

Page 1: HANA Exercise 3

SAP HANA Training 3HANA ETL with BOBJData Services (BODS)

1

Page 2: HANA Exercise 3

Overview of this session

• BOBJ Data Services login• Adding the HANA database as a datastore• Importing table structures to BODS• Importing data from flat files• Creating a new project• Creating a new batch job• Adding a data flow to a batch job• Executing a batch job to complete the data import

2

Page 3: HANA Exercise 3

3

2

1

4

3

Page 4: HANA Exercise 3

BOBJ Data Services login

Open Business Objects Data Services Designer:1. Click the ‘Start’ button2. Select ‘All Programs’3. Open the ‘SAP Business Objects Data Services 

4.1’ folder4. Click ‘Data Services Designer’

4

Page 5: HANA Exercise 3

321

5

6

7

4

5

Page 6: HANA Exercise 3

BOBJ Data Services login

Login to the platform:1. Enter comerithana.vm.cld.sr for the ‘System’2. Enter Training as the ‘User name’3. Enter 1234 as the ‘Password’4. Choose Enterprise as the ‘Authentication’ 

method5. Click ‘Log On’ to populate the repository list6. Choose BOBJ HANA Repository 018 from the list 

of repositories7. Click ‘OK’

6

Page 7: HANA Exercise 3

3

2

1

7

Page 8: HANA Exercise 3

Add a HANA database as a datastore

Create a new datastore:1. Click the ‘Datastore’ tab from the bottom left2. Right‐click in the datastore list3. Click ‘New’ from the context menu

8

Page 9: HANA Exercise 3

567

4321

8

9

9

Page 10: HANA Exercise 3

BOBJ Data Services login

Create a new datastore:1. Enter HANA_TRN as the ‘Datastore name’2. Choose Database as the ‘Datastore type’3. Choose SAP HANA as the ‘Database type’4. Choose HANA 1.X as the ‘Database version’5. Enter comerithana as the ‘Database server 

name’6. Enter 30015 as the ‘Port’7. Enter Training as the ‘User name’8. Enter 1234 as the ‘Password’

10

Page 11: HANA Exercise 3

543

2

1

6

11

Page 12: HANA Exercise 3

Importing table structures to BODS

Importing by name:1. Right‐click the HANA_TRN repository2. Click ‘Import By Name’3. Verify ‘Type’ is set to Table4. Enter CUSTOMER_ATTR_TRN for the ‘Name’5. Verify Training is entered for ‘Owner’6. Click ‘Import’

12

Page 13: HANA Exercise 3

543

2

1

6

13

Page 14: HANA Exercise 3

Importing table structures to BODS

Importing by name:1. Right‐click the HANA_TRN repository2. Click ‘Import By Name’3. Verify ‘Type’ is set to Table4. Enter PRODUCT_ATTR_TRN for the ‘Name’5. Verify Training is entered for ‘Owner’6. Click ‘Import’

14

Page 15: HANA Exercise 3

543

2

1

6

15

Page 16: HANA Exercise 3

Importing table structures to BODS

Importing by name:1. Right‐click the HANA_TRN repository2. Click ‘Import By Name’3. Verify ‘Type’ is set to Table4. Enter SALES_TRN for the ‘Name’5. Verify Training is entered for ‘Owner’6. Click ‘Import’

16

Page 17: HANA Exercise 3

32

1

17

Page 18: HANA Exercise 3

Importing table structures to BODS

Verify table structure import:1. Click the ‘+’ beside ‘HANA_TRN’ to expand 

the datastore2. Click the ‘+’ beside ‘Tables’ to expand the list 

of tables3. Verify that the CUSTOMER_ATTR_TRN, 

PRODUCT_ATTR_TRN, and SALES_TRN tables are listed

18

Page 19: HANA Exercise 3

3

2

1

19

Page 20: HANA Exercise 3

Importing data from flat files

Create flat file formats:1. Click the ‘Formats’ tab at the bottom of the 

‘Local Object Library’ pane2. Right‐click ‘Flat Files’3. Select ‘New’ from the context menu

20

Page 21: HANA Exercise 3

10

9

12

3457

8

6

11

21

Page 22: HANA Exercise 3

Importing data from flat filesCreate the customer flat file format:1. For ‘Type’ choose Delimited2. For ‘Name’ enter GBI_FF_CUSTOMER_TRN3. For ‘Location’ choose Job Server4. For ‘Root directory’ enter C:\GBI_dataset5. For ‘File name(s)’ enter Customer.csv6. Choose ‘Yes’ any time you are prompted to ‘Overwrite the current 

schema…’7. For ‘Column’ choose Semicolon8. For ‘Date’ enter yyyymmdd9. For ‘Skip row header’ choose Yes10. Use slide 6 of HANA Exercise 2 to correct any errors in the 

proposed Customer attribute table in the upper right11. Click ‘Save & Close’

22

Page 23: HANA Exercise 3

1

2

23

Page 24: HANA Exercise 3

Importing data from flat files

Replicate the ‘GBI_FF_CUSTOMER_TRN’ format:1. Right‐click the ‘GBI_FF_CUSTOMER_TRN’ 

format2. Click ‘Replicate’

24

Page 25: HANA Exercise 3

4

1

2

3

5

25

Page 26: HANA Exercise 3

Importing data from flat filesCreate the customer flat file format:1. Change the ‘Name’ to 

GBI_FF_PRODUCT_TRN2. Change the ‘File name(s)’ to Product.csv3. Choose ‘Yes’ when prompted to ‘Overwrite 

the current schema…’4. Use slide 10 of HANA Exercise 2 to correct 

any errors in the proposed Product attribute table in the upper right

5. Click ‘Save & Close’26

Page 27: HANA Exercise 3

1

2

27

Page 28: HANA Exercise 3

Importing data from flat files

Replicate the ‘GBI_FF_CUSTOMER_TRN’ format:1. Right‐click the ‘GBI_FF_CUSTOMER_TRN’ 

format2. Click ‘Replicate’

28

Page 29: HANA Exercise 3

4

1

2

3

5

29

Page 30: HANA Exercise 3

Importing data from flat filesCreate the customer flat file format:1. Change the ‘Name’ to GBI_FF_SALES_TRN2. Change the ‘File name(s)’ to Salesdata.csv3. Choose ‘Yes’ when prompted to ‘Overwrite 

the current schema…’4. Use slide 14 of HANA Exercise 2 to correct 

any errors in the proposed Sales transaction table in the upper right

5. Click ‘Save & Close’30

Page 31: HANA Exercise 3

4

1

23

5

31

Page 32: HANA Exercise 3

Creating a batch job1. Click ‘Project’ in the upper left2. Select ‘New’3. Click ‘Project’4. Enter GBI_DS_STUDENT_TRN as the ‘Project 

name’5. Click ‘Create’

32

Page 33: HANA Exercise 3

12

3

33

Page 34: HANA Exercise 3

Creating a batch job1. Right‐click the ‘GBI_DS_STUDENT_TRN’ 

project2. Click ‘New Batch Job’3. Type GBI_JOB_CUSTOMER_TRN as the name 

of the batch job and press ‘Enter’

34

Page 35: HANA Exercise 3

1

23

4

35

Page 36: HANA Exercise 3

Adding a data flow to a batch job1. Click the ‘Data Flow’ button from the toolbar 

in the upper right2. Click the blank project workspace to create 

the data flow3. Enter GBI_DF_CUSTOMER_TRN as the name 

of the data flow4. Double‐click the data flow icon to open the 

data flow

36

Page 37: HANA Exercise 3

1

2

3

37

Page 38: HANA Exercise 3

Add a flat file format to the data flow

1. Drag the flat file format ‘GBI_FF_CUSTOMER_TRN’…

2. …to the ‘GBI_DF_CUSTOMER_TRN – Data Flow’ workspace

3. Click ‘Make Source’

38

Page 39: HANA Exercise 3

3

1

2

39

Page 40: HANA Exercise 3

Add a datastore table to the data flow

1. Drag the flat file format ‘CUSTOMER_ATTR_TRN’…

2. …to the ‘GBI_DF_CUSTOMER_TRN – Data Flow’ workspace

3. Click ‘Make Target’

40

Page 41: HANA Exercise 3

3

1

2

45

41

Page 42: HANA Exercise 3

Linking source and target with a query1. Click the ‘Query Transform’ button from the 

toolbar in the upper right2. Click the area between the flat file and datastore

table in the ‘GBI_DF_CUSTOMER_TRN’ workspace to add the query

3. Drag a connection between the ‘Customer.csv’ source file and the ‘Query’

4. Drag a connection between the ‘Query’ and the ‘CUSTOMER_ATTR_TRN’ target

5. Double‐click the ‘Query’ to open it42

Page 43: HANA Exercise 3

1

2

43

Page 44: HANA Exercise 3

Mapping source fields to the target1. Drag the fields on the left and drop them on 

the corresponding fields on the right2. When finished, the query should look like the 

screenshot above

44

Page 45: HANA Exercise 3

12

3 4

545

Page 46: HANA Exercise 3

Executing a batch job1. Right‐click the ‘GBI_JOB_CUSTOMER_TRN’2. Select ‘Execute’ from the context menu3. Click ‘Yes’ to confirm the ‘Save all changes 

and execute’ dialogue4. Click ‘OK’ to confirm the ‘Execution 

Properties’5. Verify the job completed successfully from 

the ‘Job Log’Note:  Repeat the steps in slides 31‐46 to import data to the product and sales transaction tables

46

Page 47: HANA Exercise 3

1

2

347

Page 48: HANA Exercise 3

Verify the data importFrom HANA Studio1. Right‐click the ‘CUSTOMER_ATTR_TRN’ table2. Click ‘Open Data Preview’3. Verify data has been imported in the center 

paneNote:  Repeat the process above for the ‘PRODUCT_ATTR_TRN’ and ‘SALES_TRN’ tables

48

Page 49: HANA Exercise 3

End of SAP HANA Training 3HANA ETL with BOBJData Services (BODS)

49