# Can't load sqlite table to dataframe

**URL:** <https://discourse.julialang.org/t/cant-load-sqlite-table-to-dataframe/100911>\
**Category:** New to Julia\
**Tags:** question\
**Created:** [June 27, 2023, 6:16pm UTC](https://discourse.julialang.org/t/cant-load-sqlite-table-to-dataframe/100911 "2023-06-27T18:16:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kv-gits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kv-gits/32/51093_2.png) [@kv-gits](https://discourse.julialang.org/u/kv-gits)\
**Post date:** [June 27, 2023, 6:16pm UTC](https://discourse.julialang.org/t/cant-load-sqlite-table-to-dataframe/100911/1 "2023-06-27T18:16:29Z")

</div>

My code

```julia
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

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

```

---

<div class="post-metadata">

**Author:** ![kv-gits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kv-gits/32/51093_2.png) [@kv-gits](https://discourse.julialang.org/u/kv-gits)\
**Post date:** [June 27, 2023, 8:11pm UTC](https://discourse.julialang.org/t/cant-load-sqlite-table-to-dataframe/100911/2 "2023-06-27T20:11:55Z")

</div>

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

> [@SQLite/DBInterface confusion](https://discourse.julialang.org/t/sqlite-dbinterface-confusion/38458/5):
>
> You could try: dump(SQLite.execute(db,"select \* from Test1")) That will show you the object. My guess is they implemented a show method for whatever that method returns…and it’s not showing much. Again looking at the code maybe try: a = SQLite.execute(db,"select \* from Test1") getvalue(a, 1, Int) Not sure if getvalue() should be prefixed with SQLite.

---

<div class="post-metadata">

**Author:** ![quinnj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quinnj/32/11_2.png) [@quinnj](https://discourse.julialang.org/u/quinnj)\
**Post date:** [June 27, 2023, 8:19pm UTC](https://discourse.julialang.org/t/cant-load-sqlite-table-to-dataframe/100911/3 "2023-06-27T20:19:17Z")

</div>

Sorry about this; we have an [open issue](https://github.com/JuliaDatabases/SQLite.jl/issues/278) to remove/rename `SQLite.execute`, but as a general note, the DBInterface.jl functions should be preferred for general querying/database management.
