Skip to main content

Hi,

I've been given a set of 20+ MapInfo tables, of which most have a period (.) in the file names.

I need to convert these tables into MS/SQL, but this presents a problem, since periods are no-go in MS/SQL, and I need to control the schema.

I'm trying to write using a dynamic writer, but I simply cannot figure out the combination of parameters, that'll allow me to replace the periods with underscores before writing into the database. No matter what I do, I loose the connection to the "schema", and nothing gets converted.

Please help me out. This ought to be a no-brainer, but I'm stumped.

Cheers.

Create a copy of fme_feature_type (e.g. "fixed_fme_feature_type") in which you replace the period with something else.

On the output feature type, specify "fixed_fme_feature_type" as the table name and set "fme_feature_type" as the schema definition name.


I solved it in a different way.

I added a reader of schemas, and did a string replacement in its "fme_feature_type" attribute.

Then I did the same string replacement in the dynamic writer, and pointed its schema input to the schema reader output instead.

That seems to work, although I end up with a small and unwanted table "schema".

I'll try your suggestion for future implementations though. Thanks.

Cheers


Create a copy of fme_feature_type (e.g. "fixed_fme_feature_type") in which you replace the period with something else.

On the output feature type, specify "fixed_fme_feature_type" as the table name and set "fme_feature_type" as the schema definition name.

Hi David,

 

It seems to work.

 

But can you explain to me, why <<specify "fixed_fme_feature_type" as the table name>> (i.e. to (a)Value(fixed_fme_feature_type) ) works, where as setting the table name to the expression (a)ReplaceString((a)Value(fme_feature_type),".","_") does not ?

 

 


Hi David,

 

It seems to work.

 

But can you explain to me, why <<specify "fixed_fme_feature_type" as the table name>> (i.e. to (a)Value(fixed_fme_feature_type) ) works, where as setting the table name to the expression (a)ReplaceString((a)Value(fme_feature_type),".","_") does not ?

 

 

That's an excellent question, unfortunately I have no idea why it doesn't work 🙂

Reply