Skip to main content
Question

Extract DWG files from Postgres by recent Date


mr_fme
Enthusiast
Forum|alt.badge.img+7

Hi,

 

I have one postgres table with DWG features recorded, the features are from many files, the files name is in filename column.

 

Look that the kind column, there are 3 different kind...I, II and III. In others words one specifical filename can be of the 3 kinds in the same time. Because the same DWG file was recorded in Postgres considering the 3 differents models of the drawing.

Note: all features belonging to same file have the same file_date.

In short I need to extract all features group by filename but considering the most recent file_date

Maybe I was clear?

 

Thank´s

4 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 22, 2019

@mr_fme

If you wish to use fme transformer's for that:

Then you can use Statistics Calculator analyse the date filed and group by filename.

As Statistics Calculator works on date fields.

 

Of course you can do same using a Postgres query:

select max(date)

from table

group by filename


redgeographics
Celebrity
Forum|alt.badge.img+48

Making sure if I understand you correctly:

In this example the most recent date for the file 158-Maria_Farm_01 is 08-22-2019 so you only want to extract that feature?

 


mr_fme
Enthusiast
Forum|alt.badge.img+7
  • Author
  • Enthusiast
  • January 22, 2019
redgeographics wrote:

Making sure if I understand you correctly:

In this example the most recent date for the file 158-Maria_Farm_01 is 08-22-2019 so you only want to extract that feature?

 

No, all feature belonging to 158-Maria_Farm_01 with 08-22-2019 (if most recent), in short means all features from the same dwg file. Example: features with Kind = I, filename = 158-Maria_Farm_01, file_date 08-22-2019...equals same DWG.


mr_fme
Enthusiast
Forum|alt.badge.img+7
  • Author
  • Enthusiast
  • January 22, 2019

I solve my problem using StringReplacer, DateTimeConverter before StatisticCalculator...after FeatureMerger

Thank´s

 


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