Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
1,222

Do you understand the following SQL statements in SAP HANA Platform?

Set 1:

CREATE DATABASE LV_DB0 SYSTEM USER PASSWORD Manager1;

ALTER SYSTEM STOP DATABASE LV_DB0;

DROP DATABASE LV_DB0;

Set 2:

CREATE TABLE "TIERING_DEMO"."SalesOrderItems_WARM" (

     "ID"        integer NOT NULL

   ,"LineID"        smallint NOT NULL

   ,"ProductID"  integer NOT NULL

   ,"Quantity"    integer NOT NULL

      ,"ShipDate"    date NOT NULL

      , PRIMARY KEY ("ID","LineID")

   ) USING EXTENDED STORAGE;

  ALTER TABLE "TIERING_DEMO"."TEST_DT" USING extended storage;

Set 3:

CREATE INPUT STREAM MACHINEDATA SCHEMA (

         MACHINEID string ,

         EVENT_TIME msdate ,

         EVENT_NAME string ,

         EVENT_DESCRIPTION string ,

         EVENT_VALUEstring ) ;

CREATE REFERENCE
MACHINE_REF_reference1

     SCHEMA (

         MACHINEID string ,

         MACHINETYPE string ,

         MAX_TEMP integer ,

         MIN_TEMP integer ,

         LOCATION string ,

         TEMP_UNIT string )

         PRIMARY KEY ( MACHINEID )

         PROPERTIES service = 'hdbdmm165' ,

         source = 'MACHINE_REF' ,

        sourceSchema = 'DMM165_0' ,

        service = 'hdbdmm165' ;

CREATE OUTPUT STREAM ACTIVITY_HIST

AS SELECT *

FROM MACHINEDATA WHERE
MACHINEDATA.EVENT_NAME =
'DOOR' ;

ATTACH OUTPUT ADAPTER HANA_Output1 TYPE hana_out TO ACTIVITY_HIST

PROPERTIES service = 'hdbdmm165',

       sourceSchema = 'DMM165_60',

       table = 'ACTIVITY_HIST';

CREATE OUTPUT WINDOW AVG_TEMP

PRIMARY KEY DEDUCED

AS SELECT

  EVENTS.MACHINEID MACHINEID ,

       LAST( EVENTS.EVENT_TIME ) EVENT_TIME ,

       avg( to_integer(EVENTS.EVENT_VALUE) ) AVG_TEMP ,

       EVENTS.MAX_TEMP MAX_TEMP ,

       EVENTS.MIN_TEMP MIN_TEMP ,

       EVENTS.LOCATION LOCATION ,

       EVENTS.TEMP_UNIT TEMP_UNIT

FROM EVENTS KEEP 30 SEC

GROUP FILTER EVENTS.EVENT_NAME = 'TEMP'

GROUP BY EVENTS.MACHINEID ;

Set 4:

USE WORKSPACE uri:genealogyWS;

RESULT uri:myResult

FROM $i : $NONTERMS

  WHERE $i@uri:firstname = 'Hugo' AND $i@core:type = uri:person;

Set 5:

START TASK “FV_TEST”.”Transformation::Suppliers”;


These are some of the innovations SAP HANA SPS 09!

Visit us at the show floor – PTS08 - SAP HANA Platform table to learn more about what these SQL statements are.

Learn how these innovations simplify landscape and application development and help you develop applications that were not possible before.

Topics covered at PTS08 - SAP HANA Platform table are:

  • Multitenant database containers
  • Dynamic tiering
  • Smart data streaming
  • Smart data integration & smart data quality
  • Graph
  • SAP Lumira Server
4 Comments