Skip to Content
avatar image
Former Member

HANA SPS12 - Alter Virtual table definition

Hi,

we are using HANA SPS12 and our requirement is to refresh our virtual table definition (via SDA) to pull in the new fields created in source system (SQL Server) but the command ALTER VIRTUAL <table> REFRESH DEFINITION is not working. So I request you to pitchin with your ideas.

P.S: I don't prefer to delete the table and re-create it as there are multiple views built on top of these virtual tables.

Thanks & Regards

DD

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • May 21, 2017 at 01:40 PM

    Hi DD,

    We had exactly same problem and SAP responded that this command is only available from HANA 2.0. Sorry for bad news!

    They provided me with following workaround:

    1. Add the column you need to the source table

    2. Create a new virtual table based on this source table

    3. Follow the Steps "Replace a Data Source in Calculation Views" to modify your Calculation View.

    https://help.sap.com/http.svc/rc/fb8f7a9f7860468b84a07eab0a7d0a98/2.0.01/en-US/SAP_HANA_Modeling_Guide_for_SAP_HANA_Studio_en.pdf

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for your brilliant post Dorothy! This is exactly what I'm after and yes it is indeed bad news! :) Bring on HANA 2.0!

      L

  • Feb 20 at 09:23 PM

    Testing in 2.0 I found that the command ALTER VIRTUAL <table> REFRESH DEFINITION does not always recognize a change has taken place. For example when just the description of a field is changed it will not be updated in the virtual table by the ALTER command.

    To ensure the virtual table definition is current, the following lines can be executed in SQL. This can delete and recreate the table even if there are views built on top of the virtual table.

    DROP TABLE "SCHEMA"."PACKAGE.PACKAGE/VIEW";

    CREATE VIRTUAL TABLE "SCHEMA"."PACKAGE.PACKAGE/VIEW" AT "REMOTESOURCE"."<NULL>"."_SYS_BIC"."PACKAGE.PACKAGE/VIEW";

    Add comment
    10|10000 characters needed characters exceeded