Skip to main content

Hi All, First of all, tanks for reading my post.

 

FME Desktop 2022.2

Objective: Using the Feature Reader I’m trying to dynamically have a user input an existing sde table name (so the user is prompted to insert the table name that already exists), then I have a reprojector followed by the FeatureWriter to Drop and Create the table in a new projection. The table to be dropped an create will be the same one inserted by the user. Hence, this table already exists. 

Error: ‘Feature Type Definition {feature here} was requested, but not defined’. I checked another similar post, but I still can’t get my workbench to work. 

 

I have a Feature Reader set as follows:

 

When I run the workbench, the FeatureReader does not show the table name that was inserted by the user, but instead, it catches the table records under ‘Generic’ see screenshot below.  (If I were to access that table statically (connecting to the table via the SDE connection), then the table name will display along with it’s schema definitions columns and attributes).

When I inspect it, it shows like this below. Notice there no schema displayed such as the column name and its attributes, however, it does pick up the geometry points.  

 

Feature Writer: Notice I have fme_feature_type as the feature class. This contains the value of the table that the user entered. 

 

Under User Attributes tab I have the attribute definition set to Dynamic, but it does not show the columns field names.

 

When I run it, I get the error:

Feature Type Definition {feature here} was requested, but not defined

 

I’ve also tried the $(TableName) parameter on the FeatureWriter feature class but still get the same error.

 

However, If I set the attribute definition to Automatic, then the Feature Writer Parameters automatically change 

 

Notice how the Geometry is automatically changed to geodb_point and the dynamic schema definition is disabled :

When I run this, it runs successfully, the table is dropped and created with the new projection but it is missing the schema (column field names and its attributes). 

 

Question: What else can I do to get this working? I don’t want to create Staging table then having to go back and rename tables etc.

Thank you. 

Hello @messagemauri, thanks for posting! Sorry to hear you’re having your issues writing the tables back to SDE.

This type of error is usually thrown when the writer receives: the data before the schema features or does not receive the schema at all. 

Because all feature types will exit out of the <Generic> port, you will not see the schema in the table preview, as it would be stored, unexposed in the feature information window. We do not need to expose anything here, all we need to do is ensure the schema features coming out of the FeatureReaders <Schema> port hits the writer before the data features. In the following example, Counter and Sorter transformers were used to properly order the data as its sent to the SDE Writer: 

Please let me know if you’re still experiencing the error after implementing the suggestions above! Happy to help, Kailin. 

 


Thank you @kailinatsafe Kailin for your explanation. Your suggestion worked smoothly. 


Reply