SAP Knowledge Base Article - Public

3159460 - How to view the SQL Query entered in a Freehand SQL of a Model in SAP Analytics Cloud?

Symptom

  • Unable to view the SQL Query.
  • Editing is disabled for queries using Freehand SQL.
  • How to view the Freehand SQL used for a Model in SAP Analytics Cloud?
  • In a Model, when clicking "Edit" on a Connection based on SQL Database using Freehand SQL, it is not possible to view the SQL Query. 
        
         
  • Note: Images and data in this SAP Knowledge Base Article is from SAP internal systems, sample data, or demo systems. Any resemblance to real data is purely coincidental.

Environment

  • SAP Analytics Cloud

Reproducing the Issue

  1. In SAP Analytics Cloud, open a Model based on a SQL Database using Freehand SQL
     
  2. In the Toolbar, under Workspace, select: "Data Management"
      
  3. Under Import Jobs, select the source, and click on "Edit Query"
      
  4. For the following message, click "OK"
      
       "Editing the query selections may cause refresh to fail. Are you sure you want to continue?"
      
  5. It will then display:

       "Editing is disabled for queries using Freehand SQL"

    And it does not show the SQL Query used for the Freehand SQL.

Cause

  • There is unfortunately no option to view the SQL Query entered in the Freehand SQL of a SQL Database for a Model.

Resolution

  • The workaround to be able to view the SQL Query used in the Freehand SQL of a SQL Database for a Model is:
    1. Create a new Model based on the same SQL Databases.
    2. During the creation process, select the option "Copy a query from a model"
    3. Select the Model that uses Freehand SQL.
    4. It will then show the SQL Query used for the connection for the Model.
          
           
  • To view the SQL Query used in the Freehand SQL of a SQL Database for a Model:  
       
    1. In SAP Analytics Cloud, go to: "Modeler"  
        
    2. In Modeler, under the tab "Models", select: "From a Data Source"
         
       Show SQL Query - 01.png
        
    3. In Select a data source, select "SQL Databases"
        
       Show SQL Query - 02.png

    4. In Create Model from SQL Databases, select the Location, Connection Type and Connection.

    5. At the bottom of window, select the option: "Copy a query from a model"
        
        Show SQL Query - 03.png

    6. In Model Query drop-down list, select the Model that was based on a Freehand SQL, and click "Next"
        
      Note: If your Model is based on multiple connections, it will display the Model name multiple times, and at the end it will show the different connections for each.

    7. In "Edit Query", it will show the SQL Query used by the Model.
        
       Show SQL Query - 04.png

    8. Copy the SQL Query, and click “Cancel”.

See Also

Your feedback is important to help us improve our knowledge base.

Keywords

SAP Cloud for Planning, sc4p, c4p, cforp, cloudforplanning, Cloud for Analytics, Cloud4Analytics, CloudforAnalytics, Cloud 4 Planning, BOC, SAPBusinessObjectsCloud, BusinessObjectsCloud, BOBJcloud, BOCloud., SAC, SAP AC, Cloud-Analytics, CloudAnalytics, SAPCloudAnalytics,Error, Issue, System, Data, User, Unable, Access, Connection, Sac, Connector, Live, Acquisition, Up, Set, setup, Model, BW, Connect, Story, Tenant, Import, Failed, Using, Working, SAML, SSO, sapanalyticscloud, sap analytical cloud, sap analytical cloud, SAC, sap analyst cloud, connected, failure, stopped, sap analyst cloud, https://hcs.cloud.sap, https://hanacloudservices.cloud.sap, https://cloudanalytics.accounts.ondemand.com, https://hanacloudservices-us.accounts.ondemand.com, https://www.sap.com, https://help.sap.com, predictive analytics (analysis), data analysis (analytics) tools, analytics tools, sap analytics cloud, data literacy, advanced analytics, data democratization, analytics software, real time analytics, self service analytics, advanced data analytics, analytics as a service, analytics cloud / cloud analytics, saas analytics, cloud bi, enterprise planning, cloud data analytics, cloud based analytics, analytics cloud platform, modern analytics, real time analysis, cloud analytics solution(s), what is sap analytics cloud, cloud analytics tools, analytics in the cloud, cloud analytics software , KBA , LOD-ANA-DES , Story Design & Visualizations , How To

Product

SAP Analytics Cloud 1.0