<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: HANA Calculated view query using Python in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/hana-calculated-view-query-using-python/qaa-p/12180490#M4555545</link>
    <description>&lt;P&gt;Dear Luis&lt;/P&gt;&lt;P&gt;Please provide the additional information.&lt;/P&gt;&lt;P&gt;Do you have the log of exception in try-catch caluse in the python - which shows what is the error.&lt;/P&gt;&lt;P&gt;1. May be authorization issue - &lt;/P&gt;&lt;P&gt;2. Generally the view should have prefix with the schema name.  So you may need to add the schema name before the view name. ("_SYS_BIC"). &lt;/P&gt;&lt;P&gt;Kindly confirm&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 08:29:48 GMT</pubDate>
    <dc:creator>venkateswaran_k</dc:creator>
    <dc:date>2020-03-10T08:29:48Z</dc:date>
    <item>
      <title>HANA Calculated view query using Python</title>
      <link>https://community.sap.com/t5/technology-q-a/hana-calculated-view-query-using-python/qaq-p/12180488</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Python &lt;/STRONG&gt;&lt;/P&gt;
  &lt;P&gt;I am currently trying to access a calculated view on HANA through python using hdbcli library.&lt;/P&gt;
  &lt;P&gt;I have no problems with connecting, but when trying to query information it doesn't work.&lt;/P&gt;
  &lt;P&gt;My calculated view is hosted in a path such as this:&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1786887-hana-structure.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;And I'm using this code to query:&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;from hdbcli import dbapi
conn = dbapi(connect(host,port,user,password)
query = "select * from HANA1.MAIN.OrdersReview.CV_Inbound_Orders"
cursor = conn.cursor()
try:
  res = cursor.execute(query)
  res = cursor.fetchall()
exception:
  print("Something went wrong")
conn.close()
cursor.close()
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I think the problem is in the query string but haven't find what it is... any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 03:49:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hana-calculated-view-query-using-python/qaq-p/12180488</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-03-10T03:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: HANA Calculated view query using Python</title>
      <link>https://community.sap.com/t5/technology-q-a/hana-calculated-view-query-using-python/qaa-p/12180489#M4555544</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I would recommend that you use the data preview feature in the HANA Studio to obtain sample SQL. &lt;/P&gt;&lt;P&gt;To reference a calculation view you'll require a schema name, and quotes around the schema name and package/view reference, for example.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;SELECT blah FROM "_SYS_BIC"."Package1.Package2.PushdownPoC/CA_WITH_STUFF"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Michael&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 08:11:13 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hana-calculated-view-query-using-python/qaa-p/12180489#M4555544</guid>
      <dc:creator>michael_eaton3</dc:creator>
      <dc:date>2020-03-10T08:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: HANA Calculated view query using Python</title>
      <link>https://community.sap.com/t5/technology-q-a/hana-calculated-view-query-using-python/qaa-p/12180490#M4555545</link>
      <description>&lt;P&gt;Dear Luis&lt;/P&gt;&lt;P&gt;Please provide the additional information.&lt;/P&gt;&lt;P&gt;Do you have the log of exception in try-catch caluse in the python - which shows what is the error.&lt;/P&gt;&lt;P&gt;1. May be authorization issue - &lt;/P&gt;&lt;P&gt;2. Generally the view should have prefix with the schema name.  So you may need to add the schema name before the view name. ("_SYS_BIC"). &lt;/P&gt;&lt;P&gt;Kindly confirm&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Venkat&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 08:29:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hana-calculated-view-query-using-python/qaa-p/12180490#M4555545</guid>
      <dc:creator>venkateswaran_k</dc:creator>
      <dc:date>2020-03-10T08:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: HANA Calculated view query using Python</title>
      <link>https://community.sap.com/t5/technology-q-a/hana-calculated-view-query-using-python/qaa-p/12180491#M4555546</link>
      <description>&lt;P&gt;Hello Michael&lt;/P&gt;&lt;P&gt;Thank you! It worked perfectly. &lt;/P&gt;&lt;P&gt;I include the query string, just in case, anyone has the same issue:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;query='select top 10 * from \"_SYS_BIC\".\"Package1.Package2.PushdownPoC/CA_WITH_STUFF\"'&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2020 15:35:38 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/hana-calculated-view-query-using-python/qaa-p/12180491#M4555546</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-03-10T15:35:38Z</dc:date>
    </item>
  </channel>
</rss>

