cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
KST-CPT
Level II

Concatenate

I need to concatenate many comma delimmeted files without headers in them (so no column names) and maintain column order.  Is this possibble?  I have failed with Concatenate thus far.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Concatenate

Here is the input script that you can use to input the files with, and then once they are input, you can concatenate them all together, and JMP will match the column names.

Open(
	"<Place the path to the data table in here>",
	columns(
		New Column( "FileName", Character, "Nominal" ),
		New Column( "Date",
			Numeric,
			"Continuous",
			Format( "m/d/y", 10 ),
			Input Format( "m/d/y" )
		),
		New Column( "Time",
			Numeric,
			"Continuous",
			Format( "h:m:s", 11, 0 ),
			Input Format( "h:m:s", 0 )
		),
		New Column( "Machine", Character, "Nominal" ),
		New Column( "ID", Numeric, "Continuous", Format( "Best", 12 ) ),
		New Column( "Row", Numeric, "Continuous", Format( "Best", 12 ) ),
		New Column( "SN", Character, "Nominal" )
	),
	Import Settings(
		End Of Line( CRLF, CR, LF ),
		End Of Field( Comma, CSV( 0 ) ),
		Strip Quotes( 1 ),
		Use Apostrophe as Quotation Mark( 0 ),
		Use Regional Settings( 0 ),
		Scan Whole File( 1 ),
		Treat empty columns as numeric( 0 ),
		CompressNumericColumns( 0 ),
		CompressCharacterColumns( 0 ),
		CompressAllowListCheck( 0 ),
		Labels( 0 ),
		Column Names Start( 1 ),
		Data Starts( 1 ),
		Lines To Read( "All" ),
		Year Rule( "20xx" )
	)
)
Jim

View solution in original post

4 REPLIES 4
uday_guntupalli
Level VIII

Re: Concatenate

@KST-CPT
            Yes. It is possible. I would suggest you provide some sample files, so we could show you how to build a script that matches your needs. 

 

Best
Uday
KST-CPT
Level II

Re: Concatenate

Unfortunately I cannot provide any actual files.  However, I just created these 2 sample files that are the same format and a sample header file.  I know the column names, hence the header file, however, the files do not contain headers.  I have many many files and dozens of new ones are created daily.  I want to concatenate the files, maintaining column order and continuously appending the daily.

txnelson
Super User

Re: Concatenate

Here is the input script that you can use to input the files with, and then once they are input, you can concatenate them all together, and JMP will match the column names.

Open(
	"<Place the path to the data table in here>",
	columns(
		New Column( "FileName", Character, "Nominal" ),
		New Column( "Date",
			Numeric,
			"Continuous",
			Format( "m/d/y", 10 ),
			Input Format( "m/d/y" )
		),
		New Column( "Time",
			Numeric,
			"Continuous",
			Format( "h:m:s", 11, 0 ),
			Input Format( "h:m:s", 0 )
		),
		New Column( "Machine", Character, "Nominal" ),
		New Column( "ID", Numeric, "Continuous", Format( "Best", 12 ) ),
		New Column( "Row", Numeric, "Continuous", Format( "Best", 12 ) ),
		New Column( "SN", Character, "Nominal" )
	),
	Import Settings(
		End Of Line( CRLF, CR, LF ),
		End Of Field( Comma, CSV( 0 ) ),
		Strip Quotes( 1 ),
		Use Apostrophe as Quotation Mark( 0 ),
		Use Regional Settings( 0 ),
		Scan Whole File( 1 ),
		Treat empty columns as numeric( 0 ),
		CompressNumericColumns( 0 ),
		CompressCharacterColumns( 0 ),
		CompressAllowListCheck( 0 ),
		Labels( 0 ),
		Column Names Start( 1 ),
		Data Starts( 1 ),
		Lines To Read( "All" ),
		Year Rule( "20xx" )
	)
)
Jim
KST-CPT
Level II

Re: Concatenate

Awesome,  I was renaming my columns after import.  You have the column names and formatting done during import, much easier, Thanks.  I was having trouble with changing the formats as well, this solved that problem too.  2 for 1 deal =).