Subscribe Bookmark RSS Feed

Column Information

SamruddhiB

New Contributor

Joined:

May 9, 2017

How to get column information for all columns in a table together at one place. Need to get column information for 8 tables with 250+ columns each.

2 ACCEPTED SOLUTIONS

Accepted Solutions
SamruddhiB

New Contributor

Joined:

May 9, 2017

Solution

Thank you for this solution!

Is there a way in the columns viewer to get the column attributes like 'Data Type' and 'Modeling Type'? 

Justin_Chilton

Joined:

Aug 27, 2015

Solution

I published a JMP add-in earlier today that does what you are looking for. Check it out here.

Justin
7 REPLIES
ian_jmp

Staff

Joined:

Jun 23, 2011

I suppose it depends on what you consider informative, and how, exactly, you want this information displayed.

 

But if you want everything about a columns in a table, apart from the data they contain, you ciuld make a copy of the table, delete all the rows, then do 'Copy Table Script' from the triangle menu of the table. Then paste the results into a new script window to inspect the result. For eight tables, you could do this with JSL, and also post-process, reformat and display the results how you want.

Jeff_Perkinson

Community Manager

Joined:

Jun 23, 2011

We could use some more details about what column information your looking for and how you'll use it but perhaps another option is Cols -> Columns Viewer.

 

JMPScreenSnapz094.png

-Jeff
SamruddhiB

New Contributor

Joined:

May 9, 2017

Solution

Thank you for this solution!

Is there a way in the columns viewer to get the column attributes like 'Data Type' and 'Modeling Type'? 

ian_jmp

Staff

Joined:

Jun 23, 2011

If you want this information you could get it this way:

NamesDefaultToHere(1);

// Define a function: Given a table reference, makes a window with the required information
dataAndModelingType = 
Function({dat}, {Default Local},
	cols = dt << getColumnNames("String");
	na = {};
	dt = {};
	mt = {};
	for(c=1, c<=NItems(cols), c++,
		InsertInto(na, Column(dat, cols[c]) << getName);
		InsertInto(dt, Column(dat, cols[c]) << getDataType);
		InsertInto(mt, Column(dat, cols[c]) << getModelingType);
	);
	NewWindow("Data and Modeling Types in "||(dat << getName),
		PanelBox("Column Info",
			TableBox(
				StringColBox("Column Name", na),
				StringColBox("Data Type", dt),
				StringColBox("Modeling Type", mt)
				);
			);
		);
	);

// Try it out
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
dataAndModelingType(dt);

This could probably be appended to the 'Column Info' dialog but would be more work.

 

So, as I said, the answer does depend on what information you want, how you want it displayed and (possibly) what you want to use it for next.

Justin_Chilton

Joined:

Aug 27, 2015

Solution

I published a JMP add-in earlier today that does what you are looking for. Check it out here.

Justin
SamruddhiB

New Contributor

Joined:

May 9, 2017

Tons of thank you for this solution!

Just wondering if we change the attribute table and save it, then can we apply the changes directly to the data table in JMP itself?

Justin_Chilton

Joined:

Aug 27, 2015

I do have plans to add a feature like that at some point in the future. I will let you know when it is updated.

Justin