Set Properties in Toad Data Point Fails - hadoop

I am using Toad Data Point V4.0 to connect to Hive. I try to set below properties using Toad.
set hive.input.format=org.apache.hadoop.hive.ql.io.BucketizedHiveInputFormat;
set hive.optimize.bucketmapjoin=true;
set hive.optimize.bucketmapjoin.sortedmerge=true;
While I can set these properties via Beeline, TOAD throws below error when running above set commands.
[Hortonworks][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error while processing statement: Cannot modify input.format at runtime. It is not in list of params that are allowed to be modified at runtime
Wondering if I have to set these properties somewhere in connection setup or not. Appreciate your input.

We've found a very similar issue with DBVis on Hive.
DBVis is stripping the ‘hive.’ off of commands like “set hive.mapred.mode=strict”. It then checks hive’s list of parameters allowed to be set at runtime for the parameter: “mapred.mode” instead of “hive.mapred.mode”. Since it does not find the parameter, it throws and error.
If we preface the parameter by a second “hive.” (for example, “hive.hive.mapred.mode=strict”) DBVis appears to strips off the first “hive.”. It then finds the stripped version as allowed and sends the stripped version to hive where is executes fine.
NB: This only seems to affect parameters beginning with "hive.".

Related

Getting ORA-01008 error when trying to execute a function via OCI

We are trying to execute an oracle function that requires parameters and we are getting the error ORA-01008- Not all variables are bound. We are pretty sure the problem is in how we are binding the variable that is supposed to received the result of the function. First we tried the following (a method without parameters):
$tSql:="select staging.FUNC_ORAOCI_TEST() from dual"
$iStatus:=OCIHandleAlloc (envhp;$stmthp;OCI_HTYPE_STMT)
$iStatus:=OCIHandleAlloc (envhp;$errhp;OCI_HTYPE_ERROR)
$iStatus:=OCIStmtPrepare ($stmthp;$errhp;$tSql;OCI_DEFAULT)
$iStatus:=OCIDefineByPos ($stmthp;$bindpp;$errhp;1;->atResults;SQLT_STR;$ORANullIndicator;$ORANullLenArray;$ORANullReturnCodeArray;OCI_DEFAULT)
$iStatus:=OCIStmtExecute (svchp;$stmthp;$errhp;1;0;0;0;OCI_DEFAULT)
And it worked perfectly...
Where we got stuck was when trying to pass parameters to the function (which we had modified on purpose to now accept parameters)
We thought it was because we now had to make the binding by name, but it just did not work. We have tried running a PL/SQL block and still we get the error. Here are our failed attempts:
Using a SQL Statement:
$tSql:="select staging.FUNC_ORAOCI_TEST(:tParamText,:iParamNum) from dual"
$iStatus:=OCIBindByName ($stmthp;$bindpp;$errhp;":tParamText";- >tParamText;SQLT_STR;$ORANullIndicator;$ORANullLenArray;$ORANullReturnCodeArray;1;OCI_DEFAULT;BIND_IN)
$iStatus:=OCIBindByName ($stmthp;$bindpp;$errhp;":iParamNum";->iParamNum;SQLT_INT;$ORANullIndicator;$ORANullLenArray;$ORANullReturnCodeArray;1;OCI_DEFAULT;BIND_IN)
$iStatus:=OCIDefineByPos ($stmthp;$bindpp;$errhp;1;->atResults;SQLT_STR;$ORANullIndicator;$ORANullLenArray;$ORANullReturnCodeArray;OCI_DEFAULT)
$iStatus:=OCIStmtExecute (svchp;$stmthp;$errhp;1;0;0;0;OCI_DEFAULT)
Using a PL/SQL Anonymous Block:
$tSql:="DECLARE vResult VARCHAR2:=''; BEGIN vResult := FUNC_ORAOCI_TEST(:tParamText,:iParamNum); End;"
$iStatus:=OCIBindByName ($stmthp;$bindpp;$errhp;":tParamText";->tParamText;SQLT_STR;$ORANullIndicator;$ORANullLenArray;$ORANullReturnCodeArray;1;OCI_DEFAULT;BIND_IN)
$iStatus:=OCIBindByName ($stmthp;$bindpp;$errhp;":iParamNum";->iParamNum;SQLT_INT;$ORANullIndicator;$ORANullLenArray;$ORANullReturnCodeArray;1;OCI_DEFAULT;BIND_IN)
$iStatus:=OCIBindByName ($stmthp;$bindpp;$errhp;":vResult";->tResult;SQLT_STR;$ORANullIndicator;$ORANullLenArray;$ORANullReturnCodeArray;1;OCI_DEFAULT;BIND_OUT)
$iStatus:=OCIStmtExecute (svchp;$stmthp;$errhp;1;0;0;0;OCI_DEFAULT)
We have looked at similar questions but no one was trying to use the OCI interface to execute the function the way we are doing it.
We are coding in 4D so ignore the weird syntax. We just need guidance as to how build the statement and what would be the proper OCI command to reach a successful binding.
We partially resolved this issue.
We have got it to work only for SQL statements not for PL/SQL. But we got rid of the ORA-01008 error.
The code in case 1 referenced above works as is. We did some clean up of comments and lines that were added for debugging, but they might have altered the sqlstmt somehow, thus affecting the binds.
The code in case 2 now gives an error "Invalid SQL Statement" which we will open a new inquiry for in separate thread.
One very useful information that we found to help us resolve the initial inquiry can be found here:
https://docs.oracle.com/database/121/LNOCI/oci05bnd.htm#LNOCI16368

Emitting db2ts command via JDBC

Some of my DLL statements related to full text search (ex: CREATE INDEX...FOR TEXT) only run when executed from db2ts. I'd like to emit these statements directly from some java code using JDBC, but then an SQL syntax error is returned.
Is there a way to emit these commands from JDBC?
Actually, you have to call the admin proc in SYSPROC to do the job. The documentation is not that clear but I've been able to delete an index by using:
CALL SYSPROC.SYSTS_DROP('DB2ADMIN','TESTS_FTS_FT','en_US',?)

Exception DateTime OleDbParameter

I’m using Visual Studio 2010. Within the project we add a DataSet, inside it; we have a Query Table Adapter to do all the queries to a SQL Server 2000 Data Base. One of the queries is formed using a Stored Procedure that receives four parameters. One of the parameters is a DateTime data type. Although we have check many times, we are receiving an unexpected exception:
Provider encountered an error while sending command parameter[0] '' value and stopped processing.
Conversion failed for command parameter[1] '' because the data value overflowed the type used by the provider.
Provider encountered an error while sending command parameter[2] '' value and stopped processing.
Provider encountered an error while sending command parameter[3] '' value and stopped processing.
Provider encountered an error while sending command parameter[4] '' value and stopped processing.
Working around this, if we delete the DateTime parameter of the Store Procedure, the query executes successfully otherwise we get the exception mentioned before.
We notice that the DateTime parameter has the property set as follows:
DbType: DateTime
ProviderType: DBTimeStamp
Any approach trying to accomplish the execution of the Query will be greatly welcome.
When I received this error, I had to change my date parameter to tell what the data type was.
Old Way
cmd.Parameters.Add(new OleDbParameter("TDate", DateTime.Now));
New Way
OleDbParameter dateParam = new OleDbParameter("TDate", OleDbType.Date);
dateParam.Value = DateTime.Now;
cmd.Parameters.Add(dateParam);

Informatica error =[ERROR('transformation error')]

I am getting the following Informatica error:
Note: Output column [AGENT_DISPOSTION_CODE] has no default value. Row will be skipped if transformation errors are encountered
MAPPING> DBG_21056 column=[PHONE_NUMBER], defaultvalue=[ERROR('transformation error')]
How can I fix it?
It's not an error, it's only an information that you have a port with a default value set to ERROR('transformation error'), so Integration Service will skip the NULL values with an ERROR function.
The Designer inserts this expression automatically, when you add a new output port; you can change it. Edit the expression, find the port on the Ports tab and check the Default value field at the bottom:
The ERROR function causes the Integration Service to skip a row and issue an error message, which you define.
When running a session on the Verbose Data Mode and if there is no default value specified for output ports in the Mapping, PowerCenter is designed for the warning messages to show up in the session log.
During the column initialization, PowerCenter evaluates the default value specified for each output port in the Mapping and displays the corresponding message. The evaluation code path is the same as for evaluating any other expressions later on during data transformation.
Example
If you specify SIN(1.415) as the default value for an output port, the evaluation on sin(1.415) executes successfully. Upon a successful evaluation, the following message will be displayed:
MAPPING> DBG_21364 Note: Default value [SIN(1.4)] of output column [output1] will be used if tansformation errors are encountered
However, if the default value is error('transformation error'), the following error message will be displayed during evaluation like any real transformation errors:
MAPPING> TE_7007 Transformation Evaluation Error [<> [ERROR]: transformation error... nl:ERROR(u:'transformation error')]; current row skipped...
Immediately after the evaluation, the following message will be displayed in the session log:
MAPPING> DBG_21367 Note: Output column [NUM38_37] has no default value. Row will be skipped if transformation errors are encountered

Oracle reports-Passing null parameters to RWRUN

I have a set of run-time parameters in the parameter form in oracle reports that have the "Restrict List to predetermined values". I am able to run the report in the report builder without supplying any value to these parameters. But during the batch run using RWRUN, I am getting the following warning and the report is not generated.
The value of restricted LOV parameter P_PARM1 is not among the selectable values
The above error occurs when I omit the parameter P_PARM1 altogether in the paramter list of RWRUN as well as when I supply it without giving any value to it(implying null) like below:
rwrun.sh <other required parameters here> P_PARM1=
Any help would be much appreciated.
Does rwrun.sh ... P_PARM1='' yield anything different?

Resources