Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7BAFC200B8D for ; Fri, 23 Sep 2016 10:47:01 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7A39B160ACA; Fri, 23 Sep 2016 08:47:01 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id C01DF160AC2 for ; Fri, 23 Sep 2016 10:47:00 +0200 (CEST) Received: (qmail 25226 invoked by uid 500); 23 Sep 2016 08:46:54 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 25215 invoked by uid 99); 23 Sep 2016 08:46:54 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Sep 2016 08:46:54 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1FB40180227 for ; Fri, 23 Sep 2016 08:46:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -1.848 X-Spam-Level: X-Spam-Status: No, score=-1.848 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=linkedin.com header.b=WCJaGYt9; dkim=pass (1024-bit key) header.d=linkedin.com header.b=DjdUVH8U Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id NvCtqCPsMOIH for ; Fri, 23 Sep 2016 08:46:53 +0000 (UTC) Received: from mail321.linkedin.com (mail321.linkedin.com [108.174.3.121]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id B4E6E5F56D for ; Fri, 23 Sep 2016 08:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkedin.com; s=proddkim1024; t=1474620406; bh=0qQxw6ZBFxod+Nn+qjXXbhALYRIYTv+FZ3oGKIGM6Fw=; h=MIME-Version:From:Date:Subject:To:Content-Type; b=WCJaGYt9uLMZWxEW2d4/nByucfVsbIsFEFGf3sbw8f5TmlhfvbTE2isgvzEUJzwQE 6H4iJZ/RT6+5DEW5idEPyOnZBwDhTOX3ZXdMgS5gawmoe32MigkSHNP08VZ+SalxDl XS8Q+gwtpPzgZiz0V5ZcOlCX84bUVJ1aAq2ZcERs= Authentication-Results: mail321.prod.linkedin.com x-tls.subject="/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com"; auth=pass (cipher=ECDHE-RSA-AES128-GCM-SHA256) Authentication-Results: mail321.prod.linkedin.com; iprev=pass policy.iprev="2607:f8b0:4001:c0b::246"; spf=softfail smtp.mailfrom="viramachandran@linkedin.com" smtp.helo="mail-it0-x246.google.com"; dkim=pass header.d=linkedin.com; tls=pass (verified) key.ciphersuite="TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" key.length="128" tls.v="tlsv1.2" cert.client="C=US,ST=California,L=Mountain View,O=Google Inc,CN=smtp.gmail.com" cert.clientissuer="C=US,O=Google Inc,CN=Google Internet Authority G2" Received: from [2607:f8b0:4001:c0b::246] ([2607:f8b0:4001:c0b::246.35512] helo=mail-it0-x246.google.com) by mail321.prod.linkedin.com (envelope-from ) (ecelerity 3.6.21.53563 r(Core:3.6.21.0)) with ESMTPS (cipher=ECDHE-RSA-AES128-GCM-SHA256 subject="/C=US/ST=California/L=Mountain View/O=Google Inc/CN=smtp.gmail.com") id 6E/D9-09697-5FBE4E75; Fri, 23 Sep 2016 08:46:46 +0000 Received: by mail-it0-x246.google.com with SMTP id u18so20493362ita.2 for ; Fri, 23 Sep 2016 01:46:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkedin.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=0qQxw6ZBFxod+Nn+qjXXbhALYRIYTv+FZ3oGKIGM6Fw=; b=DjdUVH8UIkg16+Uh/mSE446fM10ayy3BNPhTp7z7G5oisO3p/nt2XzIDtNDQ7bzmgt RR2Sw1Nc9kFAjChE+pYUf95ia48GzgsseBboYH1Aku45687qYHm3fNsJhXu8F6H4disW 6TIbahTCWF19rLAoTeIfib9DnNh3CnQGmVaC4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0qQxw6ZBFxod+Nn+qjXXbhALYRIYTv+FZ3oGKIGM6Fw=; b=mZz7Ddekup4D1nqbn1zFR8leSGu2B3mxTYQfhfM2jGKZjt2cUijHmOt/sK51o02SfS s/tnLRtrv3RWWK+uctZ5/shcWKVYgWLQYzn9w31FY5O2AkDStpWGLGV/1Y1NC+SR6Nrf dhP11LVLdgta7lD3XK7TkCUqYSfISlABaYB4vI7D5AJE6mT1opyGL7KO89glIv3n1My0 zlD3YMF5afpe2dDCQe1kQy2Igerwrk9vRerqD1uZ3h0eWWL5svjbBU+L4YeXLZF4Zaxk G8P7LrGVTqYhf7JkSX0OKpjeUi2E35t7BFZymAjBBx2LjMnY9J4BJ9G90AegZzpWh0I3 mSHA== X-Gm-Message-State: AE9vXwOr8fGloNqaGYPdp19udO2v97der6tlKFBzSEu2yeBZNooR46MfegpWhf4zGHWQju6RmvY/f/SZbVLewXalX1YW1dUnmiCwsQdSGT6GGnEH7NZ0sNLrfZaiz/8CLJXBk3fzr9S+5mmtAv20Ej3FOTkCEtsi/50b X-Received: by 10.107.141.18 with SMTP id p18mr7429194iod.50.1474620405383; Fri, 23 Sep 2016 01:46:45 -0700 (PDT) X-Received: by 10.107.141.18 with SMTP id p18mr7429179iod.50.1474620405182; Fri, 23 Sep 2016 01:46:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.18.147 with HTTP; Fri, 23 Sep 2016 01:46:44 -0700 (PDT) From: Vijay Ramachandran Date: Fri, 23 Sep 2016 14:16:44 +0530 Message-ID: Subject: on duplicate update equivalent? To: user@hive.apache.org Content-Type: multipart/alternative; boundary=94eb2c05d4006e1e2e053d28d130 archived-at: Fri, 23 Sep 2016 08:47:01 -0000 --94eb2c05d4006e1e2e053d28d130 Content-Type: text/plain; charset=UTF-8 Hello. Is there a way to write a query with a behaviour equivalent to mysql's "on duplicate update"? i.e., try to insert, and if key exists, update the row instead? thanks, --94eb2c05d4006e1e2e053d28d130 Content-Type: text/html; charset=UTF-8
Hello.

Is there a way to write a query with a behaviour equivalent to mysql's "on duplicate update"? i.e., try to insert, and if key exists, update the row instead?

thanks,

--94eb2c05d4006e1e2e053d28d130--