kylin-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiaoxiang Yu <xiaoxiang...@kyligence.io>
Subject Re: Build cube by JDBC
Date Fri, 14 Jun 2019 10:07:40 GMT
Hi, 
  Sorry for my late reply. I have reproduced that error, using oracle 11g as data source.

  First, I met the error " java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符". This
can be fixed by adding a configuration in kylin.properties, that is " kylin.source.hive.quote-enabled=false".
  After restart Kylin process, I met another error " java.sql.SQLSyntaxErrorException: ORA-00933:
SQL 命令未正确结束",  and I found this exception is caused by "AS" in from clause.
I will create a JIRA and fixed it later, you may wait for next release.

 Following is my configuration:
 kylin.source.default=8
 kylin.source.jdbc.connection-url=jdbc:oracle:thin:@hdp30-qa:49161/XE
 kylin.source.jdbc.driver=oracle.jdbc.driver.OracleDriver
 kylin.source.jdbc.dialect=oracle 
 kylin.source.jdbc.user=system
 kylin.source.jdbc.pass=oracle
 kylin.source.jdbc.sqoop-home=/opt/cloudera/parcels/CDH/lib/sqoop
 kylin.source.jdbc.filed-delimiter=|
 kylin.source.hive.quote-enabled=false

 If you have any suggestion or find any mistake, please let me know, thank you very much.

----------------
Best wishes,
Xiaoxiang Yu 
 

在 2019/6/10 17:03,“高铭潮”<cat_870223@icloud.com.INVALID> 写入:

    Hi, all
    
    	When I build the cube by Oracle JDBC. There is something error. Like this error message:
    
    java.io.IOException: OS command error exit with return code: 1, error message: Warning:
/Users/gmc/Technology/sqoop/sqoop-1.4.7.bin__hadoop-2.6.0/../hcatalog does not exist! HCatalog
jobs will fail.
    Please set $HCAT_HOME to the root of your HCatalog installation.
    Warning: /Users/gmc/Technology/sqoop/sqoop-1.4.7.bin__hadoop-2.6.0/../accumulo does not
exist! Accumulo imports will fail.
    Please set $ACCUMULO_HOME to the root of your Accumulo installation.
    Warning: /Users/gmc/Technology/sqoop/sqoop-1.4.7.bin__hadoop-2.6.0/../zookeeper does not
exist! Accumulo imports will fail.
    Please set $ZOOKEEPER_HOME to the root of your Zookeeper installation.
    SLF4J: Class path contains multiple SLF4J bindings.
    SLF4J: Found binding in [jar:file:/Users/gmc/Technology/hadoop/hadoop-3.1.2/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: Found binding in [jar:file:/Users/gmc/Technology/hbase/hbase-2.0.5/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
    SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
    SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
    2019-06-10 15:57:06,965 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
    2019-06-10 15:57:06,996 WARN tool.BaseSqoopTool: Setting your password on the command-line
is insecure. Consider using -P instead.
    2019-06-10 15:57:07,088 WARN sqoop.ConnFactory: Parameter --driver is set to an explicit
driver however appropriate connection manager is not being set (via --connection-manager).
Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify
explicitly which connection manager should be used next time.
    2019-06-10 15:57:07,106 INFO manager.SqlManager: Using default fetchSize of 1000
    2019-06-10 15:57:07,106 INFO tool.CodeGenTool: Beginning code generation
    2019-06-10 15:57:07,587 INFO manager.SqlManager: Executing SQL statement: SELECT `WFPROCESSINST`.`PROCESSINSTID`
as `WFPROCESSINST_PROCESSINSTID` ,`WFPROCESSINST`.`PROCESSINSTNAME` as `WFPROCESSINST_PROCESSINSTNAME`
,`WFPROCESSINST`.`CREATOR` as `WFPROCESSINST_CREATOR` ,`WFPROCESSINST`.`OWNER` as `WFPROCESSINST_OWNER`
,`WFPROCESSINST`.`RELATEDATA` as `WFPROCESSINST_RELATEDATA` ,`WFPROCESSINST`.`STARTTIME` as
`WFPROCESSINST_STARTTIME` ,`WFPROCESSINST`.`ENDTIME` as `WFPROCESSINST_ENDTIME` ,`WFPROCESSINST`.`FINALTIME`
as `WFPROCESSINST_FINALTIME` ,`WFPROCESSINST`.`REMINDTIME` as `WFPROCESSINST_REMINDTIME` ,`WFPROCESSINST`.`CURRENTSTATE`
as `WFPROCESSINST_CURRENTSTATE` ,`WFPROCESSINST`.`PARENTACTID` as `WFPROCESSINST_PARENTACTID`
 FROM `SIE_EMS`.`WFPROCESSINST` as `WFPROCESSINST` INNER JOIN `SIE_EMS`.`SMBP_PROCESSINSTBIZRELA`
as `SMBP_PROCESSINSTBIZRELA` ON `WFPROCESSINST`.`PROCESSINSTID` = `SMBP_PROCESSINSTBIZRELA`.`PROCESSINSTID`
INNER JOIN `SIE_EMS`.`WFWORKITEM` as `WFWORKITEM` ON `WFPROCESSINST`.`PROCESSINSTID` = `WFWORKITEM`.`PROCESSINSTID`
WHERE 1=1 AND (`WFPROCESSINST`.CREATETIME >= '2016-01-01 00:00:00' AND `WFPROCESSINST`.CREATETIME
< '2019-06-10 00:00:00')  AND  (1 = 0) 
    2019-06-10 15:57:07,623 ERROR manager.SqlManager: Error executing statement: java.sql.SQLSyntaxErrorException:
ORA-00911: 无效字符
    
    java.sql.SQLSyntaxErrorException: ORA-00911: 无效字符
    
    	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:447)
    	at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    	at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:951)
    	at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:513)
    	at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227)
    	at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
    	at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:208)
    	at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:886)
    	at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175)
    	at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296)
    	at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3613)
    	at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3657)
    	at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1495)
    	at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:777)
    	at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:786)
    	at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:289)
    	at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:260)
    	at org.apache.sqoop.manager.SqlManager.getColumnTypesForQuery(SqlManager.java:253)
    	at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:336)
    	at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1872)
    	at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1671)
    	at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:106)
    	at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:501)
    	at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:628)
    	at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
    	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
    	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
    	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
    	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243)
    	at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
    2019-06-10 15:57:07,625 ERROR tool.ImportTool: Import failed: java.io.IOException: No
