Hi Roland,

 

I couldn't resist chiming in for anyone using the term "wobbler"...

 

The good news is that this issue is 100% fixed in FME 2007.

 

The bad news is that its definitely broken in FME 2006 GB.

 

Here's why.

 

When you publish the parameter, it ends up writing mapping file code
like this:

 

#
------------------------------------------------------------------------
-

POSTGIS_1_DEF public.all_fme_geometry_line                             \

  postgis_type                 postgis_line                            \

  postgis_sql_where_clause     $(postgis_sql_where_clause)             \

  postgis_sql_statement        ""                                      \

  id                           int4

 

That is in GB.

 

In FME 2007, it writes this:

 

#
------------------------------------------------------------------------
-

POSTGIS_1_DEF public.all_fme_geometry_line                             \

  postgis_type                 postgis_line                            \

  postgis_sql_where_clause     "$(postgis_sql_where_clause)"           \

  postgis_sql_statement        ""                                      \

  id                           int4

 

So that's why all is well now.

 

How can you work around it? Easy enough, it turns out.  Just edit the
parameter AFTER you've published it, and add in the quotes yourself:

 

 

 



 

 

And Bob will be your uncle.

 

 

Now, only problem is, come FME 2007 upgrade time, I suspect you'll need
to go and remove those quotes, because they will act like anti-matter to
the quotes that FME 2007 will want to add back in.

 

Hope that helps.

 

(And lastly, I must set the record straight, the WWJD encoding stuff
doesn't necessarily work everywhere, it only works on those transformers
where we've indicated that an encoding can be used, and so it wouldn't
help here...).

 

Good luck.

 

And lastly, I must ask, is a "wobbler" referring to a bad cricket pitch?
And how is it different than a sticky wicket?

 

Dale

 

On 06 Mar 2007 08:23:26 -0800, Roland Martin <[EMAIL PROTECTED]>
wrote:

> 

> Hi, me again.

> 

> So, this is what I'm up to this time:

> - I have a postgis database

> - I want to extract different bits of it to a CAD file, using the
published parameter to specify the 'where' clause

> 

> The problem I'm having is that the where clause contains spaces. This
is not a problem if you enter the text directly into the
Properties/Parameters box, but if you try to pass it as a published
parameter, Workbench immediately throws a wobbler:

> 

>     fme.exe export_postgis_DWG.fmw

>           --SourceDataset_POSTGIS [db]

>           --DestDataset_ACAD [file]

>           --postgis_sql_where_clause "field = 'value'"

> 

> 2007-03-06 13:56:15|    0.7|  0.0|ERROR |Error executing SQL command
('DECLARE [table]_crsr____ CURSOR FOR SELECT [fields] FROM [table] WHERE
field'): 'ERROR:  argument of WHERE must be type boolean, not type
integer

> '.

> 

>  Clearly it's just trimming off everything after the space.

> 

> So, 2 questions:

> 1. is there an alternative character I can use that will still be
understood? i.e. if I change all my spaces to (for example) carets, will
FME and PostGIS still happily accept this as a query?

> 2. is there any obvious way round this? The only alternative I can see
is to somehow convert all the bits of the query into AttributeFilters,
which would be very troublesome

> 

> Thanks!

> Roland.

> 

<<attachment: image001.jpg>>

Reply via email to