On Mon, Jul 8, 2019, at 6:08 AM, Gunnar Þór Magnússon wrote:
> Hello,
>
> Some legacy code at work that I don't fully understand (and whose authors are
> all long gone) does the following to eventually insert some values into the
> table it gets:
>
> meta =
On Mon, Jul 8, 2019, at 4:45 AM, Mauro Mussin wrote:
> I have a postgres-postgis dB with a geometry:point field: if I insert the
> values directly
> INSERT INTO points(coordinates) VALUES (ST_GeomFromText('POINT(10.809003
> 54.097834)',4326));
>
> no issue, but if I use this sequence
are you able to set echo="debug" on your create_engine(), view the SQL being
emitted as well as the results being returned, and then ensure the SQL
statement and results are what you are looking for? once you have that we can
make sure the ORM interprets these results correctly.
On Sun, Jul
Hello,
Some legacy code at work that I don't fully understand (and whose authors
are all long gone) does the following to eventually insert some values into
the table it gets:
meta = sqlalchemy.MetaData(bind=session.get_bind())
meta.reflect()
table = sqlalchemy.Table(TableName.__tablename__,
I have a postgres-postgis dB with a geometry:point field: if I insert the
values directly
INSERT INTO points(coordinates) VALUES (ST_GeomFromText('POINT(10.809003
54.097834)',4326));
no issue, but if I use this sequence (Python)
*->import data in a dataframe: data contains lat and long
Got it.
As I like to "eat the pudding":
x.py:
class Meta(type):
print("Here is Meta")
def __new__(cls, name, bases, dct):
print("meta.new")
return super().__new__(cls, name, bases, dct)
class Foo(metaclass=Meta):
print("Here is Foo")
y.py:
from x import Foo
class