<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Open part of CSV with filter in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Open-part-of-CSV-with-filter/m-p/254172#M49895</link>
    <description>&lt;P&gt;You can do it with an ODBC driver. It is complicated, and I'm not sure what kind of performance you can expect. The JSL first, then the complicated setup steps. I made big class.csv in the samples\import directory; the bigclass.txt did not work on my first try, probably because of the extension or not having commas. There might be a way to fix that in the connection string.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New SQL Query(
	Connection(
		"ODBC:DSN=CSV;DBQ=C:\SPACE\SAS\JMP\15\SAMPLES\IMPORT DATA;DefaultDir=C:\SPACE\SAS\JMP\15\SAMPLES\IMPORT DATA;DriverId=27;FIL=text;MaxBufferSize=2048;PageTimeout=5;"
	),
	QueryName( "Big Class.csv" ),
	Select(
		Column( "name", "t1" ),
		Column( "age", "t1" ),
		Column( "sex", "t1" ),
		Column( "height", "t1" ),
		Column( "weight", "t1" )
	),
	From( Table( "Big Class.csv", Alias( "t1" ) ) ),
	Where(
		Custom( "t1.age=15 and t1.height&amp;gt;50", UI( Custom( Base( "Continuous" ) ) ) )
	)
) &amp;lt;&amp;lt; Run&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You'll have to set up a DSN on your computer. You probably don't have the driver. Download and install.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture0.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22537iA3AD6EF4CD8C4309/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture0.png" alt="Capture0.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22538i9C1FC84D39D70587/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.png" alt="Capture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I found those by searching for the Microsoft Access ODBC CSV Driver&lt;/P&gt;&lt;P&gt;Install the 64 bit exe:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="This took a minute" style="width: 556px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22539iF50D4479536A2FAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="This took a minute" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;This took a minute&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Set it up. Type ODBC in the windows start menu to find the 64 bit admin tool.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.PNG" style="width: 613px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22541i708424D113D5D4F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture3.PNG" alt="Capture3.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture4.PNG" style="width: 668px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22543i298A03BE1C13E4A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture4.PNG" alt="Capture4.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture5.PNG" style="width: 639px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22542iE2BCFA5E95FE936C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture5.PNG" alt="Capture5.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture6.PNG" style="width: 611px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22540iA16BDDA151ABC9EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture6.PNG" alt="Capture6.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Use it in JMP. I stumbled about, some of the pictures may be less correct; the good stuff is at the end. File-&amp;gt;Database is the starting point.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture7.PNG" style="width: 795px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22545i25682038CEC8ED96/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture7.PNG" alt="Capture7.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture8.PNG" style="width: 514px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22544i4BFDA90DED826B73/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture8.PNG" alt="Capture8.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture9.png" style="width: 872px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22548i6B920D9A5A244418/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture9.png" alt="Capture9.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="capture10.png" style="width: 836px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22546i5C604BED0961AC8E/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture10.png" alt="capture10.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture11.PNG" style="width: 795px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22549i15484AAE6AC5439E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture11.PNG" alt="Capture11.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture12.PNG" style="width: 979px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22550i00A07EE30737E46A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture12.PNG" alt="Capture12.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture13.PNG" style="width: 791px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22551iF7E588E1415B43E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture13.PNG" alt="Capture13.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture14.PNG" style="width: 973px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22552iE7330E326E19C6D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture14.PNG" alt="Capture14.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think the file needs a CSV extension, but I didn't do enough experiments. With a CSV extension, and using commas, and NOT using quotation marks around numbers, it works. It looks like quotation marks will import strings, but there might be a way to fix that too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Mar 2020 13:05:49 GMT</pubDate>
    <dc:creator>Craige_Hales</dc:creator>
    <dc:date>2020-03-25T13:05:49Z</dc:date>
    <item>
      <title>Open part of CSV with filter</title>
      <link>https://community.jmp.com/t5/Discussions/Open-part-of-CSV-with-filter/m-p/254102#M49888</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What is the way to open a filtered part of CSV?&lt;/P&gt;&lt;P&gt;I have 300 Mb CSV but need only 10 Mb from it.&lt;/P&gt;&lt;P&gt;Please provide an example for Big Class.csv where height &amp;gt; 50 and Age = 15;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 06:09:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-part-of-CSV-with-filter/m-p/254102#M49888</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2020-03-25T06:09:00Z</dc:date>
    </item>
    <item>
      <title>Re: Open part of CSV with filter</title>
      <link>https://community.jmp.com/t5/Discussions/Open-part-of-CSV-with-filter/m-p/254126#M49891</link>
      <description>&lt;P&gt;I am not aware of any way to pass to the Excel Input Options a Where Clause.&amp;nbsp; Below is a script that effectively does that, but it first has to read in the entire data table&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open(
	&amp;lt;"Path to your.csv"&amp;gt;,
	columns(
		New Column( "name", Character, "Nominal" ),
		New Column( "age", Numeric, "Continuous", Format( "Best", 12 ) ),
		New Column( "sex", Character, "Nominal" ),
		New Column( "height", Numeric, "Continuous", Format( "Best", 12 ) ),
		New Column( "weight", Numeric, "Continuous", Format( "Best", 12 ) )
	),
	Import Settings(
		End Of Line( CRLF, CR, LF ),
		End Of Field( Comma, CSV( 1 ) ),
		Strip Quotes( 0 ),
		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( 1 ),
		Column Names Start( 1 ),
		Data Starts( 2 ),
		Lines To Read( "All" ),
		Year Rule( "20xx" )),
	invisible
);
dt &amp;lt;&amp;lt; select where(:height &amp;gt; 50 &amp;amp; :age == 15 );
dt2 = dt &amp;lt;&amp;lt; subset( selected rows(1), selected columns(0) );
close(dt, nosave);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 25 Mar 2020 09:31:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-part-of-CSV-with-filter/m-p/254126#M49891</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-03-25T09:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Open part of CSV with filter</title>
      <link>https://community.jmp.com/t5/Discussions/Open-part-of-CSV-with-filter/m-p/254172#M49895</link>
      <description>&lt;P&gt;You can do it with an ODBC driver. It is complicated, and I'm not sure what kind of performance you can expect. The JSL first, then the complicated setup steps. I made big class.csv in the samples\import directory; the bigclass.txt did not work on my first try, probably because of the extension or not having commas. There might be a way to fix that in the connection string.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New SQL Query(
	Connection(
		"ODBC:DSN=CSV;DBQ=C:\SPACE\SAS\JMP\15\SAMPLES\IMPORT DATA;DefaultDir=C:\SPACE\SAS\JMP\15\SAMPLES\IMPORT DATA;DriverId=27;FIL=text;MaxBufferSize=2048;PageTimeout=5;"
	),
	QueryName( "Big Class.csv" ),
	Select(
		Column( "name", "t1" ),
		Column( "age", "t1" ),
		Column( "sex", "t1" ),
		Column( "height", "t1" ),
		Column( "weight", "t1" )
	),
	From( Table( "Big Class.csv", Alias( "t1" ) ) ),
	Where(
		Custom( "t1.age=15 and t1.height&amp;gt;50", UI( Custom( Base( "Continuous" ) ) ) )
	)
) &amp;lt;&amp;lt; Run&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;You'll have to set up a DSN on your computer. You probably don't have the driver. Download and install.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture0.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22537iA3AD6EF4CD8C4309/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture0.png" alt="Capture0.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22538i9C1FC84D39D70587/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture1.png" alt="Capture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I found those by searching for the Microsoft Access ODBC CSV Driver&lt;/P&gt;&lt;P&gt;Install the 64 bit exe:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="This took a minute" style="width: 556px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22539iF50D4479536A2FAB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="This took a minute" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;This took a minute&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Set it up. Type ODBC in the windows start menu to find the 64 bit admin tool.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture3.PNG" style="width: 613px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22541i708424D113D5D4F2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture3.PNG" alt="Capture3.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture4.PNG" style="width: 668px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22543i298A03BE1C13E4A2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture4.PNG" alt="Capture4.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture5.PNG" style="width: 639px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22542iE2BCFA5E95FE936C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture5.PNG" alt="Capture5.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture6.PNG" style="width: 611px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22540iA16BDDA151ABC9EF/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture6.PNG" alt="Capture6.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Use it in JMP. I stumbled about, some of the pictures may be less correct; the good stuff is at the end. File-&amp;gt;Database is the starting point.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture7.PNG" style="width: 795px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22545i25682038CEC8ED96/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture7.PNG" alt="Capture7.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture8.PNG" style="width: 514px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22544i4BFDA90DED826B73/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture8.PNG" alt="Capture8.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture9.png" style="width: 872px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22548i6B920D9A5A244418/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture9.png" alt="Capture9.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="capture10.png" style="width: 836px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22546i5C604BED0961AC8E/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture10.png" alt="capture10.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture11.PNG" style="width: 795px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22549i15484AAE6AC5439E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture11.PNG" alt="Capture11.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture12.PNG" style="width: 979px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22550i00A07EE30737E46A/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture12.PNG" alt="Capture12.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture13.PNG" style="width: 791px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22551iF7E588E1415B43E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture13.PNG" alt="Capture13.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture14.PNG" style="width: 973px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/22552iE7330E326E19C6D4/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture14.PNG" alt="Capture14.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I think the file needs a CSV extension, but I didn't do enough experiments. With a CSV extension, and using commas, and NOT using quotation marks around numbers, it works. It looks like quotation marks will import strings, but there might be a way to fix that too.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Mar 2020 13:05:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-part-of-CSV-with-filter/m-p/254172#M49895</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-03-25T13:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Open part of CSV with filter</title>
      <link>https://community.jmp.com/t5/Discussions/Open-part-of-CSV-with-filter/m-p/254345#M49932</link>
      <description>Thank you very much!!!!</description>
      <pubDate>Thu, 26 Mar 2020 06:03:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Open-part-of-CSV-with-filter/m-p/254345#M49932</guid>
      <dc:creator>tom_abramov</dc:creator>
      <dc:date>2020-03-26T06:03:39Z</dc:date>
    </item>
  </channel>
</rss>

