Skip to main content
Solved

Bulk / auto connecting Reader to writer


ponceta
Contributor
Forum|alt.badge.img+7

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!

Best answer by mark2atsafe

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.

View original
Did this help you find an answer to your question?

16 replies

ponceta
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 27, 2017
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.

mark2atsafe
Safer
Forum|alt.badge.img+43
  • Safer
  • Best Answer
  • February 27, 2017

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.


david_r
Evangelist
  • February 27, 2017

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.


itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • February 27, 2017

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


ponceta
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 28, 2017
itay wrote:

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

 


ponceta
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 28, 2017
mark2atsafe wrote:

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

david_r
Evangelist
  • February 28, 2017
ponceta wrote:
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.

 

 


itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • February 28, 2017
ponceta wrote:
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.

ponceta
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 28, 2017
david_r wrote:
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.

ponceta
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 28, 2017
itay wrote:
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.

 

 


david_r
Evangelist
  • February 28, 2017
ponceta wrote:
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.

itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • February 28, 2017
ponceta wrote:
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

david_r
Evangelist
  • February 28, 2017
ponceta wrote:
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):

 


ponceta
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 28, 2017
ponceta wrote:
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.

ponceta
Contributor
Forum|alt.badge.img+7
  • Author
  • Contributor
  • February 28, 2017
ponceta wrote:
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)

david_r
Evangelist
  • February 28, 2017
david_r wrote:
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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings