Issue
This Content is from Stack Overflow. Question asked by Joao Henrique da Silva
How to these use R libraries to write and save a ‘some_content’ string into a field of an existing sql table object?
I want to insert a ‘some_content’ string into the field barplot inside the blog_blogpost object in sql. How to proceed?
library(DBI)
library(RSQLite)
library(tidyverse)
con <- DBI::dbConnect(RSQLite::SQLite(), dbname = ‘db.sqlite3’)
DBI::dbListTables(con)
[1] “account_emailaddress” “account_emailconfirmation” “auth_group” “auth_group_permissions”
[5] “auth_permission” “auth_user” “auth_user_groups” “auth_user_user_permissions”
[9] “blog_blogpost” “django_admin_log” “django_content_type” “django_migrations”
[13] “django_session” “django_site” “searches_searchquery” “socialaccount_socialaccount”
[17] “socialaccount_socialapp” “socialaccount_socialapp_sites” “socialaccount_socialtoken” “sqlite_sequence”
DBI::dbListFields(con, “blog_blogpost”)
[1] “id” “content” “title” “slug” “user_id” “timestamp” “updated”
[8] “publish_date” “image” “barplot” “summ_bert” “article” “maltego_csv” “rainette_explor”
[15] “video_url” “pdfs” “wordcloud”
Solution
This question is not yet answered, be the first one who answer using the comment. Later the confirmed answer will be published as the solution.
This Question and Answer are collected from stackoverflow and tested by JTuto community, is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.