Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-3996

postgresql can not to be used to construct the flat hive table in NO.1 step in building cube via datasourcedefaultSdk

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • v2.6.1
    • v3.1.3
    • Driver - JDBC
    • kylin3.0.0+hadoop2.7.4+hive2.1.1+hbase1.2.6
    • Important

    Description

      postgresql can not to be used to construct the flat hive table in NO.1 step in building cube via datasourcedefaultSdk. whether in kylin.properties or in postgresql.xml,corresponding configureations have been finished as required by official specification.There  alwarys occurs a problem such as "ERROR manager.SqlManager: Error executing statement: org.postgresql.util.PSQLException:
      ERROR: syntax error at or near ".", 

      when kylin is linked to postgresql databese, it seems that the errors happen in sql brought by kylin. the sql has  back quote,as it is "`" ,that causes query failure brought by table name and columns defined by back quote(`).

      as required, in kylin.properties ,its configuration has been as followings

      kylin.source.default=16
      kylin.source.jdbc.connection-url=jdbc:postgresql://192.168.75.123:5432/dvdrental
      kylin.source.jdbc.driver=org.postgresql.Driver
      kylin.source.jdbc.dialect=postgresql
      kylin.source.jdbc.adaptor=org.apache.kylin.sdk.datasource.adaptor.DefaultAdaptor

      kylin.source.jdbc.user=postgres
      kylin.source.jdbc.pass=1234
      kylin.source.jdbc.sqoop-home=/duhj/sqoop-1.4.7.bin__hadoop-2.6.0
      kylin.source.jdbc.filed-delimiter=|
      kylin.source.jdbc.sqoop-mapper-num=4

      what is more, in ~/apache-kylin-3.0/conf/datasource/postgresql.xml,corresponding conf is as followings:

      -<DATASOURCE_DEF DIALECT="postgresql" ID="postgresql" NAME="kylin">

      <PROPERTY NAME="sql.default-converted-enabled" VALUE="true"/>

      <PROPERTY NAME="sql.allow-no-offset" VALUE="true"/>

      <PROPERTY NAME="sql.allow-fetch-no-rows" VALUE="true"/>

      <PROPERTY NAME="sql.allow-no-orderby-with-fetch" VALUE="true"/>

      <PROPERTY NAME="sql.keyword-default-escape" VALUE="true"/>

      <PROPERTY NAME="sql.keyword-default-uppercase" VALUE="true"/>

      <PROPERTY NAME="schema.database.black-list-pattern" VALUE="publi.*, edw"/>

      <PROPERTY NAME="sql.case-sensitive" VALUE="true"/>

      <PROPERTY NAME="metadata.enable-cache" VALUE="true"/>

      <PROPERTY NAME="sql.enable-quote-all-identifiers" VALUE="false"/>

      is there a method to solve it?

       

      Attachments

        1. kylin_log_error_1.jpg
          119 kB
          haijiandu
        2. kylin_log_error_2.jpg
          109 kB
          haijiandu
        3. kylin_log_error_3.jpg
          101 kB
          haijiandu
        4. kylin_log_error_4.jpg
          113 kB
          haijiandu
        5. kylin_log_error_5.jpg
          134 kB
          haijiandu
        6. kylin_properties_duhj.jpg
          68 kB
          haijiandu
        7. kylin_sql.jpg
          113 kB
          haijiandu
        8. kylin_sqoopToflatHiveTable_Error.jpg
          109 kB
          haijiandu
        9. postgresql_xml.jpg
          135 kB
          haijiandu
        10. server_config_kylin_1.jpg
          87 kB
          haijiandu
        11. server_config_kylin_1.jpg
          87 kB
          haijiandu
        12. server_config_kylin_2.jpg
          84 kB
          haijiandu

        Issue Links

          Activity

            People

              zhanshaoxiong jimmyz
              duhj2 haijiandu
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: