Skip to main content
Solved

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

  • March 30, 2017
  • 6 replies
  • 43 views

bruceharold
Supporter
Forum|alt.badge.img+19

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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+18
  • Supporter
  • March 30, 2017

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
Supporter
Forum|alt.badge.img+19
  • Author
  • Supporter
  • 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
Celebrity
  • March 31, 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 :-)

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
Supporter
Forum|alt.badge.img+19
  • Author
  • Supporter
  • March 31, 2017
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
Celebrity
  • March 31, 2017
Thanks David, good tip, I didn't know TempPathnameCreator.

 

 

It's one of those hidden goodies!