Skip to main content

We're using FME Flow 2023.1.2.

We have got a Windows Share registered as a custom resource at FME Flow, which is locally accessible as a UNC path. I'm looking for a way to reference the custom resource in such a way that it locally uses the UNC path and at FME Flow automatically uses the resource. I believe I can use Deployment Parameters for that.

When I create a Deployment Parameter and use it as part of the path in a FeatureReader, it doesn't recognize the file I'm trying to reach, though I did fill in the local value of the Deployment Parameter.

  • Deployment Parameter Value: $(FMEShare)
  • Deployment Parameter Local Value: \\computername\shared_folder\
  • Reader Path: $(FMEShare)Subfolder\file.xlsx

I tried to create an attribute _pathExcel that is set to the path I tried to fill in in the FeatureReader. Locally that worked, but at FME Flow I got this error message:

Too many recursive macro substitutions -- line currently is: `$(FMEShare)'

How can I tailor this method to get it to work? Thanks!

No idea how to fix this using deployment parameters, but I use a Python Scripted Parameter to do this:

VarTest = '\\\\test\\data\\...'
VarProd = '\\\\prod\\data\\...'

if FME_MacroValues.get('FME_ENGINE', '') == '':
    if FME_MacroValues.get('Omgeving', '') == 'Test':
        return VarTest
    elif FME_MacroValues.get('Omgeving', '') == 'Prod':
        return VarProd
    else:
        return ''

elif 'TEST' in FME_MacroValues.get('FME_ENGINE'):
    return VarTest
elif 'PROD' in FME_MacroValues.get('FME_ENGINE'):
    return VarProd

else:
    return ''

 


Thanks for your answer, @nielsgerrits ! This approach would probably solve my challenge, but I don't really like to put a Python Scripted Parameter in each and every workspace that uses this connection.

I like the approach of deployment parameters being managed and maintained at FME Flow, it's makes life a bit easier 😉 Any other ideas?


hi @jtermaaten, do I understand correctly: the value of your DP is $(FMEShare), but what is the name of the deployment parameter?

I think the readerpath should be: $(NameOfDeploymentParameter)Subfolder\file.xlsx

This is similar to our usage of deployment parameters, which works fine here

 

 

 

 

 


Thanks @becchr for your reply and great to hear your setup works fine!

Previously the name and value of the deployment parameter were identical. I have changed that to prevent future confusion ;-)

  • Name: FME_Share
  • Value: $(FMEShare) (which is the resource name at FME Flow, referring to a UNC Path)
  • Local Value: UNC Path

I did some testing and it seems I can get it to work, though I don't really understand why..

When I enter the path $(FME_Share)Test\RD_Scales.xlsx in the FeatureReader, I get an error, which indicates the local value is not used, but the default FME Flow value is used instead.

 

When I add an attribute containing the same path and use that attribute as Dataset in the FeatureReader, it succeeds.

The question remains: why isn't the local value being used when the Deployment Parameter is used directly in the Dataset Parameter of a FeatureReader?


Reply