columns to generate for ClassWriter
    	at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1677)
    	at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:106)
    	at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:501)
    	at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:628)
    	at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
    	at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
    	at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
    	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
    	at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243)
    	at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
    
    The command is: 
    /Users/gmc/Technology/sqoop/sqoop-1.4.7.bin__hadoop-2.6.0/bin/sqoop import -Dorg.apache.sqoop.splitter.allow_text_splitter=true
 -Dmapreduce.job.queuename=default --connect "jdbc:oracle:thin:@192.168.175.182:1521:emsxinyi2"
--driver oracle.jdbc.driver.OracleDriver --username sie_ems --password "emstest" --query "SELECT
\`WFPROCESSINST\`.\`PROCESSINSTID\` as \`WFPROCESSINST_PROCESSINSTID\` ,\`WFPROCESSINST\`.\`PROCESSINSTNAME\`
as \`WFPROCESSINST_PROCESSINSTNAME\` ,\`WFPROCESSINST\`.\`CREATOR\` as \`WFPROCESSINST_CREATOR\`
,\`WFPROCESSINST\`.\`OWNER\` as \`WFPROCESSINST_OWNER\` ,\`WFPROCESSINST\`.\`RELATEDATA\`
as \`WFPROCESSINST_RELATEDATA\` ,\`WFPROCESSINST\`.\`STARTTIME\` as \`WFPROCESSINST_STARTTIME\`
,\`WFPROCESSINST\`.\`ENDTIME\` as \`WFPROCESSINST_ENDTIME\` ,\`WFPROCESSINST\`.\`FINALTIME\`
as \`WFPROCESSINST_FINALTIME\` ,\`WFPROCESSINST\`.\`REMINDTIME\` as \`WFPROCESSINST_REMINDTIME\`
,\`WFPROCESSINST\`.\`CURRENTSTATE\` as \`WFPROCESSINST_CURRENTSTATE\` ,\`WFPROCESSINST\`.\`PARENTACTID\`
as \`WFPROCESSINST_PARENTACTID\`  FROM \`SIE_EMS\`.\`WFPROCESSINST\` as \`WFPROCESSINST\`
INNER JOIN \`SIE_EMS\`.\`SMBP_PROCESSINSTBIZRELA\` as \`SMBP_PROCESSINSTBIZRELA\` ON \`WFPROCESSINST\`.\`PROCESSINSTID\`
= \`SMBP_PROCESSINSTBIZRELA\`.\`PROCESSINSTID\` INNER JOIN \`SIE_EMS\`.\`WFWORKITEM\` as \`WFWORKITEM\`
ON \`WFPROCESSINST\`.\`PROCESSINSTID\` = \`WFWORKITEM\`.\`PROCESSINSTID\` WHERE 1=1 AND (\`WFPROCESSINST\`.CREATETIME
>= '2016-01-01 00:00:00' AND \`WFPROCESSINST\`.CREATETIME < '2019-06-10 00:00:00') 
AND \$CONDITIONS" --target-dir hdfs://localhost:9000/kylin/kylin_metadata/kylin-e6a7a9af-d6e4-6eac-646f-3174308bdee4/kylin_intermediate_ems_data_cube_1a4aa387_a2e6_9a2c_7d56_66d21c06451b
--split-by \`WFPROCESSINST\`.\`CREATETIME\` --boundary-query "SELECT min(\`WFPROCESSINST\`.\`CREATETIME\`),
max(\`WFPROCESSINST\`.\`CREATETIME\`) FROM SIE_EMS.WFPROCESSINST as WFPROCESSINST WHERE \`WFPROCESSINST\`.CREATETIME
>= '2016-01-01 00:00:00' AND \`WFPROCESSINST\`.CREATETIME < '2019-06-10 00:00:00'" --null-string
'\\N' --null-non-string '\\N' --fields-terminated-by '|' --num-mappers 4
    	at org.apache.kylin.common.util.CliCommandExecutor.execute(CliCommandExecutor.java:96)
    	at org.apache.kylin.source.jdbc.CmdStep.sqoopFlatHiveTable(CmdStep.java:50)
    	at org.apache.kylin.source.jdbc.CmdStep.doWork(CmdStep.java:61)
    	at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:167)
    	at org.apache.kylin.job.execution.DefaultChainedExecutable.doWork(DefaultChainedExecutable.java:71)
    	at org.apache.kylin.job.execution.AbstractExecutable.execute(AbstractExecutable.java:167)
    	at org.apache.kylin.job.impl.threadpool.DefaultScheduler$JobRunner.run(DefaultScheduler.java:114)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    	at java.lang.Thread.run(Thread.java:748)
    
    But I take a test by MYSQL. It was successed. The sqoop can connect the oracle db. 
    
    Please tell me something about this error.

Mime
View raw message