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

Sqoop PostgreSQL Export Upsert Functionality Request

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.4.3
    • Fix Version/s: None
    • Component/s: connectors/postgresql
    • Labels:
      None
    • Environment:

      CDH 4.5

      Description

      Hi,

      One of my Hadoop developers is trying to re-export to PostgreSQL but is hitting the following error:

      ERROR tool.ExportTool: Error during export: Mixed update/insert is not supported against the target database yet

      Could we please add upsert functionality to the PostgreSQL connector?

      Although Postgres doesn't have direct upsert functionality it's possible to construct SQL to handle this like so:

      http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-UPSERT-EXAMPLE

      A similar request to add upsert functionality for MySQL was addressed here:

      https://issues.apache.org/jira/browse/SQOOP-621

      Thanks

      Hari Sekhon
      http://www.linkedin.com/in/harisekhon

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              harisekhon Hari Sekhon
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated: