Skip to main content

We have a workspace that retrieves data from 40+ tables in on and off-site databases and writes the results to tables in an on-site Oracle database. The workspace consists of SQLexecutors and SQLcreators which read the data using ODBC, and Oracle non-spatial writers which write to the local tables. To help with data verification, for each table written to in the local database I want to write a row to a data verification table with the tablename and the number of rows written. I've tried using Counters and Samplers attached to each reader to get the number of rows written, and can route those to a writer to write to the data verification table, but can't seem to get the table name exposed. The attributeexposer and exploders expose the column names but not the table names. And I was hoping there may be a more efficient way of doing this than by attaching individual counters and samplers. Basically, I want the Features Written Summary from the workspace log written to the data verification table. Any suggestions how to do this? 

If you change to use FeatureWriters to write to the Oracle tables you'll get a summary output giving counts of features written.

 

image


@nsevenseven​ FeatureWriter as suggested by @ebygomm​ is the approach you need. to be absolutely sure of the counts you can follow the FeatureWriter with another SQLExecutor to query the table you've just written with a COUNT


If you change to use FeatureWriters to write to the Oracle tables you'll get a summary output giving counts of features written.

 

image

Thank you both for the quick response - that works very well.

 

However I have a new problem/question - it seems that the FeatureWriter doesn't let me manually match columns from the readers to the writers. The columns in the source tables are often written with different column names in the target tables, and the Oracle non-spatial writers let me manually connect columns. Is there a way I can accomplish this with the FeatureWriter?

 

Thanks again for the help.


Thank you both for the quick response - that works very well.

 

However I have a new problem/question - it seems that the FeatureWriter doesn't let me manually match columns from the readers to the writers. The columns in the source tables are often written with different column names in the target tables, and the Oracle non-spatial writers let me manually connect columns. Is there a way I can accomplish this with the FeatureWriter?

 

Thanks again for the help.

What you can do is in your current workspace, right click on the connector to the writer and choose "Replace link with Attribute Manager", this will rename the attributes for you as per the line connections so that the attributes are named correctly for the writer.

 

Can't quite believe we haven't got a replace writer with Feature writer option yet

https://community.safe.com/s/bridea/a0r4Q00000HbqqkQAB/convert-reader-writer-to-featurereader-featurewriter


Thank you both for the quick response - that works very well.

 

However I have a new problem/question - it seems that the FeatureWriter doesn't let me manually match columns from the readers to the writers. The columns in the source tables are often written with different column names in the target tables, and the Oracle non-spatial writers let me manually connect columns. Is there a way I can accomplish this with the FeatureWriter?

 

Thanks again for the help.

That worked, thank you! Have a good day.


@nsevenseven​ FeatureWriter as suggested by @ebygomm​ is the approach you need. to be absolutely sure of the counts you can follow the FeatureWriter with another SQLExecutor to query the table you've just written with a COUNT

Thank you for the suggestion, that is a good idea.


Reply