<?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 How can I set a Hive property when using regular Proc SQL? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684077#M207267</link>
    <description>&lt;P&gt;I want to set a Hive property as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;	EXECUTE(set	hive.resultset.use.unique.column.names		=	FALSE) 						BY	&amp;amp;Conn;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above command works fine in explicit pass through SQL, like so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC	SQL;
	CONNECT	TO	&amp;amp;SAS_Eng	AS	&amp;amp;Conn	(&amp;amp;Connect);

	EXECUTE(set	hive.resultset.use.unique.column.names		=	FALSE) 						BY	&amp;amp;Conn;

	EXECUTE(set	hive.execution.engine						=	&amp;amp;Engine) 					BY	&amp;amp;Conn;

	EXECUTE(set	mapred.job.name								=	&amp;amp;Type._Members_Direct)		BY	&amp;amp;Conn;

	CREATE	TABLE	WORK.Members							AS
		SELECT	*	
			FROM	CONNECTION	TO	&amp;amp;Conn					(
				SELECT	*
					FROM	&amp;amp;Schema..ALL_MEMBERS
						);

	DISCONNECT	FROM	&amp;amp;Conn;
QUIT;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, a lot of our analysts don't want to code all the details of explicit pass through code for every little query.&amp;nbsp; They just want to use regular Proc SQL.&amp;nbsp; Normally, I'd code a PROPERTIES= option on a Libname using the Hadoop engine, but on this particular machine, &lt;EM&gt;we only have ODBC &lt;/EM&gt;licensed.&amp;nbsp; When I try to code a PROPERTIES= on the Libname with an ODBC engine, I get:&lt;/P&gt;
&lt;PRE&gt;ERROR 22-7: Invalid option name PROPERTIES.&lt;/PRE&gt;
&lt;P&gt;Apparently, PROPERTIES is not a valid option when using the ODBC engine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone &lt;STRONG&gt;tell me how to set a Hive property with regular Proc SQL&lt;/STRONG&gt; when only the ODBC engine is available?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&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>Tue, 15 Sep 2020 23:44:45 GMT</pubDate>
    <dc:creator>jimbarbour</dc:creator>
    <dc:date>2020-09-15T23:44:45Z</dc:date>
    <item>
      <title>How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684077#M207267</link>
      <description>&lt;P&gt;I want to set a Hive property as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;	EXECUTE(set	hive.resultset.use.unique.column.names		=	FALSE) 						BY	&amp;amp;Conn;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The above command works fine in explicit pass through SQL, like so:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC	SQL;
	CONNECT	TO	&amp;amp;SAS_Eng	AS	&amp;amp;Conn	(&amp;amp;Connect);

	EXECUTE(set	hive.resultset.use.unique.column.names		=	FALSE) 						BY	&amp;amp;Conn;

	EXECUTE(set	hive.execution.engine						=	&amp;amp;Engine) 					BY	&amp;amp;Conn;

	EXECUTE(set	mapred.job.name								=	&amp;amp;Type._Members_Direct)		BY	&amp;amp;Conn;

	CREATE	TABLE	WORK.Members							AS
		SELECT	*	
			FROM	CONNECTION	TO	&amp;amp;Conn					(
				SELECT	*
					FROM	&amp;amp;Schema..ALL_MEMBERS
						);

	DISCONNECT	FROM	&amp;amp;Conn;
QUIT;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, a lot of our analysts don't want to code all the details of explicit pass through code for every little query.&amp;nbsp; They just want to use regular Proc SQL.&amp;nbsp; Normally, I'd code a PROPERTIES= option on a Libname using the Hadoop engine, but on this particular machine, &lt;EM&gt;we only have ODBC &lt;/EM&gt;licensed.&amp;nbsp; When I try to code a PROPERTIES= on the Libname with an ODBC engine, I get:&lt;/P&gt;
&lt;PRE&gt;ERROR 22-7: Invalid option name PROPERTIES.&lt;/PRE&gt;
&lt;P&gt;Apparently, PROPERTIES is not a valid option when using the ODBC engine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can anyone &lt;STRONG&gt;tell me how to set a Hive property with regular Proc SQL&lt;/STRONG&gt; when only the ODBC engine is available?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&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>Tue, 15 Sep 2020 23:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684077#M207267</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-09-15T23:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684078#M207268</link>
      <description>&lt;P&gt;Why not call&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;proc sql;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;amp;sql_hadoop_header;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; create table ...&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;quit;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 00:20:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684078#M207268</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-09-16T00:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684079#M207269</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, would &amp;amp;SQL_Hadoop_Header resolve to something like the following?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;	CONNECT	TO	&amp;amp;SAS_Eng	AS	&amp;amp;Conn	(&amp;amp;Connect);

	EXECUTE(set	hive.resultset.use.unique.column.names		=	FALSE) 						BY	&amp;amp;Conn;

	EXECUTE(set	hive.execution.engine						=	&amp;amp;Engine) 					BY	&amp;amp;Conn;

	EXECUTE(set	mapred.job.name								=	&amp;amp;Type._Members_Direct)		BY	&amp;amp;Conn;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;That's certainly workable, but then all queries have to be coded in HQL instead of SAS SQL.&amp;nbsp; One advantage of using just regular Proc SQL is that our analysts can code in a syntax that they're already familiar with and can use SAS functions (e.g. date functions, string functions, etc.) instead of having to learn the Hadoop/Hive equivalents.&amp;nbsp; It may be necessary to go that route if we want to set the&amp;nbsp;hive.resultset.use.unique.column.names, but we'd rather not if there's another way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm a bit frustrated.&amp;nbsp; It's such a simple thing, and I know of two different ways to do it, unfortunately, neither of which works in this instance.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 00:28:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684079#M207269</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-09-16T00:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684083#M207272</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;all queries have to be coded in HQL instead of SAS SQL&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Not necessarily, you can have SAS code and/or native code. And you could have parameters too.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc sql;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; %SQL_Hadoop_Header(connection=&amp;amp;conxn, options=nouniquename);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; select datepart(DATE) from connection to&amp;nbsp;&amp;amp;conxn (&amp;nbsp; &amp;nbsp;hql...&amp;nbsp; );&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 01:21:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684083#M207272</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-09-16T01:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684090#M207275</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Oh, dear.&amp;nbsp; I think you lost me there.&amp;nbsp; Are you saying that in one instance of Proc SQL I could have a mix of explicit pass through code AND also SAS SQL?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I execute explicit pass through code and set the&amp;nbsp;hive.resultset.use.unique.column.names, that's all well and fine, but as long as the connection is open, doesn't all code have to be HQL or Hive commands?&amp;nbsp; If I try to execute SAS SQL, I'll get syntax errors, won't I?&amp;nbsp; Now, I could disconnect first, but won't my setting for&amp;nbsp;hive.resultset.use.unique.column.names disappear as soon as I disconnect?&amp;nbsp; Or will the setting persist so long as I don't issue a QUIT in Proc SQL?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suppose I should try it.&amp;nbsp; Back in a bit...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 02:01:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684090#M207275</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-09-16T02:01:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684098#M207278</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt; Are you saying that in one instance of Proc SQL I could have a mix of explicit pass through code AND also SAS SQL?&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Yes.&lt;/P&gt;
&lt;P&gt;All the SQL that includes&amp;nbsp; &lt;FONT face="courier new,courier"&gt;&amp;nbsp;select .. &lt;STRONG&gt;from connection&lt;/STRONG&gt; &lt;STRONG&gt;to&lt;/STRONG&gt; xxx ()&amp;nbsp;&lt;/FONT&gt; &amp;nbsp;will be sent to Hive, but all the regular SQL such as&lt;FONT face="courier new,courier"&gt; select * from SASHELP.CLASS&amp;nbsp;&amp;nbsp;&lt;/FONT&gt; will stay in SAS, even if a connection is open.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can even open several connections in the same proc sql step.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 02:33:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684098#M207278</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-09-16T02:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684112#M207279</link>
      <description>&lt;P&gt;Well, right, that makes sense, but will the properties I set in a connection apply to a query run using SAS SQL?&amp;nbsp; I'm working on it, and it runs, but it doesn't seem that a setting applied via a connection carries over to a SAS SQL query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 03:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684112#M207279</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-09-16T03:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684120#M207283</link>
      <description>&lt;P&gt;There's some larger issue going on here.&amp;nbsp; Even with explicit pass through code, I can no longer shut off the table name from being prefixed to the column name.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the results from some explicit pass through code.&amp;nbsp; The first display is just whatever the value is after I make the connection (i.e. the default value).&amp;nbsp; Note that it is "true".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then, I execute a SET statement and thereafter display the value.&amp;nbsp; Note that the value is now "false".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Lastly, I execute a query -- but the column names still include the table name.&amp;nbsp; The&amp;nbsp;hive.resultset.use.unique.column.names parameter has no apparent effect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Hive_TableName.ColumnName_2020-09-15_21-39-09.jpg" style="width: 390px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/49407iF84E721B3552DE17/image-size/large?v=v2&amp;amp;px=999" role="button" title="Hive_TableName.ColumnName_2020-09-15_21-39-09.jpg" alt="Hive_TableName.ColumnName_2020-09-15_21-39-09.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 04:50:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684120#M207283</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-09-16T04:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684397#M207392</link>
      <description>&lt;P&gt;&amp;gt;&amp;nbsp;&lt;EM&gt;&lt;SPAN&gt;Well, right, that makes sense, but will the properties I set in a connection apply to a query run using SAS SQL?&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I don't know, though it &lt;STRONG&gt;looks like&lt;/STRONG&gt; it from your last post. SAS Tech Support should know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;Then, I execute a SET statement and thereafter display the value.&amp;nbsp; Note that the value is now "false".&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;I don't know this option. Ask the Hadoop admins to have a look? Or on a web forum for the ODBC driver (Impala?)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2020 22:01:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684397#M207392</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-09-16T22:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684450#M207416</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'll have to ask SAS tech support about the settings in a direct connection being applicable to regular Proc SQL code run in the same Proc SQL session.&amp;nbsp; I suspect they don't apply.&amp;nbsp; In this case, I switched everything to explicit pass through code because I didn't know how to set&amp;nbsp;hive.resultset.use.unique.column.names any other way.&amp;nbsp; The odd thing of it is that even though I set the value to 'false', the table names are still prefixed to the column names.&amp;nbsp;&amp;nbsp;Setting the parameter manually in my query just isn't working.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think the corrective action has to be a change to the Hive XML as described in this SAS usage note:&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;&lt;A tabindex="-1" title="https://support.sas.com/kb/53/568.html" href="https://support.sas.com/kb/53/568.html" target="_blank" rel="noreferrer noopener"&gt;https://support.sas.com/kb/53/568.html&lt;/A&gt;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;That's a great idea to check on an ODBC forum.&amp;nbsp; I'm not sure how many people are connecting to Hadoop via ODBC (usually it's JDBC), but perhaps there is such a forum.&amp;nbsp; I won't know until I look.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Chiefly though, I &lt;FONT size="4" color="#FF0000"&gt;&lt;STRONG&gt;thank you&lt;/STRONG&gt;&lt;/FONT&gt; for pointing out that explicit pass through code (indeed, with multiple connections) can exist alongside regular SAS SQL in a single Proc SQL session.&amp;nbsp; I was artificially constraining myself without realizing it.&amp;nbsp; I had a "blinding flash of the obvious" when you pointed out the "box" I was putting myself into.&amp;nbsp; Many thanks.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Jim&lt;/DIV&gt;</description>
      <pubDate>Thu, 17 Sep 2020 01:18:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684450#M207416</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-09-17T01:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684491#M207428</link>
      <description>&lt;P&gt;No worries, glad I could help. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I suspect each execute/select statement runs in its own environment, even though it is the same connection.&lt;/P&gt;
