Skip to main content
Question

feature reader has table but there is no data

  • November 4, 2022
  • 8 replies
  • 115 views

Forum|alt.badge.img+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

Forum|alt.badge.img+2
  • 1891 replies
  • November 4, 2022

@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.


Forum|alt.badge.img+5
  • Author
  • 170 replies
  • November 4, 2022

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


Forum|alt.badge.img+5
  • Author
  • 170 replies
  • November 4, 2022

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 

 


Forum|alt.badge.img+5
  • Author
  • 170 replies
  • November 5, 2022

anyone


Forum|alt.badge.img+2
  • 1891 replies
  • November 7, 2022

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


Forum|alt.badge.img+5
  • Author
  • 170 replies
  • November 8, 2022

How ?? i mean what logic i used


geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • November 8, 2022

Something like this?

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

Data? --> Truncate the table in the FeatureWriter

No_Features_Flow


Forum|alt.badge.img+5
  • Author
  • 170 replies
  • November 11, 2022

i can see ArcGis Portal Service in SQL Excuter