Hi,
Try file > new> generate workspace?
Yes I can do that but how can use table name in parameter to create shapefile?
If you need a triggered SQL reader, i assume that is why you used the featurereader?
Or maybe it is due to some spatial selection you used FeatureReader?
It depends on how you choose wich tabel to read.
Is it a user choice?
Then You can create a user parameter for user to choose table. You can link this user parameter to the "Feature Types To Read" parameter wich you can find inthe navigator panel under Transformers-->FeatureReader.
This same parameter can be used to set a fanout on your shapewriter. You must use the fanout in the navigator for it to work. Adn also you must put the parametervalue into a attribute, because fanout can only link to attributes.
See pics.
Zoom in and see the user parameter called "Tabel origin".
See it is linked to "Feature Types To Read" in the FeatureReader.
And the shapeFile has its fanout set to the attribute that holds the tablename.
Also see this pic.
The FeatureReader must be set up and you are obligated to choose a table. But this gets overriden by the tabel linked in FeatureReader (navigatorpanel).
In my example FeatureReader is set up to read adresses, but as my user attribute is set to Neighoubrhoods (Buurten in Dutch), it actually reads the neighbourhoodnames and not adresses.
Hi,
After i saved the file the feature reader shows the parametername in the Transformer. In this case "$TabelOrigin".
Appearently you only need to set the fan out on the featuretype on the writer.
Here is a pic.
In the previous pic u can see it showed the parametervalue, the chosen table , this was prior to saving it. (I have no idea if this is intended behaviour.)
Thanks Gio, This is exactly what I was looking for. That's very helpful.
Cheers