sqoop-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Abraham Elmahrek (JIRA)" <j...@apache.org>
Subject [jira] [Created] (SQOOP-2356) Sqoop2: Derby upgrade should automatically rename jobs that have conflicting names
Date Tue, 12 May 2015 21:32:00 GMT
Abraham Elmahrek created SQOOP-2356:
---------------------------------------

             Summary: Sqoop2: Derby upgrade should automatically rename jobs that have conflicting
names
                 Key: SQOOP-2356
                 URL: https://issues.apache.org/jira/browse/SQOOP-2356
             Project: Sqoop
          Issue Type: Bug
            Reporter: Abraham Elmahrek
             Fix For: 1.99.7


The following should work:

{code}
CREATE SEQUENCE job_renamer AS BIGINT START WITH 0;
UPDATE SQOOP.SQ_JOB set SQB_NAME = SQB_NAME || '_' || CAST(NEXT VALUE FOR job_renamer AS CHAR(100))
where SQB_ID IN (
SELECT j1.SQB_ID FROM SQOOP.SQ_JOB AS j1 INNER JOIN ( SELECT SQB_NAME FROM SQOOP.SQ_JOB GROUP
BY (SQB_NAME) HAVING COUNT > 1 ) AS j2 ON j1.SQB_NAME = j2.SQB_NAME
);
drop SEQUENCE job_renamer RESTRICT;
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message