Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql.save has weird functionality with existing data #92

Open
Ar-Kaine opened this issue May 17, 2016 · 0 comments
Open

sql.save has weird functionality with existing data #92

Ar-Kaine opened this issue May 17, 2016 · 0 comments

Comments

@Ar-Kaine
Copy link

The sql.save function is a useful quick way of saving data. However, it has very odd functionality if you try to build data incrementally from various sources.

The use case I'm thinking of is this: I have two data sets with different fields but a common key. One has been saved already to the SQLite database in scraper wiki.

Using the common key as the unique field with the sql.save function does not behave as I would expect. if the key already exists in the data set, I would expect the function to replace the data in any matching columns, and create new columns (if they don't already exist) an input the rest of the data, leaving the existing data unchanged if there is no matching column for it.

The actual behaviour is that it wipes all populated fields for a given row by setting them to null if the column was not in the list of columns for the sql.save command.

The expected behaviour would be better, as when working with multiple data sets it becomes frustrating to have to use embedded SQL code to manage updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant