<?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: downloading large columns database from database via odbc in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341770#M59075</link>
    <description>Yep.  Using the exact same connection string.</description>
    <pubDate>Mon, 14 Dec 2020 23:06:56 GMT</pubDate>
    <dc:creator>vince_faller</dc:creator>
    <dc:date>2020-12-14T23:06:56Z</dc:date>
    <item>
      <title>downloading large columns from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/337111#M58452</link>
      <description>&lt;P&gt;I'm have a sql column that is varbinary(MAX).&amp;nbsp; It seems that the column width for JMP is 65536, so I can't download the whole column. It doesn't seem to be an ODBC only issue.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Currently I'm doing these one at a time by just grabbing substrings until they're all empty and concatting into an array.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This takes FOREVER.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does anyone have any suggestions for ways to optimize this?&amp;nbsp; I'm trying to avoid using python/sqlcmd/etc. to grab the blobs directly (avoiding JMP).&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 21:59:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/337111#M58452</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2023-06-09T21:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns database from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/337132#M58454</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2610"&gt;@vince_faller&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It seems that the column width for JMP is 65536, so I can't download the whole column.&amp;nbsp;&lt;SPAN&gt;It doesn't seem to be an ODBC only issue.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't have any immediate thoughts on your actual inquiry, but I do want to clarify the statement above. The max width for a character column in JMP is MUCH larger than 65536.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Table( "untitled 15",
	Add Rows( 1 ),
	New Column( "repeat",
		Character,
		"Nominal",
		Formula( Repeat( "a", 128000000 ) ),
	),
	New Column( "length",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( Length( :repeat ) ),
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm sure this detail isn't relevant to solving your speed/query problem and I may have misunderstood what you meant by &lt;EM&gt;column width&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 17:38:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/337132#M58454</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2020-11-24T17:38:29Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns database from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/337136#M58458</link>
      <description>&lt;P&gt;VERY relevant.&amp;nbsp; My bad.&amp;nbsp; Something weird is going on then.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6878"&gt;@Jeff_Perkinson&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Nov 2020 17:58:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/337136#M58458</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2020-11-24T17:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns database from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341617#M59057</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6878"&gt;@Jeff_Perkinson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking more into this I can't explain this behavior.&amp;nbsp; I'm able to get values from the exact same table and connection string through python.&amp;nbsp; For whatever reason JMP blanks out the column as soon as it hits 65537.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
driver = "ODBC Driver 17 for SQL Server"; // using SQL Server
server = "localhost";
database = "Test";
username = "sa";
password = "REDACTED";

cxn_string = "DRIVER="||driver||";SERVER="||server||";UID="||username||";PWD="||
	password||";Database="||database;

cxn = create database connection(cxn_string);
executesql(cxn, 
	"
	CREATE TABLE [dbo].[LargeChar](
		[LargeCharID] [bigint] IDENTITY(1,1) NOT NULL,
		[SomeBigChar] [varchar](MAX) NOT NULL,
	 CONSTRAINT [PK_Blob] PRIMARY KEY CLUSTERED 
	(
		[LargeCharID] ASC
	)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
	) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
	"
);

executeSQL(cxn, 
	"INSERT INTO [LargeChar]
	VALUES('"||REPEAT("A", 100000)||"')"
);

dt_download = executeSQL(cxn, 
	"SELECT SomeBigChar
	, SubString(Convert(VARCHAR(MAX), SomeBigChar), 1, 65536) AS Char65536 -- this works
	, SubString(Convert(VARCHAR(MAX), SomeBigChar), 1, 65537) AS Char65537 -- this doesn't
	FROM [LargeChar]", 
	"This should work?"
);
show(length(dt_download:SomeBigChar[1]), // full text doesn't show
	length(dt_download:Char65536[1]), // text that is only 65536 shows
	length(dt_download:Char65537[1]) // text that is one higher? nope
);

//execute SQL(cxn, "DROP TABLE [LargeChar]");
close database connection(cxn);

//Python script returns
/*
0    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
Name: SomeBigChar, dtype: object
0    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
Name: Char65536, dtype: object
0    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...
Name: Char65537, dtype: object
*/
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there something that I'm missing?&amp;nbsp; Or maybe underneath python is adding some functionality.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;*EDIT* sorry for so many edits.&amp;nbsp; Hope you don't get an email for each one.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 18:26:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341617#M59057</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2020-12-14T18:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns database from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341658#M59062</link>
      <description>&lt;P&gt;This gets beyond my ability to test to understand what's happening.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3022"&gt;@briancorcoran&lt;/a&gt;?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 19:34:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341658#M59062</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2020-12-14T19:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns database from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341681#M59063</link>
      <description>&lt;P&gt;Can you try using:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Preferences( ODBC Disable Block Fetch( 1 ) );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Sometimes the ODBC Driver doesn't report the length of the column.&lt;/P&gt;
&lt;P&gt;SQL Server is one of the drivers that supports block fetch (which is much more efficient than a row at a time), but if the length of the column isn't reported by the driver, the default value of 65536 is used.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 20:21:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341681#M59063</guid>
      <dc:creator>bryan_boone</dc:creator>
      <dc:date>2020-12-14T20:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns database from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341682#M59064</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2610"&gt;@vince_faller&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Are you using the same ODBC driver for Python and JMP?&lt;/P&gt;
&lt;P&gt;Stan&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 20:21:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341682#M59064</guid>
      <dc:creator>stan_koprowski</dc:creator>
      <dc:date>2020-12-14T20:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns database from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341769#M59074</link>
      <description>&lt;P&gt;Ah, okay. so since I'm using VARCHAR(MAX), maybe there is no column length?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, even with the block fetch off it doesn't work.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Dec 2020 23:06:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341769#M59074</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2020-12-14T23:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns database from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341770#M59075</link>
      <description>Yep.  Using the exact same connection string.</description>
      <pubDate>Mon, 14 Dec 2020 23:06:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/341770#M59075</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2020-12-14T23:06:56Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/348734#M59972</link>
      <description>&lt;P&gt;Per&amp;nbsp;&lt;A class="trigger-hovercard" href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5036" target="_blank" rel="noopener"&gt;bryan_boone&lt;/A&gt;&amp;nbsp;the behavior is due to these drivers not retuning the column length. Subsequently, JMP sets a default lenght of &lt;SPAN class="csF53863FF"&gt;65536&lt;/SPAN&gt;&amp;nbsp;when this data is not provided.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've added a new feature request to have this value increase since JMP can handle this data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In the interim, using SQL Server (native) seems to work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 20:12:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/348734#M59972</guid>
      <dc:creator>Dahlia_Watkins</dc:creator>
      <dc:date>2023-01-09T20:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/348807#M59978</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/7749"&gt;@Dahlia_Watkins&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Anyone in internet land know if there's a way to force the size to be given from the transact?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My current implementation is abysmally slow (Subscripting in groups of 65536 and concatting together until the longest one has been taken care of) and I'm not allowed to change the driver; so I'm in a bit of a pickle.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 21:39:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/348807#M59978</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2021-01-14T21:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/453096#M69993</link>
      <description>&lt;P&gt;Hey again&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/7749"&gt;@Dahlia_Watkins&lt;/a&gt;&amp;nbsp;, any news if that feature request has gotten any traction?&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jan 2022 18:33:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/453096#M69993</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2022-01-21T18:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/454839#M70130</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2610"&gt;@vince_faller&lt;/a&gt;.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This issue should have been addressed in JMP 16.1. Please email support if you have tested this in 16.1 and still see the same behavior.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 18:06:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/454839#M70130</guid>
      <dc:creator>Dahlia_Watkins</dc:creator>
      <dc:date>2022-01-26T18:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/454856#M70134</link>
      <description>&lt;P&gt;Ope, my bad.&amp;nbsp; Will do. Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jan 2022 18:33:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/454856#M70134</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2022-01-26T18:33:10Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/587071#M79259</link>
      <description>&lt;P&gt;&amp;nbsp;Just a note that this limitation &lt;EM&gt;does&lt;/EM&gt; seem to have been removed in JMP16.1.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 17:09:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/587071#M79259</guid>
      <dc:creator>hardner</dc:creator>
      <dc:date>2023-01-05T17:09:31Z</dc:date>
    </item>
    <item>
      <title>Re: downloading large columns from database via odbc</title>
      <link>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/587115#M79260</link>
      <description>&lt;P&gt;Yep yep.&amp;nbsp; Much appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jan 2023 19:38:58 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/downloading-large-columns-from-database-via-odbc/m-p/587115#M79260</guid>
      <dc:creator>vince_faller</dc:creator>
      <dc:date>2023-01-05T19:38:58Z</dc:date>
    </item>
  </channel>
</rss>

