<p dir="auto"><strong>Migrated issue, originally created by John Mercouris (<a href="https://github.com/jmercouris">@jmercouris</a>)</strong></p>
<p dir="auto">If you look in the examples, the documentation mentions that you may setup directed graphs:<br>
<a href="http://docs.sqlalchemy.org/en/rel_1_0/orm/examples.html#module-examples.graphs" rel="nofollow">http://docs.sqlalchemy.org/en/rel_1_0/orm/examples.html#module-examples.graphs</a></p>
<p dir="auto">The code for the directed graph can be found here:<br>
<a href="http://docs.sqlalchemy.org/en/rel_1_0/_modules/examples/graphs/directed_graph.html" rel="nofollow">http://docs.sqlalchemy.org/en/rel_1_0/_modules/examples/graphs/directed_graph.html</a></p>
<p dir="auto">Unfortunately the code for the directed graph is actually for an undirected graph<br>
(directed vs undirected graph) <a href="http://www.differencebetween.com/wp-content/uploads/2011/05/DifferenceBetween_Directed_UnDirected_Graphs1.jpg" rel="nofollow">http://www.differencebetween.com/wp-content/uploads/2011/05/DifferenceBetween_Directed_UnDirected_Graphs1.jpg</a></p>
<p dir="auto">The reason it is a directed graph is because you may not add a relationship from n1-&gt;n2 as well as from n2-&gt;n1. The program will crash and complain that there is a duplicate entry.</p>
<p dir="auto">For your convenience I have modified the program to show an example of a directed graph:<br>
(<a href="http://pastebin.com/xJDPdvYJ" rel="nofollow">http://pastebin.com/xJDPdvYJ</a>) - also attached to this issue. Also attached is the database generated from running the file.</p>
<p dir="auto">You can run the program to demonstrate it for yourself, thank you for your time.</p>
<hr>
<p dir="auto">Attachments: <a href="../wiki/imported_issue_attachments/3698/data.db">data.db</a> | <a href="../wiki/imported_issue_attachments/3698/graph.py">graph.py</a></p>
<p dir="auto">Good evening!<br>
We have a problem while executing following code:</p>
<p dir="auto">import sqlalchemy as db<br>
import pandas as pd<br>
import cx_Oracle</p>
<p dir="auto">engine = db.create_engine("oracle+cx_oracle://{user}:{pw}@{host}:{port}/{db}"<br>
.format(user = "usr",<br>
pw = "pwd",<br>
host = "host",<br>
port = "port",<br>
db = "db"), encoding='utf8', echo=True)</p>
<p dir="auto">metadata = db.MetaData()<br>
connection = engine.connect()</p>
<p dir="auto">connection.execute("ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD HH24:MI:SS' NLS_TIMESTAMP_FORMAT = 'YYYY-MM-DD HH24:MI:SS.FF'")</p>
<p dir="auto">data = "select * from big_view"<br>
df = pd.read_sql(data, connection)</p>
<p dir="auto">print(df.shape)</p>
<p dir="auto">connection.close()</p>
<p dir="auto">Instead of geting 2 mil rows i get only about 200k rows.</p>