Skip to main content

I have a oracle special data from database one which looks like below, it was a label or a text something.

MDSYS.SDO_GEOMETRY(2001,82232,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,0,6001,11,1,1),MDSYS.SDO_ORDINATE_ARRAY(360.784660012623,0,0,1,131072,16,7209045,7602281,3211296,655373,630758.221843477,5523011.93164305))

and I want to copy it to database two with FME.

I added an AttributeExposer as a transformer to expose oracle_element{}, and added a ListExploder to list _element_index for the oracle_element{}. I also set geomedia_text_font_size to 0 with another AttributeCreater. But the result I got was always something like below:

MDSYS.SDO_GEOMETRY(2001,82232,NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,0,6001,8,1,1),MDSYS.SDO_ORDINATE_ARRAY(360.784660012623,0,0,1,65536,4,437918234,630758.221843477,5523011.93164305)).

It seems the source data saved the geometry_text_string with 16 bytes, while the target data saved it in 8 bytes.

My question is that is there any transformer or any way to copy the source data to the destination ?

Thanks.

Hi @whq10whq10, If you are not doing any data transformation and reading and writing from Oracle, I would try to generate a workspace (CTRL+G) using the dynamic setting. That will result if a workspace where the writer schema originates from the reader.

Hope this helps.


Thanks Itay. Actually, my case will do some data transformation from the source to the target. I tested with dynamic schema you suggested but FME complains Cannot create table within when logged in user is ''". I noticed if there is no format characters in the geometry_text_string, the transformation will be good, but if there is any format characters in geometry_text_string, FME will remove all the format characters so the geometry data is a little bit different with the original, which was not I want. I just want to keep the format characters in the target geometry, but failed after attempting to use all kinds of character, text, or string transformers.


Thanks Itay. Actually, my case will do some data transformation from the source to the target. I tested with dynamic schema you suggested but FME complains Cannot create table within when logged in user is ''". I noticed if there is no format characters in the geometry_text_string, the transformation will be good, but if there is any format characters in geometry_text_string, FME will remove all the format characters so the geometry data is a little bit different with the original, which was not I want. I just want to keep the format characters in the target geometry, but failed after attempting to use all kinds of character, text, or string transformers.

 

I would contact support about this issue.

U want to copy the sdo_geometry string to a spatial database?

Update or insert statement as explained in the oracle sdo user guide docs.

Or just push the geometry in..

You can use a sql creator to simply do read the geometry :

select

MDSYS.SDO_GEOMETRY(2001,

 

82232,

 

NULL,

 

MDSYS.SDO_ELEM_INFO_ARRAY(1,0,6001,11,1,1),

 

MDSYS.SDO_ORDINATE_ARRAY(360.784660012623,0,0,1,131072,16,7209045,7602281,3211296,655373,630758.221843477,5523011.93164305))

 

from dual

If you have it in a attribute

select

@Value(MySDO_attr)

from dual

etc.

and then write the output to database as desired.


Reply