How to Create a Table in a DataBase Using DataFrames?

TheCedarPrince
Thu, 03 Feb 2022 21:01:15 +0000
Data

Hi all!

I tried looking through the documentation, but I could not find it readily - is there a way to write a DataFrame to either a Postgresql (via LibPQ.jl) or MySQL (via MySQL.jl) database as a new table?
Ideally, it would be nice to have a command like:

exec(connection = conn, sql = """CREATE TABLE my_dataframe
                               AS SELECT $(df)"""

Or something of the sort.
Any thoughts?
Thanks!

~ tcp

4 posts - 4 participants