Skip to main content
Solved

Rename MS/SQL table names from MapInfo file names ?

  • February 20, 2018
  • 4 replies
  • 50 views

lifalin2016
Supporter
Forum|alt.badge.img+40

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.

Best answer by david_r

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.

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.

4 replies

david_r
Celebrity
  • Best Answer
  • February 20, 2018

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.


lifalin2016
Supporter
Forum|alt.badge.img+40
  • Author
  • Supporter
  • February 21, 2018

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


lifalin2016
Supporter
Forum|alt.badge.img+40
  • Author
  • Supporter
  • February 21, 2018

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 ?

 

 


david_r
Celebrity
  • February 21, 2018
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 :-)