Hi
thanks for the quick reply and pointing me in the right direction.
it seems the error is actually related to the operator.
is there anything SA can do on this issue?
In the meantime i am going to change my query.
thanks again..
--
You received this message because you are subscribed to
I'm not familiar with the operator in Oracle or its syntax. The first step
would be to create a cx_oracle sample script that emits the exact SQL you're
looking for. We could then see how to adapt it to SQLAlchemy.
On May 19, 2010, at 2:45 AM, dhanil anupurath wrote:
Hi
thanks for the
Hi
SORRY for the delay to reply.
Here is what my definitions.
These are my class and table definitions:
class Task(DeclarativeBase):
task_id = Column(Integer,Sequence('id_
seq'), primary_key=True)
task_type = Column(Unicode(50), default=to_unicode('Task'))
name =
Hi
task = Task(u'Task',\
{'quiet':False}, [], {}, None, u'admin')
model.DBSession.merge(task)
in my database the following query will try to select the above task
object and result in error
DBSession.query(TaskCalendar).options(eagerload('task')).\
attached is a test program that is of a format which allows us to be able to
answer your questions quickly. It is a short test program that runs fully,
using the model fragments you've sent along.
It does not reproduce your error. Instead, it appears that the is not an
operator accepted
Hi
This is my class definition
class TaskCalendar(DeclarativeBase):
__tablename__ = 'task_calendars1'
cal_id = Column(Integer,Sequence('id_seq'), primary_key=True)
task_id = Column(Integer, ForeignKey('tasks.task_id'))
dow = Column(Integer)
month = Column(Integer)
day =
This is not enough detail to provide any insight into your issue. We would
require the mapping for TaskCalendar, Tasks, as well as code which inserts the
offending data into the database and then issues your query, reproducing the
error you are getting.
On May 10, 2010, at 8:54 AM, dhanil
On May 23, 2008, at 10:02 PM, Brandon Goldfedder wrote:
Michael,
Yes - that is what I am doing now :
ForeignKey(schemaname.tablename.colname)
and I have things working. (see example 3).
My problem is these steps
seem really ugly and a lot more work than it should be to get things
MIchael,
Thanks for your help on this - I agree I want to get beyond a mess
here regardless if it is 'working'
Here are 3 tables that demostrate the issues (with the changes I
needed to do use_alter, modify schema.py, hardcode in schema name to
ForeignKey and tables). I want the model
thank you , this was an old ticket #709 and is fixed in r4814 of the
0.4 branch and r4813 of trunk. remove the usage of owner, it is
synonymous with schema (as it is in oracle itself -
http://www.dba-oracle.com/t_schema_components_owner_user.htm
) , as well as all the other hacks.
On
Michael,
Great - that handles the create_all(checkfirst issue)
Any fix for the ix_ table name taking into account Oracle name limits
in schema.py?
Thx,
Brandon
On May 24, 7:37 pm, Michael Bayer [EMAIL PROTECTED] wrote:
thank you , this was an old ticket #709 and is fixed in r4814 of the
0.4
old bug, I think its #820. we generate a bad name in that case. Try
using the schema.Index() or schema.DDL() construct for now as a
workaround (I'm not entirely thrilled about the index=True option on
Column in general).
On May 24, 2008, at 8:20 PM, Brandon Goldfedder wrote:
All,
So have a 'working' solution but think it is pretty bad... Someone
MUST have a better solution. Here is what I had to do:
1. Have create_all explictly not test for tables existing (or else it
finds it in wrong schema)
create_all(checkfirst = False)
2. Explictly set the schema and owner
On May 23, 2008, at 3:10 PM, Brandon Goldfedder wrote:
All,
Perhaps someone can help me here since I am in that 'bad place' where
I am retrying things again and getting deeper than I want into it.
I am trying to create a database (using elixir model although the
problem appears to be in
Michael,
Yes - that is what I am doing now :
ForeignKey(schemaname.tablename.colname)
and I have things working. (see example 3). My problem is these steps
seem really ugly and a lot more work than it should be to get things
working portably and reliably - thus my question on if this is best
On May 15, 2008, at 3:53 PM, sbhatt wrote:
Does anyone know how to write it using SA ?
CONNECT BY goes where things like ORDER BY and GROUP BY go, so is not
going to work within the WHERE clause. It is as of yet unsupported by
the select() construct so you'd have to go with
On Feb 14, 2008, at 6:01 PM, Waldemar Osuch wrote:
On Feb 14, 2:06 pm, Richard Jones [EMAIL PROTECTED] wrote:
On Feb 14, 5:13 pm, Waldemar Osuch [EMAIL PROTECTED] wrote:
On Feb 13, 8:03 pm, Richard Jones [EMAIL PROTECTED] wrote:
Thanks, I should have been clearer: how is ID generation
On Feb 13, 8:03 pm, Richard Jones [EMAIL PROTECTED] wrote:
I've tried poking through the documentation and source to determine
this, but it's still unclear to me how SQLAlchemy generates IDs for
new rows in Oracle.
There's support for sequences in the oracle backend, but there don't
On Sep 25, 2007, at 7:30 PM, m h wrote:
Have updated the ticket with my fix change the dbapi_type of
OracleText from CLOB to NUMBER I'm not sure if this breaks others
code
the bug is, the type of the bind parameters should be coming out as
VARCHAR, not CLOB. NUMBER is
On 9/26/07, Michael Bayer [EMAIL PROTECTED] wrote:
On Sep 25, 2007, at 7:30 PM, m h wrote:
Have updated the ticket with my fix change the dbapi_type of
OracleText from CLOB to NUMBER I'm not sure if this breaks others
code
the bug is, the type of the bind parameters
On Sep 24, 2007, at 11:36 PM, m h wrote:
NP, I know Oracle is a drag but that's what the client has.
Perhaps if you could clarify why I'm confused I might be able to help
debug. (I've stepped through expression.py all day long). I feel
like I just need a little hint or push in the
Have updated the ticket with my fix change the dbapi_type of
OracleText from CLOB to NUMBER I'm not sure if this breaks others
code
http://www.sqlalchemy.org/trac/ticket/793
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
Here's another simple testcase that fails for Oracle beta5 but works
with 0.3.7. It's about the simplest query I can come up with. Have a
table with a date column in it and query against it using the
to_date function.
def test_to_date():
start_date = '10/05/04'
where =
sorry, i havent forgotten you. just have to get the time to power
up my oracle box. thanks for putting in the ticket.
On Sep 24, 2007, at 7:22 PM, m h wrote:
Here's another simple testcase that fails for Oracle beta5 but works
with 0.3.7. It's about the simplest query I can come up
NP, I know Oracle is a drag but that's what the client has.
Perhaps if you could clarify why I'm confused I might be able to help
debug. (I've stepped through expression.py all day long). I feel
like I just need a little hint or push in the right direction.
Eventually you get to a cx
On Sep 21, 2007, at 1:43 PM, m h wrote:
Just for kicks I tried using .3.10 and it failed giving the same error
that was reported in the Aug 18 thread autoloading Oracle tables with
column defaults::
File /home/matt/work/vpython/lib/python2.4/site-packages/
well the issue is not even the bind params its the result coming back
from cx_oracle. its not well documented/consistent which oracle
types come back as a LOB and also come back with a cx_oracle LOB
object, and which ones do not. its possible that just upgrading
your cx_oracle will fix
Thanks for the response!
On 9/22/07, Michael Bayer [EMAIL PROTECTED] wrote:
well the issue is not even the bind params its the result coming back
from cx_oracle.
Again, I'm confused how this query works from straight cx and .3.7 but
fails when .4beta calls it. Could you enlighten me on what
I guess to help validate my confusion, in my debugging I replaced the
line 867 in base.py::
raise exceptions.DBAPIError.instance(statement, parameters, e)
with::
raise
Then it doesn't give me the useful statement and parameters, but it
tells me exactly where it failed::
...
File
On Sep 22, 2007, at 3:45 PM, m h wrote:
So the failure is when CursorFairy executes the execute method on the
cx cursor. Where does the SA converting returned types come into play
on this?
because you sent me this stack trace:
File /home/matt/work/vpython/lib/python2.4/site-packages/
Sorry, my mess of emails appears to have confused you (youre
looking at the error with .3.10 not .4beta)
On 9/22/07, Michael Bayer [EMAIL PROTECTED] wrote:
On Sep 22, 2007, at 3:45 PM, m h wrote:
So the failure is when CursorFairy executes the execute method on the
cx cursor. Where
On 9/22/07, Michael Bayer [EMAIL PROTECTED] wrote:
so the new error youre getting now puts it back in the execution
camp. you need to narrow down the query to the specific column
expression and/or parameter thats making it break.
Here's a simple query that fails. The deal breaker is the
Ok, it's caused by func.to_date. Here's an even simpler testcase.
Try to convert a date to a string::
def test2():
start_date = '12/26/03'
query = select([func.to_date(cal_dim.c.adwkenddt,'MM/DD/RR')])
compiled = query.compile()
result = query.execute()
for r in result:
Disregard this testcase it's late at night no need to convert
a date to a date but the previous testcase fails for .4beta and
works for .3.7!!!
On 9/22/07, m h [EMAIL PROTECTED] wrote:
Ok, it's caused by func.to_date. Here's an even simpler testcase.
Try to convert a date to a
Just for kicks I tried using .3.10 and it failed giving the same error
that was reported in the Aug 18 thread autoloading Oracle tables with
column defaults::
File
/home/matt/work/vpython/lib/python2.4/site-packages/SQLAlchemy-0.3.10-py2.4.egg/sqlalchemy/databases/oracle.py,
line 117, in
Thank you Mike,
but I'm out of ideas with my problem, the resulting query return non-
zero result in sqlplus prompt, but SQLAlchemy
return me 0. So, what I'm looking for is number of found rows.
SELECT count(DISTINCT tad.name)
FROM analysisdataset tad LEFT OUTER JOIN processeddataset tprd ON
Sorry for spam,
it's a bug in my program.
Thanks for your support and prompt responses.
Valentin.
On Apr 14, 8:46 pm, vkuznet [EMAIL PROTECTED] wrote:
Thank you Mike,
but I'm out of ideas with my problem, the resulting query return non-
zero result in sqlplus prompt, but SQLAlchemy
return
37 matches
Mail list logo