Question

feature reader has table but there is no data

  • 4 November 2022
  • 8 replies
  • 10 views

Badge +5

I have a workspace where I gather the data from the web and upload on data base

 

whenever data available my script run and load the data on the database with truncate.

 

now the issue is on the source table remove the data until new data is not available

so when I run the script the feature reader shows me nothing. so how can I truncate as well until new data is not available?

 

 

 

as you can see Advisory Wind don't have records from source so if there is record i need to truncate my table image 


8 replies

Badge +2

@asadamjad​ There is a NoFeaturesTester custom transformer on FME HUB that you can use to test for when not features are received. Then you can do something like run a SQL script using SQLExecutor to truncate your tables.

Badge +5

i cant use sql Script as i m get data from web

Badge +5

This transformation is okay, but I am not looking at this.

 

 

When inserted, hit the feature reader and know the feature is empty or has a record. image 

 

Badge +5

anyone

Badge +2

@asadamjad​ You could use the SQLExecutor to truncate the tables on the target database

Badge +5

How ?? i mean what logic i used

Userlevel 3
Badge +33

Something like this?

No data? --> Truncate the table in the SQLExecuter

Data? --> Truncate the table in the FeatureWriter

No_Features_Flow

Badge +5

i can see ArcGis Portal Service in SQL Excuter

Reply