For the latest version of JMP Help, visit JMP.com/help.


Using JMP > Reshape Your Data > Query and Join Data Tables with JMP Query Builder > About Links to Data Tables in JMP Queries
Publication date: 06/21/2023

About Links to Data Tables in JMP Queries

When you query JMP data tables, the resulting data table contains scripts for rerunning the query, updating the data, and editing the query. Data tables in these scripts have absolute paths. For example, the following portion of these scripts defines where two JMP sample data tables are stored.

JMP Tables(
		["SAT" => "C:\Program Files\SAS\JMPPRO\17\Samples\Data\SAT.jmp",
		"SATByYear" => "C:\Program Files\SAS\JMPPRO\17\Samples\Data\SATByYear.jmp"]
	),

However, when you save a query as a .jmpquery file, the file contains relative paths to the original data tables if it is possible to create them. The following example shows data tables that are stored in the FuelData subfolder that is relative to the .jmpquery file.

JMP Tables( ["Cars" => "FuelData\Cars.jmp",
	"Trains" => "FuelData\Trains.jmp"] )

In the .jmpquery file, if a relative path cannot be created, an absolute path is used with path variable substitutions if possible. When you run the query, you are prompted to select the data table if the table cannot be found. JMP then detects whether other missing data tables in the query are in the selected folder.

You can also use path variables to locate the data tables. For example, you might write a script that selects a data table in the $DOCUMENTS folder. Or you can define a path variable in a JSL script and then run a query from the script. See Path Variables in the Scripting Guide for more information about path variables.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).