Skip to main content
Solved

Python startup script to operate on an unpacked zipped File Geodatabase input


bruceharold
Contributor
Forum|alt.badge.img+17

I have a GEODATABASE_FILE reader set to a ZIP file path.

I want to run an ArcGIS geoprocessing tool on the contents before the workspace runs, using ArcPy.

I can see the data unpacks to AppData\\Local\\Temp\\FME_TempFileStore_* directories.

Is it possible to access the unpack location in Python? I can't see the path exposed in FME_MacroValues.

Best answer by mark_f

Different approach?

Why not unpack in Python inside the Workspace before running ArcPy, then reading with a FeatureReader.

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

6 replies

Forum|alt.badge.img+2
  • Best Answer
  • March 30, 2017

Different approach?

Why not unpack in Python inside the Workspace before running ArcPy, then reading with a FeatureReader.


itay
Supporter
Forum|alt.badge.img+16
  • Supporter
  • March 30, 2017
mark_f wrote:

Different approach?

Why not unpack in Python inside the Workspace before running ArcPy, then reading with a FeatureReader.

Yes I doubt the temp location will be a possible solution, I would use the start up script to unzip or do that in a python transformer before using arcpy.

 

 


bruceharold
Contributor
Forum|alt.badge.img+17
  • Author
  • Contributor
  • March 30, 2017

Hi, yes I can always unzip but that undoes the goodness of using a zipfile 900MB (in my case) in size and then having to clean up. I need to pivot a table with 10M rows, SQL isn't an option but arcpy. PivotTable_management works great. I'm grasping at straws here :-)


david_r
Evangelist
  • March 31, 2017
bruceharold wrote:

Hi, yes I can always unzip but that undoes the goodness of using a zipfile 900MB (in my case) in size and then having to clean up. I need to pivot a table with 10M rows, SQL isn't an option but arcpy. PivotTable_management works great. I'm grasping at straws here :-)

If you unzip your data to the directory path created by the TempPathnameCreator, the contents will be automatically deleted when FME terminates (just before the shutdown script). You can e.g. use the ZipExtractor or the Unzipper from the FME Hub, should be pretty easy.

bruceharold
Contributor
Forum|alt.badge.img+17
  • Author
  • Contributor
  • March 31, 2017
david_r wrote:
If you unzip your data to the directory path created by the TempPathnameCreator, the contents will be automatically deleted when FME terminates (just before the shutdown script). You can e.g. use the ZipExtractor or the Unzipper from the FME Hub, should be pretty easy.
Thanks David, good tip, I didn't know TempPathnameCreator.

 

 


david_r
Evangelist
  • March 31, 2017
bruceharold wrote:
Thanks David, good tip, I didn't know TempPathnameCreator.

 

 

It's one of those hidden goodies!

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