Skip to content

Commit cfcd2a0

Browse files
committed
XSA Tutorials
1 parent c35b6a4 commit cfcd2a0

31 files changed

Lines changed: 1068 additions & 32 deletions

File tree

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: SAP HANA XS Advanced, Connecting to the WebIDE to begin development
3+
description: Part 1 of 3, Explore how to connect to the SAP Web IDE for SAP HANA to begin development.
4+
tags: [products>sap-hana, products>sap-hana,-express-edition, topic>big-data, tutorial>beginner ]
5+
6+
---
7+
8+
## Prerequisites
9+
- **Proficiency:** Beginner
10+
- **Tutorials:** [How to create an SAP HANA Developer Edition in the Cloud](http://go.sap.com/developer/tutorials/hana-setup-cloud.html)
11+
12+
## Next Steps
13+
- [SAP HANA XS Advanced HTML5 Module](http://go.sap.com/developer/tutorials/xsa-html5-module.html)
14+
15+
16+
## Details
17+
### You will learn
18+
SAP HANA XS Advanced is the new development paradigm from SAP based around the Cloud Foundry concepts and architectures. To begin with you will need see how to connect to the SAP Web IDE for SAP HANA.
19+
20+
21+
### Time to Complete
22+
**15 Min**.
23+
24+
---
25+
26+
1. Launch the SAP Web IDE for SAP HANA at the following URL in your web browser. The `hostname` of course is the hostname of the SAP HANA Developer Edition that you created in the previous tutorial. Remember for XSA you will need to use the hostname and not the IP address of the server, instructions are found on the server landing page itself.
27+
28+
`http://<hostname>:53075/`
29+
30+
User: `WORKSHOP_01`
31+
Password: `HanaRocks2016` or what you changed it to
32+
33+
or you can use
34+
35+
User: `CODEJAMMER`
36+
Password: `CodeJam2016` or what you changed it to
37+
38+
![Login](https://raw.githubusercontent.com/SAPDocuments/Tutorials/master/tutorials/xsa-connecting-webide/1.png)
39+
40+
2. We will begin by creating a new project from template. Use `File->New->Project from Template`
41+
42+
![New Project](https://raw.githubusercontent.com/SAPDocuments/Tutorials/master/tutorials/xsa-connecting-webide/2.png)
43+
44+
3. Choose Multi-Target Application Project and then press Next.
45+
46+
![Project Template](https://raw.githubusercontent.com/SAPDocuments/Tutorials/master/tutorials/xsa-connecting-webide/3.png)
47+
48+
4. Enter the project name `DEV602`. Press Next.
49+
50+
![Project Name](https://raw.githubusercontent.com/SAPDocuments/Tutorials/master/tutorials/xsa-connecting-webide/4.png)
51+
52+
5. You can optionally enter a description for your new application and then press Next.
53+
54+
![Project Name](https://raw.githubusercontent.com/SAPDocuments/Tutorials/master/tutorials/xsa-connecting-webide/5.png)
55+
56+
6. Press Finish to complete the wizard and generate your new project.
57+
58+
![Finish Project](https://raw.githubusercontent.com/SAPDocuments/Tutorials/master/tutorials/xsa-connecting-webide/6.png)
59+
60+
7. Your empty project has been created.
61+
62+
![Finish Project](https://raw.githubusercontent.com/SAPDocuments/Tutorials/master/tutorials/xsa-connecting-webide/7.png)
63+
64+
65+
## Next Steps
66+
- [SAP HANA XS Advanced HTML5 Module](http://go.sap.com/developer/tutorials/xsa-html5-module.html)

tutorials/xsa-graphical-view/xsa-graphical-view_COPY_FROM_WDFM33344101A.md

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
title: Creating a Graphical Calculation View
3+
description: Creating a Graphical Calculation View with a Dimension data type
4+
tags: [ tutorial>intermediate, topic>sql, products>sap-hana, products>sap-hana,-express-edition ]
5+
---
6+
## Prerequisites
7+
- **Proficiency:** Intermediate
8+
- **Tutorials:** [Creating an HDI Module](http://go.sap.com/developer/tutorials/xsa-hdi-module.html)
9+
10+
## Next Steps
11+
- [Creating a Calculation View with a Cube data type and Star Join](http://go.sap.com/developer/tutorials/xsa-sqlscript-cube.html)
12+
13+
## Details
14+
### You will learn
15+
You will learn about creating a graphical calculation views with dimension data.
16+
17+
### Time to Complete
18+
**15 Min**.
19+
20+
---
21+
22+
1. Before you start creating Calculation views, you will want to import a larger database module than you care to create by hand. Right mouse click on the `db/src/data` folder and choose Import -> From File System.
23+
24+
![Import](1.png)
25+
26+
2. Choose the file `data.zip` from the Download folder of your local client machine. Keep all other parameters the same. Press OK. Confirm that it is OK to overwrite the existing files. If the file is not available please check our GIT repository.
27+
![file select](2.png)
28+
![confirm](3.png)
29+
30+
3. Now that you have your database development objects, you are ready to build the module which will create them in the HANA database. This process technically executes a Node.js application which will call over to HANA and deploy these database artifacts into their container. Right mouse click on the db folder and choose *Build*.
31+
![Build](4.png)
32+
33+
4. Similar to the run activity of the web module earlier; the status of the build will be displayed in a window in the lower right side of the IDE. If everything worked correctly, you should see that the build completed successfully.
34+
![Console output](5.png)
35+
5. There is a new database tool called the HANA Runtime Tools (or HRTT) that can be used to view and interact with HDI created content. Open a new browser tab and navigate to `https://<hostname>:51006` to access this tool.
36+
![HRTT](6.png)
37+
6. You can explore some of the new tables and their content that have been imported. This is the SHINE (SAP HANA Interactive Education) content.
38+
![SHINE](7.png)
39+
7. Now you are ready to create our calculation views. From the `db/src` folder, right click and choose “New”, then “Folder”.
40+
![SHINE](8.png)
41+
8. Enter the name of the folder as “models” and click “OK”.
42+
![SHINE](9.png)
43+
9. In the models sub-folder of your project, create a new calculation view based upon the expanded information for the products. This will require joining the products, texts, `businessPartner`, and address tables. Right mouse click on the models package, choose New -> Calculation View
44+
![SHINE](10.png)
45+
10. Enter the name as PRODUCTS and a Label of Products View. Choose DIMENSION as the data category. A DIMENSON Calculation View will be very similar to the older Attribute View – A basic join with no aggregation. Click “Create”.
46+
![SHINE](11.png)
47+
11. You want to join several tables from our project. Ultimately you will join `MD.Products`, `MD.BusinessPartner`, `MD.Addresses` and `Util.Texts` (twice). In order to do so we have to create a join node for each join criteria. Start by creating a Join Node pressing the Create Join button.
48+
![SHINE](12.png)
49+
50+
12. As we have several joins to add drag this new join node down near the bottom of the design window.
51+
52+
![SHINE](13.png)
53+
54+
13. Click on the node and rename it to `Product_BP`.
55+
56+
![SHINE](14.png)
57+
58+
14. Press the Plus button next to the node to add `tables/views` to the join node.
59+
60+
![SHINE](15.png)
61+
62+
15. Add `MD.Products` to the node.
63+
64+
![SHINE](16.png)
65+
66+
16. Repeat the process and add `MD.BusinessPartner` to the node.
67+
68+
![SHINE](17.png)
69+
70+
17. We now want to create a join between the two tables on the `SUPPLIER.PARTNERID` to the `PARTNERID` column. Drag and drop to connect the two columns in the Join Definition.
71+
72+
![SHINE](18.png)
73+
74+
18. Switch to the Mapping tab. We can then select which columns we want from this part of the join. ``` Select PRODUCTID, TYPECODE, CATEGORY, CURRENCY, PRICE, NAMEID, DESCID, PARTNERID, COMPANYNAME,and ADDRESES.ADDRESSID and then choose Add To Output. ```
75+
![SHINE](19.png)
76+
77+
14. Optionally, you can change the name of a column as it becomes part of the view. For example you might change CATEGORY to `ProductCategory`.
78+
79+
![SHINE](20.png)
80+
81+
15. Repeat the process of adding a Join Node. Name this new Join Node Address and connect the output `Product_BP` to this new join node.
82+
83+
![SHINE](21.png)
84+
![SHINE](22.png)
85+
86+
16. Add the `MD.Addresses` table to this join node.
87+
88+
![SHINE](23.png)
89+
90+
17. Create a join between the `ADDRESSES_ADDRESSID` of the previous join node output and the `ADDRESSID` column of the `MD.Addresses` table.
91+
92+
![SHINE](24.png)
93+
94+
18. Repeat the process of adding columns to the output. Select all columns from the `Product_BP` node except `ADDRESSES_ADDRESSID`. From The `MD.Addresses` table select CITY, POSTALCODE, STREET, BUILDING, COUNTRY, and REGION.
95+
96+
![SHINE](25.png)
97+
98+
19. Repeat the process of adding a Join Node. Name this new Join Node `Product_Name` and connect the output Address to this new join node.
99+
100+
![SHINE](26.png)
101+
102+
20. Add the `Util.Texts` table to this join node.
103+
104+
![SHINE](27.png)
105+
106+
21. Create a join between the `NAMEID` of the previous join node output and the `TEXTID` column of the `Util.Texts` table.
107+
108+
![SHINE](28.png)
109+
110+
22. In the Join Properties window, change the Join Type to Text Join and the Language Column to LANGUAGE.
111+
112+
![SHINE](29.png)
113+
114+
23. Repeat the process of adding columns to the output via the mapping tab. Select all columns from the Address node except `NAMEID`. From the `Util.Texts` table select TEXT but change the name of the TEXT column in the output to `ProductName`.
115+
116+
![SHINE](30.png)
117+
118+
24. Repeat the process of adding a Join Node. Name this new Join Node `Product_Desc` and connect the output `Product_Name` to this new join node.
119+
120+
![SHINE](31.png)
121+
122+
25. Add the `Util.Texts` table to this join node.
123+
124+
![SHINE](32.png)
125+
126+
26. Create a join between the `DESCID` of the previous join node output and the `TEXTID` column of the `Util.Texts` table.
127+
128+
![SHINE](33.png)
129+
130+
27. In the Join Properties window, change the Join Type to Text Join and the Language Column to LANGUAGE.
131+
132+
![SHINE](34.png)
133+
134+
28. Repeat the process of adding columns to the output via the mapping tab. Select all columns from the `Product_Name` node except `DESCID`. From the `Util.Texts` table select TEXT but change the name of the TEXT column in the output to `ProductDesc` .
135+
136+
![SHINE](35.png)
137+
138+
29. Connect the output of the `Product_Desc` node to the Projection node at the top of the design window.
139+
140+
![SHINE](36.png)
141+
142+
30. In the Projection node and Mapping tab, press the Auto Map by Name button.
143+
144+
![SHINE](37.png)
145+
146+
31. Select the Semantics node and choose the Columns tab. Select the Key column for PRODUCTID.
147+
148+
![SHINE](38.png)
149+
150+
32. In the View Properties tab, change the Apply Privileges to the blank value.
151+
152+
![SHINE](39.png)
153+
154+
33. Save your model
155+
156+
![SHINE](40.png)
157+
158+
34. Build the `hdb` module and then return to the HRTT tool. Your container will now have an entry in the Column Views folder for this new Calculation View.
159+
160+
![SHINE](41.png)
161+
162+
35. For an initial test make sure your output looks similar to the following:
163+
164+
![SHINE](42.png)
165+
166+
## Next Steps
167+
- [Creating a Calculation View with a Cube data type and Star Join](http://go.sap.com/developer/tutorials/xsa-sqlscript-cube.html)

tutorials/xsa-hdi-module/a.png

-35.8 KB
Binary file not shown.

0 commit comments

Comments
 (0)