Uploaded image for project: 'Sqoop'
  1. Sqoop
  2. SQOOP-1034

Fix SQL Azure database may return table columns in inconsistent order

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4.4
    • Fix Version/s: 1.4.4
    • Component/s: None
    • Labels:
      None

      Description

      SQL Azure database can return table columns in inconsistent order which causes sqoop to misalign columns between SQL and HDFS

      1. SQOOP-1034.1.patch
        0.6 kB
        Shuaishuai Nie

        Activity

        Hide
        shuainie Shuaishuai Nie added a comment -

        Azure DB does not always guarantee the order of returned columns, so column order returned could misaligned with Sqoop column order which could cause type violation, or if types conicidentally match columns would be mapped incorrectly.

        The fix is to put an ordering constraint for table columns returned based on the ORDINAL_POSITION in the INFORMATION_SCHEMA.COLUMNS.
        The change is only made to SQL Azure databases

        Show
        shuainie Shuaishuai Nie added a comment - Azure DB does not always guarantee the order of returned columns, so column order returned could misaligned with Sqoop column order which could cause type violation, or if types conicidentally match columns would be mapped incorrectly. The fix is to put an ordering constraint for table columns returned based on the ORDINAL_POSITION in the INFORMATION_SCHEMA.COLUMNS. The change is only made to SQL Azure databases
        Hide
        jarcec Jarek Jarcec Cecho added a comment -

        Assigned to Shuaishuai Nie.

        Show
        jarcec Jarek Jarcec Cecho added a comment - Assigned to Shuaishuai Nie .
        Hide
        jarcec Jarek Jarcec Cecho added a comment -

        It's simple patch, so I'm giving my +1 here.

        Show
        jarcec Jarek Jarcec Cecho added a comment - It's simple patch, so I'm giving my +1 here.
        Hide
        jarcec Jarek Jarcec Cecho added a comment -

        The patch is in: https://git-wip-us.apache.org/repos/asf?p=sqoop.git;a=commit;h=0bd1e8935333156297f917f37787c62e0b9357d8

        Thank you Shuaishuai for your contribution!

        Jarcec

        Show
        jarcec Jarek Jarcec Cecho added a comment - The patch is in: https://git-wip-us.apache.org/repos/asf?p=sqoop.git;a=commit;h=0bd1e8935333156297f917f37787c62e0b9357d8 Thank you Shuaishuai for your contribution! Jarcec
        Hide
        hudson Hudson added a comment -

        Integrated in Sqoop-ant-jdk-1.6-hadoop23 #841 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop23/841/)
        SQOOP-1034: Fix SQL Azure database may return table columns in inconsistent order (Revision 0bd1e8935333156297f917f37787c62e0b9357d8)

        Result = SUCCESS
        jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=0bd1e8935333156297f917f37787c62e0b9357d8
        Files :

        • src/java/org/apache/sqoop/manager/SQLServerManager.java
        Show
        hudson Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6-hadoop23 #841 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop23/841/ ) SQOOP-1034 : Fix SQL Azure database may return table columns in inconsistent order (Revision 0bd1e8935333156297f917f37787c62e0b9357d8) Result = SUCCESS jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=0bd1e8935333156297f917f37787c62e0b9357d8 Files : src/java/org/apache/sqoop/manager/SQLServerManager.java
        Hide
        hudson Hudson added a comment -

        Integrated in Sqoop-ant-jdk-1.6-hadoop20 #633 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop20/633/)
        SQOOP-1034: Fix SQL Azure database may return table columns in inconsistent order (Revision 0bd1e8935333156297f917f37787c62e0b9357d8)

        Result = SUCCESS
        jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=0bd1e8935333156297f917f37787c62e0b9357d8
        Files :

        • src/java/org/apache/sqoop/manager/SQLServerManager.java
        Show
        hudson Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6-hadoop20 #633 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop20/633/ ) SQOOP-1034 : Fix SQL Azure database may return table columns in inconsistent order (Revision 0bd1e8935333156297f917f37787c62e0b9357d8) Result = SUCCESS jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=0bd1e8935333156297f917f37787c62e0b9357d8 Files : src/java/org/apache/sqoop/manager/SQLServerManager.java
        Hide
        hudson Hudson added a comment -

        Integrated in Sqoop-ant-jdk-1.6-hadoop200 #634 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop200/634/)
        SQOOP-1034: Fix SQL Azure database may return table columns in inconsistent order (Revision 0bd1e8935333156297f917f37787c62e0b9357d8)

        Result = SUCCESS
        jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=0bd1e8935333156297f917f37787c62e0b9357d8
        Files :

        • src/java/org/apache/sqoop/manager/SQLServerManager.java
        Show
        hudson Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6-hadoop200 #634 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop200/634/ ) SQOOP-1034 : Fix SQL Azure database may return table columns in inconsistent order (Revision 0bd1e8935333156297f917f37787c62e0b9357d8) Result = SUCCESS jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=0bd1e8935333156297f917f37787c62e0b9357d8 Files : src/java/org/apache/sqoop/manager/SQLServerManager.java
        Hide
        hudson Hudson added a comment -

        Integrated in Sqoop-ant-jdk-1.6-hadoop100 #637 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop100/637/)
        SQOOP-1034: Fix SQL Azure database may return table columns in inconsistent order (Revision 0bd1e8935333156297f917f37787c62e0b9357d8)

        Result = SUCCESS
        jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=0bd1e8935333156297f917f37787c62e0b9357d8
        Files :

        • src/java/org/apache/sqoop/manager/SQLServerManager.java
        Show
        hudson Hudson added a comment - Integrated in Sqoop-ant-jdk-1.6-hadoop100 #637 (See https://builds.apache.org/job/Sqoop-ant-jdk-1.6-hadoop100/637/ ) SQOOP-1034 : Fix SQL Azure database may return table columns in inconsistent order (Revision 0bd1e8935333156297f917f37787c62e0b9357d8) Result = SUCCESS jarcec : https://git-wip-us.apache.org/repos/asf?p=sqoop.git&a=commit&h=0bd1e8935333156297f917f37787c62e0b9357d8 Files : src/java/org/apache/sqoop/manager/SQLServerManager.java

          People

          • Assignee:
            shuainie Shuaishuai Nie
            Reporter:
            shuainie Shuaishuai Nie
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development