In SAP HANA History table: I have more than 1000 column base table and now I want to convert these table into HISTORY column table, is there any way to modify these table into history column table?. I have found one command but it seems this command is disabled  ALTER TABLE <Table_Name>CREATE HISTORY; is there any way to enable this command? or any other solution ?

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. dimitri susana

    SAP HANA History Table – Time traveling using SAP HANA

    SAP HANA History table is a way to support time travel queries. Time travel queries are queries against historical states of the database. A history table is a special type of table in HANA which records the period of time when a row is valid. With history tables, you can easily track and analyze changes in your business and accurately compare data from two points in time.

    Create SAP HANA History Tables:

    Syntax for creating a History Table:

    CREATE HISTORY COLUMN TABLE “<SCHEMA_NAME>”.”TEST_HISTORY_TABLE”
    (“ID” INTEGER NOT NULL,
    “NAME” VARCHAR(20),
    CITY VARCHAR(20),
    PRIMARY KEY (“ID”)
    );

    SuccessFactors Certification and Guide

    More Informations: http://www.saphanacentral.com/p/sap-hana-history-table-time-traveling.html

    (0) 
  2. Sony Mathew

    Anyone have any luck on using time travel in HANA?  It seems announced in 2013-ish then zero follow ups or solutions identified that work within HANA, without using external BODS server.  Our requirement is to look at values for current date values, and compare from yesterday values.. and do this using existing SAP tables (T001k, VBEP, VBUP, etc).  This thread seems to say that we cannot alter existing table to enable history… seems like a waste of systems resources and slow to use BODS to pull the data out, then save it back to HANA to build history.  Time travel fetching UTCDATETIME from history table does not work.  Have had ticket open with SAP for more than a month.. no response on solution.

    (0) 
    1. Lars Breddemann

      History tables are (still) there and work as documented. Unfortunately, they don’t exactly work as most users would want or need it. Also, they come with severe operational limitations that don’t make them the best choice for many scenarios.

      A little search on ‘history tables’ here in the community should provide a good overview on the discussion.

      So, if you want to use different snapshots of data to compare them, you probably will have to model the time dependency (when a record was valid for the application or the system) yourself. Data warehouse systems like SAP BW typically provide functions for such requirements – but nothing stops you from implementing it yourself.

       

      (0) 
      1. Sony Mathew

        Thanks for reply Lars. We have found that HANA procedures and XS jobs for scheduling these history snapshots has been working well for us.

        (0) 

Leave a Reply