1,284 questions
1
vote
2
answers
127
views
Postgresql UPSERT while encrypting column by python encryption
I am using BULK UPSERT to insert record into new table while data of column is being encrypting by python lib CryptoDome.
here is what I done
def bulk_upsert_query(data, table_name=None):
...
0
votes
1
answer
50
views
INSERT or SUM multiple rows at once
I want to increase multiple values at once, with the following logic: if the value does not exist, create a new row with the value, otherwise sum with the existing value on the database.
To achieve ...
0
votes
0
answers
59
views
Chose the best sort key strategy for upserting in Redshfit
I need to daily perform merges on an event table which contains a primary key column (pk), a timestamp column (timestamp) and any other ones.
The upsert is performed the classical way:
copy file into ...
0
votes
1
answer
717
views
Upsert from ADF to Salesforce writes a record when no changes
I am creating a copy activity that pulls information from ADF and I want it to upsert into an object in Salesforce. The activity is working, I saw the record get created, and it changes if I modify ...
0
votes
1
answer
1k
views
Ignore individual nulls when upserting into non-null columns with coalesce
I'd like to construct a partial insert-on-conflict-update statement that can take null values for non-null columns, as long as the updated row has the value so that the constraint wouldn't be violated....
2
votes
2
answers
3k
views
Android room UPSERT not working as expected
I followed the documentation of android room UPSERT to implement a
simple block of code to upsert my entities.
Unfortunately it is not working as expected (for me).
The documentation example: click ...
3
votes
1
answer
5k
views
Upsert Pandas Dataframe into Snowflake Table
I'm upserting data in snowflake table by creating a Temp Table (from my dataframe) and then merging it to my Table. But is there a more efficient way of achieving it ? Like merging directly the ...
2
votes
2
answers
1k
views
PostgreSQL Upsert With Multiple Constraints
I'm trying to do an upsert on a table with two constraints. One is that the column a is unique, the other is that the columns b, c, d and e are unique together. What I don't want is that a, b, c, d ...
0
votes
0
answers
75
views
Double-tally in Rails then format for upsert_all
I have a table that looks like this:
# CategoryTransaction
category_id, transaction_id, buyer_id, seller_id
Both buyer_id and seller_id refer to the Person table (as a Person can buy and/or sell). I ...
0
votes
1
answer
112
views
R mongolite Update collection with new dataframe by id (upsert)
I have a dataset stored in a MongoDB collection i.e. df_old.
Now I want to add new data i.e. df_new and I want to update the collection with them.
All data have a unique identifier, see column id.
If ...
9
votes
1
answer
17k
views
Supabase - Upsert & multiple onConflict constraints
I cannot figure out how to proceed with an Upsert & "multiple" onConflict constraints. I want to push a data batch in a Supabase table.
My data array would be structured as follows:
...
-1
votes
2
answers
603
views
Does DynamoDB's UpdateItemCommand have an "update only" mode?
I have some TypeScript code in a project that does a number of native DynamoDB update operations:
import { nativeDocumentClient, nativeDynamo } from '../utils/aws';
// snipped code
// ...
2
votes
2
answers
2k
views
How to insert a row into another table during an on conflict
I want to insert in a ManyToMany relationship (between 'fiche' and quality) a line (same principle as a log) when an insertion fails because the key is duplicated.
example:
insert into fiche (content) ...
0
votes
1
answer
643
views
Equivalent of insert or update in DynamoDB for counting
I'm trying to keep track of hits from IP addresses.
Typically, in a SQL database, you could do something along the lines of:
CREATE TABLE website_hits
(
ip VARCHAR(45) PRIMARY KEY,
hits ...
1
vote
0
answers
34
views
Return identifier of conflicted insert in postgres [duplicate]
I want to insert rows into a table and return the identifier of the inserted row. Whenever a unique contraint is conflicted, I still want to return the identifier.
I ran the following query:
insert ...
2
votes
0
answers
890
views
Is there a single word that means "upsert or delete"?
I've written a function that upserts a row in to my database and deletes it if it's blank. I'm struggling to name it. If it only upserted, I'd just call it that. And if it only deleted, I'd just call ...
1
vote
1
answer
613
views
Upsert records in postgresql
I am working with postgresql database and I have below update query which works fine -
'UPDATE "main"."item_vendor"\n' +
' SET\n' +
' "vendor_id" = $1,...
0
votes
1
answer
351
views
Alternative of REPLACE (which is provided in Microsoft SQL Server) in Postgres
I need something like
REPLACE into table (id, name, age) values(1, "A", 19)
in Postgres. The above query only works in Microsoft SQL Server. What I need is to get a batch insert query in ...
0
votes
1
answer
182
views
Update or insert a single ORM entry based on a unique (but not primary) key
env
python 3.10
SQLAlchemy: 1.4.44
db: mysql 8
description
I want to upsert a column instance extends Base.
I searched how to upseart, and find using insert(). https://docs.sqlalchemy.org/en/14/...
0
votes
1
answer
82
views
How to update a column with INSERT ... ON CONFLICT only if the old value is NULL
INSERT INTO main_parse_user ("user_id","group_id", "username", "bio", "first_name")
VALUES ($1,$2,$3,$4,$5)
ON CONFLICT (user_id)
DO UPDATE
SET (&...
0
votes
1
answer
577
views
Azure Data Factory Copy Pipeline with Geography Data Type
I am trying to get a geography data type from a production DB to another DB on a nightly occurrence. I really wanted to leverage upsert as the write activity, but it seems that geography is not ...
0
votes
1
answer
2k
views
Azure Data Factory - Copy Data Upsert only updating a single row at a time
I'm using Data Factory (well synapse pipelines) to ingest data from sources into a staging layer. I am using the Copy Data activity with UPSERT. However i found the performance of incrementally ...
2
votes
1
answer
5k
views
Performance of UPSERT (ON CONFLICT) vs. two queries UPDATE or INSERT
My code needs to run on different versions of SQLite. I'm using PHP's SQLite3 extension. Various servers in my user base have different SQLite versions installed, 3.7 being the earliest so far.
My ...
0
votes
1
answer
745
views
Synapse/ADF pipeline error 2200 on upserting CSV into on-prem SQL-server table
In my pipeline I perform an upsert from a flat CSV file (semicolon separated) into a table in our on-premise SQL-server. At first all the data types from the CSV file are read as STRING and I did the ...
-1
votes
1
answer
39
views
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, ...