--- title: "Import Definitions" slug: "import-definitions" updated: 2023-11-06T15:02:22Z published: 2023-11-06T15:02:22Z canonical: "docs.datajet.app/import-definitions" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # Import Definitions Import Definitions provides access to a project's history - this is an automatic record of all permanent changes that have been made to the project's data, including: - reports - templates - datasets - dataset collections - tables - fields - configuration settings {TODO: Video Project History} ## Starting a new Project History Project history recording begins automatically when a project is created, and records actions regardless of how they are executed. Project history records actions from: - Run-time scripts - Stored scripts - Interactions with the User Interface - Remote Execution (See [Introduction to Scripting](/v1/docs/introduction-to-scripting) for more details on different types of script execution.) Drop ProjectThe only action not recorded in the project history is the "Drop Project" command.   Drop Project causes the existing history to be stored in the [history archive](/v1/docs/import-definitions#viewing-history-for-dropped-or-archived-projects), and a new project history to begin.Execution HistoryTo see a record of execution history (i.e., individual script editor runs, or history from a particular script, stored script or project) see one of the following: - [Execution History](/v1/docs/execution-history-1) - [Local History](/v1/docs/local-history) - [History](/v1/docs/history) - [Management Console](/v1/docs/execution-history) ## Accessing Project History Project history is accessed via **Script Editor | File | Import Definitions**. This will open the Import Definitions dialog. By default the history for the **current project** (i.e., the project name in the **Project Box**) will be displayed. If the project box is empty, no history file will be selected when the Import Definitions dialog opens. To view the history file, first select a project. Current Project and Open ProjectThere is an important difference between "**The Current Project**" and "**The Open Project**". "The Current Project" is the project name displayed in the **Project Box** and is the target of scripting methods: ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1699131214876.png) This may be different to the Open Project, which is the **project currently open in the Project Explorer**: ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1699131339391.png) TIP: To set the Open Project as the Current Project, right-click in the Project Box and choose "Select Current" ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1699132574803.png) Select a method to see the detailed JSON of the executed method. Failed MethodsThe Project History **only** records methods that were successfully executed and **resulted in a change to the project data**.  If a method failed to execute, it will be recorded in the **Execution History** or **History** but not in the project history. ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1699130601299.png) ## Importing Definitions A common use-case for the Project History is to add executed methods to a new or existing script. This allows the analyst to follow their train of thought whilst exploring data and later add to script any actions that are necessary to keep or reproduce. Techniques for building scripts:There are many other techniques for building scripts, including: - Script Recording - Copy and Paste from Execution History - Dropping existing objects from the Project Explorer onto the open script - Adding Scripting methods from Script Editor | Methods menu - Copy and Paste from Supplementary Viewer {TODO: Video Techniques for building scripts} ### Selecting and Deselecting Methods {TODO: Video selecting and deselecting) #### Select Multiple options are available for helping with the selection of methods: - All - selects: all methods in the current history - Reports - selects: SaveReport, Save Standardized Report (AddToCollection) - Datasets - selects: SaveDataSetCollection, SaveDataSet - Existing Entries - selects: methods that exist in the currently open script #### Deselect - All - Deselects all methods - Deletes - deselects: DeleteField, DeleteFields, DeleteTable - Superseded Entries - if the same method-name pair exists more than once in the script, all but the last instance of the method-name pair will be deselected - Existing Entries - deselects any method-name entries that are in the currently opened script ## Viewing History for different, dropped and archived projects Project History is accessible for all projects on the active realm (including those that have been dropped) ### Open Project To view project history for the open project (the project visible in the Project Explorer) do one of the following: - **Set Current Project in Scrip Editor:** 1. In Script Editor, set the Current Project to be the Open Project by right-clicking in the Project Box and choosing Select Current 2. Choose File | Import Definitions - **Select Project in "Select Project" drop down** 1. Select desired project from the Script Editor | File | Import Definitions | Select Project combo box ### Current Project To view project history for the current project (the project name in the Project Box) do the following: - Choose File | Import Definitions ### Dropped or archived projects Whenever a "DropProject" method is executed, the current history for that project is moved into the project history archive. To access archived history (i.e. history for projects or version of projects that no longer exist), use the archive dropdown: ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/image-1699282848328.png) ## Saving History Files To save a project history to file, use the **File | Save Selected** option.