Question

Extract DWG files from Postgres by recent Date

  • 22 January 2019
  • 4 replies
  • 2 views

Badge +6

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

Badge +3

@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

Userlevel 4
Badge +25

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?

 

Badge +6

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.

Badge +6

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

Thank´s

 

Reply