0

I am trying to create a virtual table in HANA based on a remote system table view.

If I run it at the command line using hdbsql

hdbsql H00=> create virtual table HanaIndexTable at "SYSRDL#CG_SOURCE"."<NULL>"."dbo"."sysiqvindex"
0 rows affected (overall time 305.661 msec; server time 215.870 msec)

I am able to select from HanaIndexTable and get results and see my index.

When I code it in python, I use the following command:

cursor.execute("""create virtual table HanaIndexTable1 at SYSRDL#CG_source.\<NULL\>.dbo.sysiqvindex""")

I think there is a problem with the NULL. But I see in the output that the escape key is doubled.

self = <hdbcli.dbapi.Cursor object at 0x7f02d61f43d0>
operation = 'create virtual table HanaIndexTable1 at SYSRDL#CG_source.\\<NULL\\>.dbo.sysiqvindex'
parameters = None

    def __execute(self, operation, parameters = None):
        # parameters is already checked as None or Tuple type.
>       ret = self.__cursor.execute(operation, parameters=parameters, scrollable=self._scrollable)
E       hdbcli.dbapi.ProgrammingError: (257, 'sql syntax error: incorrect syntax near "\\": line 1 col 58 (at pos 58)')

/usr/local/lib/python3.7/site-packages/hdbcli/dbapi.py:69: ProgrammingError

I have tried to run the command without the <> but get the following error.

hdbcli.dbapi.ProgrammingError: (257, 'sql syntax error: incorrect syntax near "NULL": line 1 col 58 (at pos 58)')

I have tried upper case, lower case and escaping. Is what I am trying to do impossible?

1 Answer 1

0

There was an issue with capitalization between HANA and my remote source. I also needed more escaping rather than less.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.