Questions tagged [upsert]

UPSERT is a combination of UPDATE and INSERT, typically used in relational databases.

UPSERT refers to types of statements (usually database statements) that INSERT an item (record) to a resource (table in a database) where, if the item already exists, it will update the existing item with the fields provided. The term UPSERT is an amalgamation of UPDATE and INSERT and is common slang among database developers.

1227 questions
0
votes
1 answer

Composite _ID and using MongoDB as a composite bucket store, via C#

I am building an eCommerce system that uses composite bucket hashing to efficiently group similar items. Without going into why I chose this system, suffice it to say it solves several key problems facing distributed eCommerce system. There are 11…
IamIC
  • 17,747
  • 20
  • 91
  • 154
0
votes
1 answer

use a modifier or provide an object in an upsert query

In my upsert request, I'd like to both: update the object in place if it's there, aka db.somecollection.update({x: 1}, {$inc: {x: 1}}); provide a new object if it's not there, aka db.somecollection.update({x: 1}, {whole: 0, new: 'yata', object:…
m09
  • 7,490
  • 3
  • 31
  • 58
0
votes
1 answer

Pymongo update/upsert with dictionary

I have a dictionary of data that looks for example like this: dict = [{'name': 'test', 'domain': 'www.example.com', 'rawdata':'dbe318e7'}, {'name': 'test2', 'domain': 'www.example.com', 'rawdata':'dbe318e8'}, {'name': 'test3', 'domain':…
7wonders
  • 1,639
  • 1
  • 17
  • 34
0
votes
2 answers

Upsert/Merge into MySQL View

I know that a MySQL view can be insertable/updatable link I also know that you can perform a merge/upsert in MySQL via the insert on duplicate syntax link BUT my question is: Can you perform an upsert/merge (insert on duplicate) on a view in…
Cymon
  • 319
  • 4
  • 7
  • 13
0
votes
0 answers

Mongoose.js: Upsert + Type.Mixed

Is it possible to upsert a Type.Mixed data field? It doesn't seem to work, but I haven't stepped into the mongoose code yet.
tom
  • 620
  • 1
  • 7
  • 16
0
votes
1 answer

Oracle merge statement within procedure fails to recognize variable in using clause

Possible Duplicate: UPSERT into table with dynamic table name The following procedure is declared as so: CREATE OR REPLACE PROCEDURE STUFF(tableToQuery VARCHAR2) AS BEGIN MERGE INTO myTable m USING (select * from tableToQuery) …
Woot4Moo
  • 23,987
  • 16
  • 94
  • 151
0
votes
1 answer

How to upsert contact without account in SalesForce?

Whenever I upsert a contact, it is created with a corresponding account. For example, if I create 'Contact A', an account with name 'Contact A' will also be created and will contain 'Contact A' as a contact. Is there any way to upsert only the…
sophistry
  • 117
  • 1
  • 2
  • 12
0
votes
2 answers

Upsert a ton of columns with one query

I'm trying to execute the following code on my test server: Insert into CURRENT values (2, 962, 123.45, 30, 0, '2012-06-08 10:41:23', 100, 80, 'Rainy', 120, 50, '2012-06-08 10:14:27', 19300.10, 150.27, 30000, null, 1, 0) ON DUPLICATE KEY…
HunderingThooves
  • 962
  • 8
  • 20
  • 33
0
votes
2 answers

UPSERT Query gives ORA Missing Expression Exception

I am trying to update and insert into Oracle Database by using this below query. But when I was trying to insert into oracle database by using this below query, I always get the exception as- java.sql.SQLException: ORA-00936: missing…
AKIWEB
  • 19,008
  • 67
  • 180
  • 294
-1
votes
2 answers

How do you do an upsert in CQL?

How do you do an UPSERT in CQL. I am finding conflicting information online. Is it possible to do an upsert with just an UPDATE?
778899
  • 9
  • 1
  • 2
-1
votes
1 answer

How to upsert Hive tables in PySpark?

I need to do the following upsert in Hive table if the column with patientnumber exists and if it is same as the casenumber column then update the record as it is else insert new row. if patientnumber does not exist - insert the data as it is. I…
-1
votes
1 answer

Upserting entity in MongoDB with adding element to nested array in one operation

I have some entities like that: { "id": 1, ... "items": [ { "name": "name_1", ... } ] } I need to upsert that document in MongoDB, that means: if there is no documents with id == 1, then save a new document if…
-1
votes
1 answer

Using MERGE command in Upsolver

I would like to use Upsolver MERGE command in my new transformations to populates S3/Athena and Snowflake tables. Since Snowflake is supporting Upsert command, while defining my transformation job, do I rely on Snowflake functionality and use…
PDT
  • 1
  • 1
-1
votes
2 answers

Upsert in generic EF core repository

While it feels that this question should have been answered many times already, I can not find anything useful (except for BulkInsert addons which I'd like to avoid) public virtual void AddRange(ICollection entries) { …
Nick Farsi
  • 366
  • 4
  • 19
-1
votes
1 answer

Can I load two large csv files in pandas and perform Upsert ( Update / Insert )

I have Two 5GB CSV files with 10 Columns, I need to perform update/Insert logic and generate a final CSV by comparing both CSV files. How to do it in Python Pandas? Ex: If you have any alternatives solutions to do the job, let me know
1 2 3
81
82