&lt;P&gt;The UNote does not state where that XML file sits. On the client PC or on the Hadoop server?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Sep 2020 22:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684491#M207428</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-09-17T22:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684883#M207636</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The XML file is on the server side.&amp;nbsp; It controls the behavior of Hadoop and isn't specifically related to SAS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've been talking with our platform support folks, but we can't figure out why, when I set the parameter correctly to false, the table names are still being prefixed to the column names.&amp;nbsp; When our support folks use command line Hive commands, it works fine.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As a work around at least for now, I wrote a macro that removes the table names from the column names after the Hive query completes.&amp;nbsp; A bit of a kludge, but I prefer not to use 'non_V7_SAS_name'n type column names.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code below if it were of interest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;&amp;amp;Null	%MACRO	Remove_Table_From_Column(Lib, Table, Order=VARNUM, Debug=NO);
	%LOCAL	Cmnt;
	%LOCAL	NoPrint;
	%LOCAL	Vars;

	%IF	%QUPCASE(&amp;amp;Debug)	=	YES	%THEN
		%DO;
			%LET	Cmnt	=	;
			%LET	NoPrint	=	;
			%PUT	&amp;amp;Nte1  Debug is on in macro &amp;amp;SysMacroName;
		%END;
	%ELSE
		%DO;
			%LET	Cmnt	=	*;
			%LET	NoPrint	=	NOPRINT;
		%END;

	%&amp;amp;Cmnt.TITLE(BEFORE - Contents of &amp;amp;Lib..&amp;amp;Table);
	PROC	CONTENTS	DATA=&amp;amp;Lib..&amp;amp;Table
						OUT	=WORK.&amp;amp;Table.V
						&amp;amp;Order
						&amp;amp;NoPrint
						;
	RUN;

	PROC	SQL	NOPRINT;
		SELECT	CATS("'", Name, "'n=",SCAN(SUBSTR(Name, INDEXC(Name, '.')), 1))
			INTO	:	Vars	SEPARATED BY ' '
			FROM	WORK.&amp;amp;Table.V
			;
	QUIT;

	%&amp;amp;Cmnt.PUT	&amp;amp;Nte1  &amp;amp;=Vars;

	PROC	DATASETS	LIBRARY=&amp;amp;Lib	NOLIST;
		MODIFY	&amp;amp;Table;
			RENAME	
				&amp;amp;Vars
				;
	QUIT;

	%&amp;amp;Cmnt.TITLE(AFTER - Contents of &amp;amp;Lib..&amp;amp;Table);
	PROC	CONTENTS	DATA=&amp;amp;Lib..&amp;amp;Table
						OUT	=WORK.&amp;amp;Table.V
						&amp;amp;Order
						&amp;amp;NoPrint
						;
	RUN;
%MEND	Remove_Table_From_Column;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2020 05:29:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/684883#M207636</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-09-18T05:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/943937#M369919</link>
      <description>Nice post! Didnyou fibally find out how to set those options from SAS code to hadoop?</description>
      <pubDate>Sat, 14 Sep 2024 06:37:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/943937#M369919</guid>
      <dc:creator>GyaniBaba</dc:creator>
      <dc:date>2024-09-14T06:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I set a Hive property when using regular Proc SQL?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/943942#M369921</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/37107"&gt;@jimbarbour&lt;/a&gt;&amp;nbsp;Just as an idea that might be worth trying (never done it myself):&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What if you send these 3 set statements via the dbconinit options of the libname statement. The option is documented as being available for the ODBC engine.&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/acreldb/p1agt4p0hj4fyun103no9xpgskdv.htm" target="_self"&gt;DBCONINIT= LIBNAME Statement Option&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname myive ODBC ... &lt;BR /&gt;dbconinit="&lt;BR /&gt;  set hive.resultset.use.unique.column.names = FALSE; &lt;BR /&gt;  set hive.execution.engine = &amp;amp;Engine; set mapred.job.name = &amp;amp;Type._Members_Direct;&lt;BR /&gt;  SET CURRENT SQLID='myauthid'&lt;BR /&gt;  "&lt;BR /&gt;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then use the libref also in the connect statement to always use the same connection definition however you need it.&lt;/P&gt;
&lt;PRE&gt;connect using myhive;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Update: Just realised that this was an old discussion. Still: Getting some confirmation what actually works would be nice.&lt;/P&gt;</description>
      <pubDate>Sat, 14 Sep 2024 09:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-can-I-set-a-Hive-property-when-using-regular-Proc-SQL/m-p/943942#M369921</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2024-09-14T09:04:55Z</dc:date>
    </item>
  </channel>
</rss>

