HANA学院(3)-Create(创建)

时间:2022-10-15 16:55:06

1. Create Roles

1. 1 log in as system Administrator-catalog- authorization -roles- create new roles- input role name- SQL privileges- add STS- right "select"-"no".

1.2  create a user and granted roles- STS READ ROLE

1.3 log in the user and check the table and see if we can read and delete and insert the table.


2. Create Central Repository in Hana using an existing local repository.

2.1 Start-all program- SAP BusinessObjects DataServices 4.1 Platform-Data Services Repository Manager-- select repository type( local, central- profiler- data base type(hana)- select ODBC data source- input user name and password.- Create- the local Repository has been successfully created.

2.2 SAP BusinessObjects BI Platform Central Management Console. login as administrator.- Organize- data services-configure a new data services repository( a cube on the upper left -then input name and password

2.3 Data Services Management Console- "Administrator"- Central Repositories- click the repository -click "add" in the right to add a group on the group tab- add user in the user tab- select the user in the up and then select the group down and select apply.- log out

2.4 Data Service Designer- select one local Repository -menu "tools"-central Repository -add, input password- activate, input password- connection finished

3. Create a table

3.1 Select SQL Editor- Create Schema STS (see4)

3.2 menu- file- import- data from local file- choose database- choose file- select schema-input table name-next - give primary key- refesh catalog and expand  sechma we will see the table.

3.3 Create a user - grant public role in Granted Roles and input respository in SQL previledge  

4. Create a schema

4.1 Hana Studio- SQL editor- input "create schema XXX"

4.2SQL editor-" Grant Select on Schema XXX to User xxx with grant option" 

5. Create  storage precedure using input variable.

5.1 Open Hana Stadio- Select sechma- select table - Open SQL Editor- input the following code:

Create procedure STS.STS_PROCEDURE_SCRIPT

(in cid integer) as

begin

Select * from "STS"."CUSTOMID" WHERE "CUSTOMID" = :(possibly ;) cid;

end 

5.2 Execute

5.3 find STS.STS_PROCEDURE_SCRIPT and input the following code

call "STS".“STS_PROCEDURE_SCRIPT”(106)

5.4 Execute


6. Create Store precedure

6.1 Open hana studio- new- procedure

HANA学院(3)-Create(创建)

HANA学院(3)-Create(创建)

HANA学院(3)-Create(创建)


HANA学院(3)-Create(创建)

execute

7. Create attribute views

7.1 HANA Studio- contents- new-attribute view- choose table  from catalog- select all colume- add as attribute- right click in the right and convert to key attribute

7.2 Create a calculated attribute, input the following and execute

"Address"+','+"region"+','+"city"

7.3 In the left select the attribute view- data preview

8. Create calculation Views

open HANA studio

8.1 manu -file- import- sap hana contents-data from local file, next- choose correct system- select the file, schema, input file name, -select primary key.-finish

8.2 content-select schema name- right click new-calculation view- input name of the calculation view, next- select two tables from catalog -Select projection

HANA学院(3)-Create(创建)

join the souce table to the projection

click the projection and select the column, right click and add to output.

select the union in the tool

HANA学院(3)-Create(创建)

double click the union and do the union from source to target.

HANA学院(3)-Create(创建)

link the union to output ,select column as attribute and as measures

HANA学院(3)-Create(创建) 

execute

9. create analytic previledge

mission: restrict the user to only custom ID less than 50

9.1 create a user

9.2 contents:-right click on the node and new-analytic previledge.-give the name of the Analytic previledge

9.2 add the calculation view-put custom ID as associated Attributes Restrictions-assign the restriction(<51)- execute

HANA学院(3)-Create(创建)

9.3 back to the user, package privileges- add STS package - read only- execute

9.4 analytic priviledge- add the analytic privilege- execute

9.5 SQL priviledge- add the calculation view- select

HANA学院(3)-Create(创建)

9.5 SQL Previledge  _SYS_BI -execute and select

SQL Previledge:Repository_rest: execute


(to be continued)