Can't load sqlite table to dataframe

My code

conn = SQLite.DB(dbn)
query = "SELECT * FROM $(tn)"
r = SQLite.execute(conn, query)
df = DataFrame(r)

Getting error
ArgumentError: ‘Int32’ iterates ‘Int32’ values, which doesn’t satisfy the Tables.jl AbstractRow interface

Table is exists and created with

CREATE TABLE "Test" (
	"Ts"	text,
	"PosId"	string,
	"Op"	string,
	"Price"	float,
	"Volume"	float,
	"Balance"	float,
	PRIMARY KEY("Ts")
);

SQLite.DBInterface.execute… instead of SQLite.execute works, but it is very confusing

1 Like

Sorry about this; we have an open issue to remove/rename SQLite.execute, but as a general note, the DBInterface.jl functions should be preferred for general querying/database management.