Skip to main content

I would like to use a user parameter to create the name of a PostGIS table.

 

I have created the parameter (named Vn_PostGIS), and I have added it to the writer - in my example the table name is added to the writer as:

table_$(Vn_PostGIS)_polys

I can run the workspace within FME GUI and add the parameter name in the Translation Parameter Values dialog, and it works fine. If however I run it from a windows batch file, it ignores the parameter value in the table name, and tries to create a table named

table__polys

 

I am passing the parameter in the batch file using --VnPostGIS vn2.

 

I also pass the filename of the file to be read, and that works fine. I can see from the log file that FME has taken the value of the parameter on the line "FME Configuration: Command line arguments are". It states that the value is the same as I have in my bat file. However when it gets to checking for the exisitence of the table, it fails as it drops the value of my parameter, so the table name is wrong.

 

Any ideas of what I am doing wrong

 

 

forgot to add, using FME 2019.1.2.0 build 19630 WIN64


Hi @jamesstott1,

Try adding quotes to the parameter value in the batch : --tablename "MyTable" and make sure you have one line:

"C:\Program Files\FME20191\fme.exe" C:\temp\none2postgres.fmw --tablename "MyTable"

0684Q00000ArJg1QAF.png


Hi @jamesstott1,

Try adding quotes to the parameter value in the batch : --tablename "MyTable" and make sure you have one line:

"C:\Program Files\FME20191\fme.exe" C:\temp\none2postgres.fmw --tablename "MyTable"

0684Q00000ArJg1QAF.png

Thanks for the response. 

I have tried with and without quotes on both the parameter name and the parameter value and it doesnt work either way.


Thanks for the response.

I have tried with and without quotes on both the parameter name and the parameter value and it doesnt work either way.

How does your bat file look like? Can you share it?


OK, this can be filed under "add a question on a forum and find out that its your fault and not the software" . I didnt have the same name for the parameter in both FME and the batch file 😞 Sorry for the noise. Would seem that the weekend is much needed...


OK, this can be filed under "add a question on a forum and find out that its your fault and not the software" . I didnt have the same name for the parameter in both FME and the batch file 😞 Sorry for the noise. Would seem that the weekend is much needed...

Happens to us all...have a nice one (weekend)


Reply