Solved

Bulk / auto connecting Reader to writer

  • 27 February 2017
  • 16 replies
  • 70 views

Badge

Hi,

Is it possible to autoconnect or bulk connect readers to writers?

I could choose "copy from reader" option for attributes but I would be happy if I haven't to link my 139 tables by hand!

If you have a trick to easy lowercase all schema and table names it would be be so great!

icon

Best answer by mark2atsafe 27 February 2017, 16:32

View original

16 replies

Badge
Found it, define a sample writer, then select all your readers and right click / "Duplicate on writer" But I have still 139 autoconnect clicks + lowercase! Can't upload image in comment.
Userlevel 4
Badge +25

For connecting feature types, try the Feature Type Connections window (View > Windows > Feature Type Connections)

For connecting upper-lower case attributes, try the BulkAttributeRenamer.

Hope that helps.

Userlevel 4

No fully automatic way to do it (as far as I know), but have a look at the "Feature Type Connections" dialog, available under View / Windows in the FME Workbench. It might be quicker than clicking and dragging in some instances.

Badge +16

my suggestion would be to avoid all the feature types by using the dynamic mode when creating the workspace.

Badge

my suggestion would be to avoid all the feature types by using the dynamic mode when creating the workspace.

This is great indeed. But it's a bit like a black box to me. But it works, after you create the corresponding schema in your writer db.

That's what I obtain by letting it fully automatic. You just have to create the corresponding schema on your db writer. Static workspace generation is great too.

 

 

There's no way to lowercase but that's an other issue over here:

 

https://knowledge.safe.com/questions/1785/lowercase-postgis-table-names.html

 

Badge

For connecting feature types, try the Feature Type Connections window (View > Windows > Feature Type Connections)

For connecting upper-lower case attributes, try the BulkAttributeRenamer.

Hope that helps.

Ty!

 

For lowercase feature types like table and schema names, there's an other issue there https://knowledge.safe.com/questions/1785/lowercase-postgis-table-names.html
Userlevel 4
This is great indeed. But it's a bit like a black box to me. But it works, after you create the corresponding schema in your writer db.

That's what I obtain by letting it fully automatic. You just have to create the corresponding schema on your db writer. Static workspace generation is great too.

 

 

There's no way to lowercase but that's an other issue over here:

 

https://knowledge.safe.com/questions/1785/lowercase-postgis-table-names.html

 

You can lowercase your target table and attribute names, but you need to first include a SchemaSetter then a StringCaseChanger to set "fme_feature_type" to lower case. On the output feature type, set schema source to "Schema from schema feature". Works for me.

 

 

Badge +16
This is great indeed. But it's a bit like a black box to me. But it works, after you create the corresponding schema in your writer db.

That's what I obtain by letting it fully automatic. You just have to create the corresponding schema on your db writer. Static workspace generation is great too.

 

 

There's no way to lowercase but that's an other issue over here:

 

https://knowledge.safe.com/questions/1785/lowercase-postgis-table-names.html

 

You can create the output schema beforehand, but the is not necessary since FME will act according to the settings in the writer and it's feature type and can be used to create the schema prior to writing.
Badge
You can lowercase your target table and attribute names, but you need to first include a SchemaSetter then a StringCaseChanger to set "fme_feature_type" to lower case. On the output feature type, set schema source to "Schema from schema feature". Works for me.

 

 

This seems to work but for me it won't since it generates some python issues on table names :

 

 

 

 

I must probably update my version of FME to get the last builds:

 

But this is strange since table names have no accents and it works for the first entities.
Badge
You can create the output schema beforehand, but the is not necessary since FME will act according to the settings in the writer and it's feature type and can be used to create the schema prior to writing.
How? I've not found this option in the writer feature type options.

 

 

Userlevel 4
This seems to work but for me it won't since it generates some python issues on table names :

 

 

 

 

I must probably update my version of FME to get the last builds:

 

But this is strange since table names have no accents and it works for the first entities.
You probably have non-ascii characters in an attribute name somewhere. Yes, maybe try using the latest FME 2017 RC.
Badge +16
How? I've not found this option in the writer feature type options.

 

 

See tanle handling :

 

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_ReadersWriters/postgis/format_parameters_w.htm
Userlevel 4
This seems to work but for me it won't since it generates some python issues on table names :

 

 

 

 

I must probably update my version of FME to get the last builds:

 

But this is strange since table names have no accents and it works for the first entities.
I got it to work by using FME 2017 and setting the Python compatibility to version 3.4+. This is becuase Python 3+ has vastly improved support for international characters (unicode, more specifically):

 

Badge
How? I've not found this option in the writer feature type options.

 

 

Did not find where. For tables its obvious but automatic schema creation no idea how to do it.
Badge
This seems to work but for me it won't since it generates some python issues on table names :

 

 

 

 

I must probably update my version of FME to get the last builds:

 

But this is strange since table names have no accents and it works for the first entities.
FME 2017, python 3.4+ and still errors like this amazing one:

(when you are in fully automated workspace <3)
Userlevel 4
I got it to work by using FME 2017 and setting the Python compatibility to version 3.4+. This is becuase Python 3+ has vastly improved support for international characters (unicode, more specifically):

 

That's not a Python error, that's a database error, your string literal is too long (>255 characters).

 

Reply