cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Using `describe table` with `apoc.load.jdbc``

mckenzma
Ninja
Ninja

I am trying to use `describe table`  with `apoc.load.jdbc`  to pull information about SQL tables in a Neo4j query. Has anyone been able to do anything like this?

Example Query

 

CALL apoc.load.jdbc(<SQL connection string>, "
  describe table
") YIELD row

 

 

 

 

4 REPLIES 4

@mckenzma  what database vendor is Neo4j connecting to via apoc.load.jdbc.   Are you able to get the same via a system table of said vendor, for example with Oracle one can query USER_TABLES so as to get similar data

I am pulling from Sybase SQL. Yes I can use `describe table`  to pull information about the columns and data types using an SQL client to query. 

@mckenzma  but can you query from `sysobjects`  and as described at https://stackoverflow.com/questions/1429898/from-a-sybase-database-how-i-can-get-table-description-f... to achieve the equivalent

I tried using 

SELECT sc.* 
FROM syscolumns sc
INNER JOIN sysobjects so ON sc.id = so.id

and got an error message: "Table name 'syscolumns' is ambiguous." If I try

SELECT * from sysobjects

then I see 2 entries: sysobjects & SYSOBJECTS