Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-12160

Fuse Online: DB Connector: SQL select query with NVL function.

XMLWordPrintable

    • 0
    • 0% 0%
    • Todo

      Customer actual problem

      Do you think is there a workaround to write an sql statement with an optional :#param, in order to retrieve all records in xyz table if parameter :#param is not passed and hence its value is null?
      
      • For Oracle there is NVL function which can handle such scenario. I suggested the same to customer but it is not getting parsed. Check screenshot and metadata pod logs.
      • I tested this in local setup and I also face this issue. It appears that Oracle SQL functions are not recognized or parsed.
      Caused by: io.syndesis.common.util.SyndesisServerException: Invalid SQL, the number of columns (0) should match the number of number of input parameters (1)
      	at io.syndesis.connector.sql.SqlConnectorMetaDataExtension.meta(SqlConnectorMetaDataExtension.java:60) ~[connector-sql-1.7.13.fuse-740001-redhat-00002.jar!/:1.7.13.fuse-740001-redhat-00002]
      	at io.syndesis.connector.support.verifier.api.ComponentMetadataRetrieval.fetchMetaData(ComponentMetadataRetrieval.java:58) ~[connector-support-verifier-1.7.13.fuse-740001-redhat-00002.jar!/:1.7.13.fuse-740001-redhat-00002]
      	at io.syndesis.connector.support.verifier.api.ComponentMetadataRetrieval.fetch(ComponentMetadataRetrieval.java:48) ~[connector-support-verifier-1.7.13.fuse-740001-redhat-00002.jar!/:1.7.13.fuse-740001-redhat-00002]
      	at io.syndesis.connector.meta.v1.ConnectorEndpoint.actions(ConnectorEndpoint.java:80) ~[classes!/:1.7.13.fuse-740001-redhat-00002]
      	... 87 common frames omitted
      Caused by: java.sql.SQLException: Invalid SQL, the number of columns (0) should match the number of number of input parameters (1)
      	at io.syndesis.connector.sql.common.DbMetaDataHelper.getColumnMetaData(DbMetaDataHelper.java:141) ~[connector-sql-1.7.13.fuse-740001-redhat-00002.jar!/:1.7.13.fuse-740001-redhat-00002]
      	at io.syndesis.connector.sql.common.DbMetaDataHelper.getJDBCInfoByColumnNames(DbMetaDataHelper.java:85) ~[connector-sql-1.7.13.fuse-740001-redhat-00002.jar!/:1.7.13.fuse-740001-redhat-00002]
      	at io.syndesis.connector.sql.common.SqlStatementParser.parseSelect(SqlStatementParser.java:203) ~[connector-sql-1.7.13.fuse-740001-redhat-00002.jar!/:1.7.13.fuse-740001-redhat-00002]
      	at io.syndesis.connector.sql.common.SqlStatementParser.parse(SqlStatementParser.java:101) ~[connector-sql-1.7.13.fuse-740001-redhat-00002.jar!/:1.7.13.fuse-740001-redhat-00002]
      	at io.syndesis.connector.sql.SqlConnectorMetaDataExtension.parseStatement(SqlConnectorMetaDataExtension.java:72) ~[connector-sql-1.7.13.fuse-740001-redhat-00002.jar!/:1.7.13.fuse-740001-redhat-00002]
      	at io.syndesis.connector.sql.SqlConnectorMetaDataExtension.meta(SqlConnectorMetaDataExtension.java:54) ~[connector-sql-1.7.13.fuse-740001-redhat-00002.jar!/:1.7.13.fuse-740001-redhat-00002]
      	... 90 common frames omitted
      
      
      • It appears that functions are not getting parsed.

        1. error_1.PNG
          83 kB
          Chandra Shekhar Pandey
        2. nvl function error.png
          99 kB
          Chandra Shekhar Pandey

              kstam@redhat.com Kurt Stam (Inactive)
              rhn-support-cpandey Chandra Shekhar Pandey (Inactive)
              Stefan Veres Stefan Veres (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: