Solved

Bulk Mode in PythonCaller

  • 24 January 2023
  • 2 replies
  • 9 views

Userlevel 5
Badge +29

I see an idea to add/support bulk mode in the PythonCaller has just been updated to "Released" - https://community.safe.com/s/bridea/a0r4Q00000HbriAQAR/support-bulk-mode-in-pythoncaller

 

I'm wondering what the usage of the bulk mode is in the PythonCaller, by design the PythonCaller iterates over each feature individually, therefore going against the idea of bulk mode.

 

 

 

 

icon

Best answer by markatsafe 24 January 2023, 21:03

View original

2 replies

Badge +2

@hkingsbury​ Great question. There is no real benefit within the python itself. The main benefit will be that if you have feature tables entering the PythonCaller they will be preserved on exit. So other transformers can still benefit from the feature table.

In the PythonCaller template there is a function "has_support_for". If you set this to return 'True' then feature tables will be preserved.

So good to use if you have large numbers of feature being processed in your PythonCaller.

Userlevel 5
Badge +29

@hkingsbury​ Great question. There is no real benefit within the python itself. The main benefit will be that if you have feature tables entering the PythonCaller they will be preserved on exit. So other transformers can still benefit from the feature table.

In the PythonCaller template there is a function "has_support_for". If you set this to return 'True' then feature tables will be preserved.

So good to use if you have large numbers of feature being processed in your PythonCaller.

Thanks Mark :)

Reply