Upload
ramreddye5905
View
30
Download
0
Embed Size (px)
DESCRIPTION
HANA Exercise 3
Citation preview
SAP HANA Training 3HANA ETL with BOBJData Services (BODS)
1
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
3
2
1
4
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
321
5
6
7
4
5
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
3
2
1
7
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
567
4321
8
9
9
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
543
2
1
6
11
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
543
2
1
6
13
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
543
2
1
6
15
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
32
1
17
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
3
2
1
19
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
10
9
12
3457
8
6
11
21
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
1
2
23
Importing data from flat files
Replicate the ‘GBI_FF_CUSTOMER_TRN’ format:1. Right‐click the ‘GBI_FF_CUSTOMER_TRN’
format2. Click ‘Replicate’
24
4
1
2
3
5
25
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
1
2
27
Importing data from flat files
Replicate the ‘GBI_FF_CUSTOMER_TRN’ format:1. Right‐click the ‘GBI_FF_CUSTOMER_TRN’
format2. Click ‘Replicate’
28
4
1
2
3
5
29
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
4
1
23
5
31
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
12
3
33
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
1
23
4
35
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
1
2
3
37
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
3
1
2
39
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
3
1
2
45
41
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
1
2
43
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
12
3 4
545
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
1
2
347
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
End of SAP HANA Training 3HANA ETL with BOBJData Services (BODS)
49