Skip to main content
I have a simple Excel spreadsheet which keeps track of modification dates in the format (YYYYMMDDHHMMSS). I use the InlineQuerier to get the maximum date from the column called Last_Update. I have confirmed, by outputting this value to a text file, that it is pulling the correct date from the Excel column.

 

 

Now I wish to append this date as a new field on all records of another table coming from Oracle. Each record from Oracle should have the same new field called Last_Export and the same date coming from the Excel spreadsheet.

 

 

FeatureMerger does not work as I don't have a common attribute between the two tables.

I am trying to get the location curve property for walls using FME and Revit Reader.  To be clear, this is not the geometry of the wall, but the line Revit uses to create the wall.  From what I can tell, the property is not in the actual file itself, but the result of a Revit API method:  

wall.Location as LocationCurve

 

I use Python scripts in Dynamo, but this is unknown territory for me.  Is it possible to install Revit API modules and do something like this?

import fme
import fmeobjects
from Autodesk.Revit.DB import *
 
 
def locLine(feature):        
    line = feature.Location.Curve
    if isinstance(line, fmeobjects.FMELine):
        cLine = line.getAsLine()

Any insight is appreciated.  For now, I will get the lines in Dynamo, export to Excel, and then merge in FME.  Not very elegant!

 

Thanks,

@lorenrouth


Hi,

 

 

You could create a dummy value on both inputs (merge = 1) to use in the feature merger.

 

Hope this helps
I guess I'm just not using the VariableSetter and Retriever correctly because that is not working. Also, Italy, I'm not sure what you mean about creating a dummy value.

 

 

What I really want is to use the single value retrieved from the Excel spreadsheet as the Right Value in my Tester. I hoped that if I could attach the value to every incoming record, that would help.

 

 

I have 18000 records coming in from Oracle. I have the one record coming in from Excel. I put the VariableSetter after the Excel and then the Variable Retriever. This single value plus the 18000 records go into my Tester. The Left Value is from Oracle and the right value, which I need to compare against all 18000 records is from the VariableRetriever. The variable seems to be blank at this stage as the passes records are not correct.

 

 

Hope this makes sense.

 


Are you sure it's a problem with the variable retriever and not the date formats?
I've put a text writer after the VariableRetriever to see what is being written for my variable and I have 18000 empty lines and the last extra line (18001) has the correct variable. So it only seems to be reading in the variable once.
Workspace should look something like this, you don't need to join the connections to retrieve the variable.

 

 


What I mean is using an attribute creator (att name merge, att value = 1) on both xls and oracle data, then use the feature merger  with the merge att.

 

That way all the oracle features will receive the xls value.

 

After that you can test the oracle attributes to the xls merge att value.

 

Itay
Hi,

 

 

I think Itay's way (FeatureMerger) is simple and good one. There is  another way with SQLExecutor transformer. 1) Input the feature (only one) having Last_Update to SQLExecutor as INITIATOR. 2) Setting parameters of the SQLExecutor are: SQL Statement: an appropriate 'select' statement to get all records to which you need to append Last_Update Combine Attribute: 'Keep Initiator Attributes if Conflict'   Then, all output features (records) will have the same Last_Update.

 

Takashi
As you see there is no one single way to do something in FME, some are simple some more complex, it all depends on you own preferences and experience (SQL, transformers)

 

Itay
We do have an UnconditionalFeatureMerger custom transformer in the FME Store that you could use for this.

 

 

Basically this was common enough for me that I created this custom transformer and shared it online. Like Itay suggests, it just uses a dummy value to merge everything from one feature onto a set of others.

 

 

Hope this helps

 

 

Mark

 

 


Excellent this works like magic 

 

 


Reply