Contents
When to delete data from the in memory workspace?
When using the in_memory workspace, you may want to delete any intermediate data as soon as possible to free up system memory. The Delete tool can be used to delete data in the in_memory workspace. Individual datasets can be deleted, or the entire workspace can be deleted to clear all the workspace contents.
Can you use in memory workspace in Python?
You can use the in_memory workspace in Python as well, as shown in the code sample below. The in_memory workspace is only valid for geoprocessing tools; it is not a general-purpose virtual directory when you can write any data.
Can a folder be created in an in memory workspace?
Feature datasets or folders cannot be created in the in-memory workspace. When data is written to the in-memory workspace, the computer’s physical memory (RAM) is consumed. If too much data is written to this workspace, all the computer’s memory may be used up and additional data cannot be written to memory.
Is the workspace database unloaded from memory in Visual Studio?
A workspace database includes model metadata and imported data. In some cases, the workspace database can be very large and consume a large amount of memory. By default, when you close a model project in Visual Studio, the workspace database is unloaded from memory.
How is scratch workspace used in ModelBuilder?
The Scratch Workspace environment is used primarily by ModelBuilder as a location to write intermediate and output data. This environment can be set by you (or the user of your tool) to any location—a folder, a geodatabase, or even a feature dataset within a geodatabase.
When do you delete scratch data in ModelBuilder?
In ModelBuilder, scratch data is known as intermediate data. Data that is marked as intermediate in ModelBuilder is automatically deleted after your model tool is run. In scripts, however, you are responsible for deleting scratch data within your script.