Using what you learned in Create an SAP HANA Database Project, you will create another database table and load sample data into it but without step by step instructions. Extrapolate what you learned from these same steps in the earlier tutorial to complete this task.
-
Create a new database table named TGT_SALARIES using the hdbtable artifact type in the data folder. Use the following table definition.
column table "TGT_SALARIES" (
ID INTEGER unique not null COMMENT 'Employee ID',
SALARY DOUBLE COMMENT 'Salary',
START_YEAR INTEGER not null COMMENT 'Starting Year',
GENDER NVARCHAR(1) COMMENT 'Gender',
REGION NVARCHAR(4) COMMENT 'Region',
"T-LEVEL" NVARCHAR(200) COMMENT 'T Level',
PRIMARY KEY ("ID")
)
COMMENT 'Employee Salary'
-
Create the configuration for the csv upload. In the data/loads folder, create a file called salaryload.hdbtabledata with the following content
{
"format_version": 1,
"imports": [{
"target_table": "TGT_SALARIES",
"source_data": {
"data_type": "CSV",
"file_name": "salarydata.csv",
"has_header": true,
"dialect": "HANA",
"type_config": {
"delimiter": ","
}
}
}]
}
-
Download this csv file – https://github.com/SAPDocuments/Tutorials/blob/master/tutorials/hana-cloud-calculation-view-differential-privacy/salarydata.csv into your computer. Upload it into the loads folder using the Upload Files option.
-
Deploy these new Artifacts