From issues-return-26119-apmail-kylin-issues-archive=kylin.apache.org@kylin.apache.org Thu Apr 18 13:36:02 2019 Return-Path: X-Original-To: apmail-kylin-issues-archive@minotaur.apache.org Delivered-To: apmail-kylin-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id B2C9519290 for ; Thu, 18 Apr 2019 13:36:02 +0000 (UTC) Received: (qmail 40438 invoked by uid 500); 18 Apr 2019 13:36:02 -0000 Delivered-To: apmail-kylin-issues-archive@kylin.apache.org Received: (qmail 40413 invoked by uid 500); 18 Apr 2019 13:36:02 -0000 Mailing-List: contact issues-help@kylin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kylin.apache.org Delivered-To: mailing list issues@kylin.apache.org Received: (qmail 40375 invoked by uid 99); 18 Apr 2019 13:36:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Apr 2019 13:36:01 +0000 Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 42FC2E039F for ; Thu, 18 Apr 2019 13:36:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 6B59A25817 for ; Thu, 18 Apr 2019 13:36:00 +0000 (UTC) Date: Thu, 18 Apr 2019 13:36:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: issues@kylin.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KYLIN-3857) Add parameter to change sql quoting character for sqoop MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KYLIN-3857?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1682= 1109#comment-16821109 ]=20 ASF subversion and git services commented on KYLIN-3857: -------------------------------------------------------- Commit 426a22711d6e25d2b7a4c1c3c6cea4e642b7f248 in kylin's branch refs/head= s/master from hit-lacus [ https://gitbox.apache.org/repos/asf?p=3Dkylin.git;h=3D426a227 ] KYLIN-3857 add configuration for quote character > Add parameter to change sql quoting character for sqoop > ------------------------------------------------------- > > Key: KYLIN-3857 > URL: https://issues.apache.org/jira/browse/KYLIN-3857 > Project: Kylin > Issue Type: Bug > Reporter: Davide Malagoli > Assignee: XiaoXiang Yu > Priority: Major > Fix For: v2.6.2 > > Attachments: image-2019-03-11-11-46-05-946.png, image-2019-03-11-= 11-46-14-305.png, image-2019-03-11-11-46-20-664.png, image-2019-03-11-11-46= -31-966.png, sqoop-error.log, sqoop-script.sh > > > I've set up=C2=A0 Kylin to access a SQL server using JDBC and do the ETL = step as described in > [http://kylin.apache.org/docs/tutorial/setup_jdbc_datasource.html] > but when the "Sqoop To Flat Hive Table" runs it terminates with an error = shown in the attached log. > It seems that the root cause is the presence of the '`' character in the = query, which has no meaning for sql server. > =C2=A0 > My problem seems to related to this piece of code > =C2=A0 > public class FlatTableSqlQuoteUtils { > public static final String QUOTE =3D "`"; > /** > * Quote identifier by default quote ` > * @param identifier > * @return > */ > public static String quoteIdentifier(String identifier){ > return QUOTE + identifier + QUOTE; > } > =C2=A0 > The solution may be to add a parameter to change this character used for = quoting. > =C2=A0 > Just to be sure I made a copy of the original "sqoop" command to "sqoop.o= rig" and replaced the original with a little script of mine (attached). > This little script removes the=C2=A0"`" character from the original comma= nd and the call "sqoop.orig" with the cleaned arguments. > It works, but it is still an ugly workaround. > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)