Skip to main content
Solved

Batch load dbf files into Oracle failed

  • December 14, 2017
  • 10 replies
  • 39 views

aguan
Supporter
Forum|alt.badge.img+11

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.

Best answer by fmelizard

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

10 replies

fmelizard
Safer
Forum|alt.badge.img+21
  • Safer
  • Best Answer
  • December 14, 2017

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.


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • December 15, 2017

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.


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • December 15, 2017

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.

 

 


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • December 15, 2017

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?

takashi
Celebrity
  • December 15, 2017

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?

 

 


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • December 15, 2017
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.

 


takashi
Celebrity
  • December 15, 2017
@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.

aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • December 18, 2017
@TiaAtSafe's screenshot exactly illustrates my intention.
Thanks, @takashi.

 


aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • December 22, 2017

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

aguan
Supporter
Forum|alt.badge.img+11
  • Author
  • Supporter
  • December 28, 2017
@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.