This tutorial series will cover two approaches to a sample project utilizing the predictive analytics capabilities of SAP HANA, express edition. This tutorial will show you how to configure your installation for the sample projects by creating a tenant database and a new user to manage that database.
Log in to your system database and select your database. Click on the Administration iconAdministration Iconand under the Overview tab, next to Installed Plug-ins check that AFL is installed.
Overview Tab
Open an SQL command line to your database and check again that AFL PAL Functions are installed.
Shell
SELECT * FROM SYS.AFL_FUNCTIONS WHERE PACKAGE_NAME='PAL';
If a list of AFL functions is generated, AFL PAL Functions are installed.
Step 2Create a Tenant Database and Activate the Script Server
+
Through your SQL command line, create a new tenant database.
Shell
CREATE DATABASE <DATABASE_NAME> SYSTEM USER PASSWORD <password>;
Example:
Code
CREATE DATABASE AFL_TEST SYSTEM USER PASSWORD Password1;
Activate script server on your new tenant database.
Shell
ALTER DATABASE <DATABASE_NAME> ADD 'scriptserver';
Step 3Connect to Your Tenant Database
+
Click on the Add System… iconAdd System.
Add the Host Name, Instance Number, Mode, and Description for your tenant database.
The Host Name and Instance Number are the same as your System database.
For Mode, when you select Multiple containers select Tenant database and enter the name of your tenant database.
Click Next >.
Choose Authentication by database user and add the SYSTEM user with your tenant SYSTEM user password.
Click Finish.
Step 4Download and Import the PAL Schema Sample Data
+
Open your preferred web browser and visit the SAP HANA Academy GitHub page and download the PAL21.zip file. Extract the PAL21.zip onto your local machine.
On SAP HANA Studio, select File > Import…
Under the SAP HANA folder, select Catalog Objects. Click Next >.
Import PAL20
Select your tenant database.
Select Import catalog objects from current client and select the directory where you extracted PAL21.zip. It will read PAL21.
Import Location
For Select Catalog Objects for Import, select and Add all of the objects from the PAL21 directory.
Click Next >.
Click Finish to begin your upload.
Importing the data will take some time.
Note:
You can check if the upload was successful by logging into your tenant database and cascading down from Catalog -> PAL -> Tables. You will see a series of tables.PAL Tables
Step 5Add a New User and Grant Proper Permissions for the Tenant Database
+
Open an SQL command line to your tenant database.
Create a new user:
Shell
CREATE USER <NEW_USER> PASSWORD <password>;
Example:
Code
CREATE USER DEVUSER PASSWORD Password1;
Note:
The script in the following tutorial assumes your new username is DEVUSER. Consider naming your new user DEVUSER to avoid additional steps.
Authorize creation, removal, and execution of PAL Procedures:
Shell
GRANT AFLPM_CREATOR_ERASER_EXECUTE, AFL__SYS_AFL_AFLPAL_EXECUTE TO <NEW_USER>;
Enable modeling:
Shell
GRANT MODELING TO <NEW_USER>;
Enable Native Development:
Shell
GRANT EXECUTE ON REPOSITORY_REST TO <NEW_USER>;GRANT REPO.READ, REPO.EDIT_NATIVE_OBJECTS, REPO.ACTIVATE_NATIVE_OBJECTS, REPO.MAINTAIN_NATIVE_PACKAGES ON ".REPO_PACKAGE_ROOT" TO <NEW_USER>;
Grant access to the sample data:
Shell
GRANT SELECT ON SCHEMA PAL TO <NEW_USER>;GRANT SELECT ON SCHEMA PAL TO _SYS_REPO;
Step 6Log in to the Tenant Database with the New User
+
Right-click on your tenant database. Select Add System with Different User….
Add New User
Add your new user and input its password.
Add User Info
Click Finish.
Note
You may be asked to give your new user a new password.
Step 7Grant Access to New User Schema
+
Open an SQL command line to your tenant database through your new user and enter the following:
Shell
GRANT SELECT, INSERT, DELETE ON SCHEMA <NEW_USER> TO _SYS_REPO;
Share feedback on this tutorial or join the conversation in SAP Community.
Submit detailed feedbackDiscuss in Community
Steps
Step 1 of 7
1. Ensure AFL is Installed2. Create a Tenant Database and Activate the Script Server3. Connect to Your Tenant Database4. Download and Import the PAL Schema Sample Data5. Add a New User and Grant Proper Permissions for the Tenant Database6. Log in to the Tenant Database with the New User7. Grant Access to New User Schema
Joule
AI Notice
Joule is an AI assistant. Generative AI may produce inaccurate, incomplete, or biased information. Always verify important details before acting on them.
Conversations are sent to SAP-hosted large language models for processing. Do not include personal data, credentials, or confidential information in your messages.
Joule's responses are based on the SAP tutorial catalog and may not reflect the latest product changes. For authoritative guidance, consult the linked tutorials and official SAP documentation.