Upload data
Nuvolos users can import and upload data into their tables. To do so, the user has a number of options which are illustrated below.
Uploading data programmatically
Python
Instead of Pandas's df.to_sql
, use nuvolos.to_sql
, which has a similar signature but uses highly efficient bulk data loading. df.to_sql
is not supported in Python applications running on Nuvolos.
from nuvolos import get_connection, to_sql
import pandas as pd
df = pd.read_csv(...) #read your data
con = get_connection()
to_sql(df=df, name="table_name", con=con, if_exists='replace', index=False)
If you wish to upload data to Nuvolos from your own PC, please follow the instructions on how to obtain connection tokens and the database name and schema name to use:
from nuvolos import get_connection, to_sql
import pandas as pd
df = pd.read_csv(...) #read your data
con = get_connection(dbname = "dbname", schemaname="schemaname")
to_sql(df=df, name="table_name", con=con, if_exists='replace', index=False)
To update to the latest nuvolos-odbc
(for use in Nuvolos applications) or nuvolos
package (for off-Nuvolos use), please execute the following commands in your Python environment:
In existing, older Nuvolos Python applications:
pip uninstall nuvolos
pip install --upgrade nuvolos-odbc
Off-Nuvolos, on your local PC:
pip install --upgrade nuvolos
R
Loading smaller tables:
df <- read.csv('path_to_data') #read your data
con <- nuvolos::get_connection()
DBI::dbWriteTable(con, name="table_name", value=df)
Loading large tables:
# Update the Nuvolos connector to the latest version
options(repos = "https://cran.rstudio.com")
install.packages("remotes")
remotes::install_github("nuvolos-cloud/r-connector")
use_condaenv(condaenv = "base", conda = "/usr/local/lib/conda/bin/conda")
nuvolos::to_sql(df=df, name="table_name", if_exists='replace', index=FALSE)
If you wish to upload data to Nuvolos from your own PC, please follow the instructions on how to obtain connection tokens and the database name and schema name to use:
df <- read.csv('path_to_data') #read your data
# Update the Nuvolos connector to the latest version
options(repos = "https://cran.rstudio.com")
install.packages("remotes")
remotes::install_github("nuvolos-cloud/r-connector")
reticulate::install_miniconda()
# You need to restart your R session if miniconda was installed on line 7 and not before
nuvolos::to_sql(df=df, name="table_name", dbname="dbname", schemaname="schemaname", if_exists='replace', index=FALSE)
Matlab
df = readtable('path_to_data')
con = get_connection()
sqlwrite(con,'TABLE_NAME',df)
Using Excel
To upload data to Nuvolos using Excel, please refer to our instructions on accessing and uploading data with Excel.
Support request
If you have a specific data onboarding task that you want to discuss with us, you can open a support request by sending an email to [email protected].
Last updated
Was this helpful?