Skip to main content
Solved

How do I use a parameter to call a feature class in a Feature Reader when I run a workbench from a python script?


surbhi
Contributor
Forum|alt.badge.img+1

I am trying to read metadata in FGDC format from a feature class using a python script and workspace runner to call in a workbench. I want to know how I can set a parameter to call a feature class from a geodatabase.

Best answer by markatsafe

You should be able to use the reader parameter called Feature Types to Read. It's available on all readers and in the FeatureReader

View original
Did this help you find an answer to your question?

4 replies

Forum|alt.badge.img+2
  • Best Answer
  • February 8, 2019

You should be able to use the reader parameter called Feature Types to Read. It's available on all readers and in the FeatureReader


surbhi
Contributor
Forum|alt.badge.img+1
  • Author
  • Contributor
  • February 8, 2019

thanks @MarkAtSafe !

that worked for me when I read a feature class from a file geodatabase.

 

However when I try to do read a feature class from a SDE geodatabase, I get an error which starts with 'Too many recursive macro substitions -- line currently is: `SOURCE_READER GEODATABASE_SDE CONNECTION_FILE "$(CONNECTION_FILE)"

Do you know what may be causing this error?


Forum|alt.badge.img+2
  • February 11, 2019
surbhi wrote:

thanks @MarkAtSafe !

that worked for me when I read a feature class from a file geodatabase.

 

However when I try to do read a feature class from a SDE geodatabase, I get an error which starts with 'Too many recursive macro substitions -- line currently is: `SOURCE_READER GEODATABASE_SDE CONNECTION_FILE "$(CONNECTION_FILE)"

Do you know what may be causing this error?

@surbhi It looks like you've created a parameter and are using that parameter to set the SDE connection file parameter that already exists. I might try disabling your existing Geodb SDE reader in the navigator and then adding a new Geodb SDE reader from scratch and see if that fixes your workspace


germang
Contributor
Forum|alt.badge.img+12
  • Contributor
  • March 24, 2022
surbhi wrote:

thanks @MarkAtSafe !

that worked for me when I read a feature class from a file geodatabase.

 

However when I try to do read a feature class from a SDE geodatabase, I get an error which starts with 'Too many recursive macro substitions -- line currently is: `SOURCE_READER GEODATABASE_SDE CONNECTION_FILE "$(CONNECTION_FILE)"

Do you know what may be causing this error?

Hi @surbhi, you can try to use a ParameterFetcher to fetch the connection file and pass that parameter as an attribute instead of as a publish parameter in the FeatureReader.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings