Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-16 Thread Markus Elfring
> Answering line by line is not really a good use of either of our time I increased my feedback according to the provided information. > and I apologize that I cannot really work with the lack of specifics > presented here, You might prefer an other communication style. > if I can restate

Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-15 Thread Mike Bayer
Hi there - Answering line by line is not really a good use of either of our time and I apologize that I cannot really work with the lack of specifics presented here, if I can restate the situation, the "CREATE TABLE AS" use case is not very common, and as far as an ORM use case, I have no idea

Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-15 Thread Markus Elfring
>> Can a variant of the method “CreateTableAs” (which you published on >> 2015-06-01) become a standard component of the application programming >> interface? > > it can, Thanks for such positive feedback. > but as you are seeing, it's insufficient for what people > actually want to do which

Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-15 Thread Mike Bayer
On Mon, Apr 15, 2019 at 12:22 PM Markus Elfring wrote: >> >> INSERT FROM SELECT refers to an existing table, yes, > > > This SQL command is already supported by your class library. > > >> >> I mention it because you referred to this construct in one of the stack >> overflow >> answers you

Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-15 Thread Markus Elfring
> > INSERT FROM SELECT refers to an existing table, yes, > This SQL command is already supported by your class library. > I mention it because you referred to this construct in one of the stack > overflow > answers you mentioned. > It was shown that is possible (in principle) to copy some

Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-15 Thread Mike Bayer
On Mon, Apr 15, 2019 at 9:53 AM Markus Elfring wrote: >> >> insert.from_select() will accept the Query object directly. > > > Such data addition depends on the detail that a table object exists before, > doesn't it? INSERT FROM SELECT refers to an existing table, yes, I mention it because you

Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-15 Thread Markus Elfring
> > insert.from_select() will accept the Query object directly. > Such data addition depends on the detail that a table object exists before, doesn't it? > if using the CreateTableAs recipe, Do you refer to any additional information source here? > it can be modified to coerce a Query

Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-15 Thread Mike Bayer
insert.from_select() will accept the Query object directly. if using the CreateTableAs recipe, it can be modified to coerce a Query passed to it into a Core statement internally. the code to do this coercion would resemble: def __init__(self, name, query): if isinstance(query, orm.Query):

Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-15 Thread Markus Elfring
> > both of the above stackoverflow recipes refer to usage of the > SQLAlchemy select() object.When you have an ORM Query object, you > can get the underlying select() from it by calling upon the .statement > accessor: > Thanks for this information. I imagine that there is no need to use

Re: [sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-13 Thread Mike Bayer
On Sat, Apr 13, 2019 at 4:56 AM Markus Elfring wrote: > > Hello, > > I would like to count value combinations in database records together with > the software “SQLAlchemy 1.3.2”. > The computation result should be stored into a dynamically generated table. > > I have found a few answers for this

[sqlalchemy] Creating database tables from queries based on ORM API?

2019-04-13 Thread Markus Elfring
Hello, I would like to count value combinations in database records together with the software “SQLAlchemy 1.3.2”. The computation result should be stored into a dynamically generated table . I have found a few