Solved

Batch load dbf files into Oracle failed


Badge +4

I want to load all the dbf files under a folder into an Oracle database, each creating a new table. Attached is workspace I created, but it gives an error that the schema is not defined for the writer. This can be easily done using ESRI arcpy, so should be easy in FME.

icon

Best answer by fmelizard 14 December 2017, 22:29

View original

10 replies

Userlevel 4
Badge +13

Hi @ag, can you try with "Dynamic Schema Definition" enabled on the the Writer Feature Type? The FeatureReader will output a schema feature that should be linked to the Feature Type.

Badge +4

Hi @ag, can you try with "Dynamic Schema Definition" enabled on the the Writer Feature Type? The FeatureReader will output a schema feature that should be linked to the Feature Type.

@TiaAtSafe. I tried (see image below). It gave a warning (instead of an error if not using Dynamic Schema Definition) "Cannot define schema for 'ANKOR' as the feature does not contain schema information, and schema source is set to 'Schema from Schema Feature'. Please verify writer feature type configuration."

 

The log says 35 features are written, but ANKOR table is not created at all.

Badge +4

Hi @ag, can you try with "Dynamic Schema Definition" enabled on the the Writer Feature Type? The FeatureReader will output a schema feature that should be linked to the Feature Type.

I also tried the default "Schema Definition Name" which is "Default from Table name above". No luck, the same results as setting it to fme_feature_type.

 

 

Badge +4

Hi @ag, can you try with "Dynamic Schema Definition" enabled on the the Writer Feature Type? The FeatureReader will output a schema feature that should be linked to the Feature Type.

 

Could this be a bug in FME 2017.1?
Userlevel 2
Badge +17

Hi @ag, can you try with "Dynamic Schema Definition" enabled on the the Writer Feature Type? The FeatureReader will output a schema feature that should be linked to the Feature Type.

The schema feature will be output from the <Schema> port of the FeatureReader. Have you connect between the <Schema> port and the writer feature type?

 

 

Badge +4
The schema feature will be output from the <Schema> port of the FeatureReader. Have you connect between the <Schema> port and the writer feature type?

 

 

@takashi, not sure how to do this. Can you show a screen shot what it looks like? The dbf table rows only come from the Generic port, so I can only connect the Generic port to the writer feature type.

 

Userlevel 2
Badge +17
@takashi, not sure how to do this. Can you show a screen shot what it looks like? The dbf table rows only come from the Generic port, so I can only connect the Generic port to the writer feature type.

 

@TiaAtSafe's screenshot exactly illustrates my intention.
Badge +4
@TiaAtSafe's screenshot exactly illustrates my intention.
Thanks, @takashi.

 

Badge +4

Hi @ag, can you try with "Dynamic Schema Definition" enabled on the the Writer Feature Type? The FeatureReader will output a schema feature that should be linked to the Feature Type.

@TiaAtSafe and @takashi, your advice works great with dynamically loading dbfs into an Oracle DB. I applied exactly the same method to loading shape files dynamically to an ArcSDE geodatabase, but it does not work. The error is "Unable to find the schema definition 'ROWPIPE' for feature with feature type name 'ROWPIPE'. Ensure the feature type name is correct and that its schema definition exists in the schema source". See attached template.gom3-shape2sde-test.fmwt
Badge +4
@TiaAtSafe and @takashi, your advice works great with dynamically loading dbfs into an Oracle DB. I applied exactly the same method to loading shape files dynamically to an ArcSDE geodatabase, but it does not work. The error is "Unable to find the schema definition 'ROWPIPE' for feature with feature type name 'ROWPIPE'. Ensure the feature type name is correct and that its schema definition exists in the schema source". See attached template.gom3-shape2sde-test.fmwt

 

Ok, it works if the shape files are in upper cases or removing the upper case for feature type name in the dynamic writer in which case the loaded SDE feature class name will be in the same case as the shape file name.

Reply