Re: [sqlalchemy] How to add custom column name in sqlalchemy update query?

2019-07-15 Thread Mirek Morek
Yes, when passing integer value as value everything is fine, so only value parameter is a concern here. This is Sybase database so maybe that is a case. W dniu poniedziałek, 15 lipca 2019 16:52:27 UTC+2 użytkownik Simon King napisał: > > Hmm, the None looks fine, but now I'm suspicious of

Re: [sqlalchemy] SqlAlchemy using a REST engine

2019-07-15 Thread Nestor Diaz
Well ... it seems that if I want to use SA with Informix I have to code the SA dialect code, 'ibm-db-sa' as I review it doesn't support Informix, the best thing I have found is https://github.com/OpenInformix/IfxPy , just did some simple test and worked ok. I will post any good news in case I

Re: [sqlalchemy] Create ad hoc custom function

2019-07-15 Thread Mike Bayer
On Mon, Jul 15, 2019, at 11:16 AM, Ľuboš Katrinec wrote: > Thanks Mike for your explanation. It totally makes sense. I have not realize > that at all. > > Just for the record I am trying to follow my ETL process idea to allow > maximum flexibility to user so he can construct and shape data by

Re: [sqlalchemy] Create ad hoc custom function

2019-07-15 Thread Ľuboš Katrinec
Thanks Mike for your explanation. It totally makes sense. I have not realize that at all. Just for the record I am trying to follow my ETL process idea to allow maximum flexibility to user so he can construct and shape data by using SQL commands from JSON/CSV data produced (EXTRACT) by any kind

Re: [sqlalchemy] How to add custom column name in sqlalchemy update query?

2019-07-15 Thread Simon King
Hmm, the None looks fine, but now I'm suspicious of those airport_sys_id and project_sys_id values. Why are they being passed as floating point values, rather than integers? Does the same query work if the reference_temperature is not None? On Mon, Jul 15, 2019 at 3:32 PM Mirek Morek wrote: >

Re: [sqlalchemy] Create ad hoc custom function

2019-07-15 Thread Mike Bayer
On Mon, Jul 15, 2019, at 10:14 AM, Ľuboš Katrinec wrote: > I am looking for creating custom Python callable function that would be use > in raw SQL queries, very same to Connection.create_function() > which is > perfectly

Re: [sqlalchemy] How to add custom column name in sqlalchemy update query?

2019-07-15 Thread Mirek Morek
Sure[image: log.jpg] W dniu poniedziałek, 15 lipca 2019 15:28:54 UTC+2 użytkownik Simon King napisał: > > I don't have any other ideas, I'm afraid. Can you post the relevant > section from the logs? > > On Mon, Jul 15, 2019 at 1:51 PM Mirek Morek > wrote: > >> So far I tried to call my

[sqlalchemy] Create ad hoc custom function

2019-07-15 Thread Ľuboš Katrinec
I am looking for creating custom Python callable function that would be use in raw SQL queries, very same to Connection.create_function() which is perfectly working as I intend. I would like to be able to do it in SQLAlchemy

Re: [sqlalchemy] How to add custom column name in sqlalchemy update query?

2019-07-15 Thread Simon King
I don't have any other ideas, I'm afraid. Can you post the relevant section from the logs? On Mon, Jul 15, 2019 at 1:51 PM Mirek Morek wrote: > So far I tried to call my function by passing airport_sys_id, > project_sys_id and column name, leaving value parameter empty as it is > assigned to

Re: [sqlalchemy] SqlAlchemy using a REST engine

2019-07-15 Thread Mike Bayer
I dont have any special insight on this. It would obviously perform pretty poorly, but overall the API you'd want to target first is pep 249: https://www.python.org/dev/peps/pep-0249/ that does all the REST stuff, then SQLAlchemy dialect is documented at

Re: [sqlalchemy] How to add custom column name in sqlalchemy update query?

2019-07-15 Thread Mirek Morek
So far I tried to call my function by passing airport_sys_id, project_sys_id and column name, leaving value parameter empty as it is assigned to None by default. I see in my logs that it tries to pass in sql query value=None, but it doesn't work for numeric type field. It works fine for string

Re: [sqlalchemy] How to add custom column name in sqlalchemy update query?

2019-07-15 Thread Simon King
Passing None is the right way to set a column to NULL, so it sounds like you are doing something else wrong. How are you calling your update_airport_reference_temperature function? Also, enabling debug level logging (by passing echo='debug' when you create your SQLAlchemy engine) will show

Re: [sqlalchemy] How to add custom column name in sqlalchemy update query?

2019-07-15 Thread Mirek Morek
Hello Simon, One extra question: Do you know maybe how to assign NULL field value to numeric type field using sqlalchemy? I change field to some numeric value and then I want to clear this field. I tried assign None as default for value parameter: [image: apt2.jpg] But I receive: "Implicit

Re: [sqlalchemy] How to add custom column name in sqlalchemy update query?

2019-07-15 Thread Mirek Morek
Hello Simon, One extra question: Do you know maybe how to assign NULL field value to numeric type field using sqlalchemy? I change field to some numeric value and then I want to clear this field. I tried assign None as default for value parameter: [image: apt2.jpg] But I receive: "Implicit

Re: [sqlalchemy] with_entities referring to SQlite column aliased with

2019-07-15 Thread Dieter Menne
Am Donnerstag, 11. Juli 2019 16:11:42 UTC+2 schrieb Mike Bayer: > > > > On Thu, Jul 11, 2019, at 2:57 AM, Dieter Menne wrote: > > Thanks, if one thinks of delayed execution, this makes sense. It is a bit > strange, though, that there is no select. I am an R-programmer by default, > and in