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

Unable to build cube for JDBC MS SQL Connection

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • v3.1.1
    • v3.1.1
    • Driver - JDBC
    • None

    Description

      Currently tried on the JDBC Driver connection for kylin and build a cube from external MSSQL. But, I'm faced some issue to build cube process.

       

      Below is my kylin.properties config file:

       

      And I manage to load the table from kylin->model->data source

       

       

      But when I build my build, there is an error show that connection failed in the first step, which is Sqoop To Flat Hive Table

       

      Error as below:

       

      21/04/23 09:26:01 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7.3.1.4.0-315
      21/04/23 09:26:01 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
      21/04/23 09:26:01 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.
      21/04/23 09:26:01 INFO manager.SqlManager: Using default fetchSize of 1000
      21/04/23 09:26:01 INFO tool.CodeGenTool: Beginning code generation
      21/04/23 09:26:02 ERROR manager.SqlManager: Error executing statement: com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user '<remove>'. ClientConnectionId:dc4f6df7-b44a-4983-ae23-ca61516d34c4
      com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user '<remove>'. ClientConnectionId:dc4f6df7-b44a-4983-ae23-ca61516d34c4
      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:258)
      at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:256)
      at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:108)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:4290)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:3157)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$100(SQLServerConnection.java:82)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:3121)
      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7151)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:2478)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:2026)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1687)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1528)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:866)
      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:569)
      at java.sql.DriverManager.getConnection(DriverManager.java:664)
      at java.sql.DriverManager.getConnection(DriverManager.java:247)
      at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:903)
      at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:59)
      at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:762)
      at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:785)
      at org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery(SqlManager.java:288)
      at org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:259)
      at org.apache.sqoop.manager.SqlManager.getColumnTypesForQuery(SqlManager.java:252)
      at org.apache.sqoop.manager.ConnManager.getColumnTypes(ConnManager.java:343)
      at org.apache.sqoop.orm.ClassWriter.getColumnTypes(ClassWriter.java:1879)
      at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1672)
      at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:106)
      at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:524)
      at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:655)
      at org.apache.sqoop.Sqoop.run(Sqoop.java:151)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
      at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:187)
      at org.apache.sqoop.Sqoop.runTool(Sqoop.java:241)
      at org.apache.sqoop.Sqoop.runTool(Sqoop.java:250)
      at org.apache.sqoop.Sqoop.main(Sqoop.java:259)
      21/04/23 09:26:02 ERROR tool.ImportTool: Import failed: java.io.IOException: No columns to generate for ClassWriter
      at org.apache.sqoop.orm.ClassWriter.generate(ClassWriter.java:1678)
      at org.apache.sqoop.tool.CodeGenTool.generateORM(CodeGenTool.java:106)
      at org.apache.sqoop.tool.ImportTool.importTable(ImportTool.java:524)
      at org.apache.sqoop.tool.ImportTool.run(ImportTool.java:655)
      at org.apache.sqoop.Sqoop.run(Sqoop.java:151)
      at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
      at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:187)
      at org.apache.sqoop.Sqoop.runTool(Sqoop.java:241)
      at org.apache.sqoop.Sqoop.runTool(Sqoop.java:250)
      at org.apache.sqoop.Sqoop.main(Sqoop.java:259)

       

       

      Therefore, I copy the below command and run on the kylin host individually:

      sqoop import -Dorg.apache.sqoop.splitter.allow_text_splitter=true -Dmapreduce.job.queuename=default --connect "jdbc:sqlserver://xxx.xxx.xxx.167:1433;database=xxS" --driver com.microsoft.sqlserver.jdbc.SQLServerDriver --username xxxxxxt --password "xxxx" --query "SELECT [BKOR_BIW_DETAILS_SUMMARY].[VOT] as [BKOR_BIW_DETAILS_SUMMARY_VOT] ,[BKOR_BIW_DETAILS_SUMMARY].[PROJECT_NAME] as [BKOR_BIW_DETAILS_SUMMARY_PROJECT_NAME] ,[BKOR_BIW_DETAILS_SUMMARY].[CONTINGENT] as [BKOR_BIW_DETAILS_SUMMARY_CONTINGENT] ,[BKOR_BIW_DETAILS_SUMMARY].[DEPARTMENT_LONG] as [BKOR_BIW_DETAILS_SUMMARY_DEPARTMENT_LONG] ,[BKOR_BIW_DETAILS_SUMMARY].[CASH_FLOW] as [BKOR_BIW_DETAILS_SUMMARY_CASH_FLOW] ,[BKOR_BIW_DETAILS_SUMMARY].[MONTH] as [BKOR_BIW_DETAILS_SUMMARY_MONTH] ,[BKOR_BIW_DETAILS_SUMMARY].[ESTIMATION] as [BKOR_BIW_DETAILS_SUMMARY_ESTIMATION] ,[BKOR_BIW_DETAILS_SUMMARY].[EXPENSES] as [BKOR_BIW_DETAILS_SUMMARY_EXPENSES] ,[BKOR_BIW_DETAILS_SUMMARY].[DEPENDENT] as [BKOR_BIW_DETAILS_SUMMARY_DEPENDENT] ,[BKOR_BIW_DETAILS_SUMMARY].[COMMITMENT] as [BKOR_BIW_DETAILS_SUMMARY_COMMITMENT] ,[BKOR_BIW_DETAILS_SUMMARY].[BALANCE] as [BKOR_BIW_DETAILS_SUMMARY_BALANCE] FROM [dbo].[BKOR_BIW_DETAILS_SUMMARY] [BKOR_BIW_DETAILS_SUMMARY] WHERE 1=1 AND (IS_DELETED = 0) AND \$CONDITIONS" --target-dir hdfs://ambari.local:8020/kylin/kylin_metadata/kylin-3dde066e-bbc0-96f9-4fc8-1aa4761f8d19/kylin_intermediate_jps_biw_b93a0f75_2ec9_bfa7_2d57_836bb3c03ad3 --split-by [VOT] --boundary-query "SELECT min([VOT]), max([VOT]) FROM [dbo].[BKOR_BIW_DETAILS_SUMMARY] " --null-string '
      N' --null-non-string '
      N' --fields-terminated-by '|' --num-mappers 4

       

      The same error appear:

       

      So I modify the cli command with replace --password "xxxx" to -P, and enter same password that I put in the kylin.properties conf file, the sqoop cli command is manage to connect MS SQL server as below:

       

      Is that any configuration that I miss out for the cube building? Thanks

       

      Attachments

        1. image-2021-04-23-09-39-12-723.png
          69 kB
          Lim Sing Yik
        2. image-2021-04-23-09-34-10-858.png
          22 kB
          Lim Sing Yik
        3. image-2021-04-23-09-23-40-150.png
          261 kB
          Lim Sing Yik
        4. image-2021-04-23-09-19-08-795.png
          99 kB
          Lim Sing Yik

        Activity

          People

            Unassigned Unassigned
            sylim Lim Sing Yik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: