Skip to main content

Hi

 

I am new to FME, and just trying to create a simple flow where I take to inpust from ms sql database and store the result in another ms sql database.

The qyery for the jin of these to look like (pseudo code)

 

select ....

FROM dbo.GL

WHERE COMPANY = 1 

AND ACCOUNTING_YEAR = 2021 

AND TEXT <> 'Project'

AND CODE_f IN (SELECT PROJECT_ID FROM dbo.PROJECT WHERE COMPANY = 1 AND PROJECT_GROUP IN (10,30))

 

Running in query editor I get the correct result.

But when trying to use FME deskltop and transformer as tester and featurejoiner I get a 2x result.

So what transformer should I use ?

 

Thanks for your help

 

Dan

Hello Dan,

 

I would look into using the "SQLExecutor" or "SQLCreator" transformers. You can initiate a "Creator" Transformer and pipe that into the "SQLExecutor" to run your SQL command against your DB and return the desired results, or you can use the "SQLCreator" at the beginning of your workflow.


Hello Dan,

 

I would look into using the "SQLExecutor" or "SQLCreator" transformers. You can initiate a "Creator" Transformer and pipe that into the "SQLExecutor" to run your SQL command against your DB and return the desired results, or you can use the "SQLCreator" at the beginning of your workflow.

Thank you John

 

I will try this, but is this not possible to solve by using join, filter or any other transformer ?


Thank you John

 

I will try this, but is this not possible to solve by using join, filter or any other transformer ?

Can you show how you have the FeatureJoiner set up?


Thank you John

 

I will try this, but is this not possible to solve by using join, filter or any other transformer ?

Danketil,

Based on your description, it seems like you would like to read features from one database and then insert them directly into ​a different database. A featurejoiner typically takes two streams of data and joins then based on an attribute key. The featurejoiner can perform left,inner,full,etc joins, however it doesn't sound like this is what you need. You could simplify your process to use a MSSQL reader to read the table from the first database, and then use a MSSQL writer to insert those features into the second database into a new or existing table. Check out the help articles on this page. If my understand of your question is incorrect, you may want to update your question and attach your current workspace so the community can better assist you.


Thank you John

 

I will try this, but is this not possible to solve by using join, filter or any other transformer ?

John,

Please find attached a screenshoot of my flow

fme_1


Reply