Troubleshooting and FAQs
Common issues with UDAs
Troubleshooting registration
-
Missing
name
argument in UDA registration -
Error - The
name
key in the.kxi.registerUDA
function is not specified. The details dictionary supplied to the function is output to the log to help you identify the failing UDA. -
Solution - Ensure that the
name
argument is included when using the.kxi.registerUDA
function.
For example:
q)args:`query`aggregation`metadata!(`myQuery;`myAggregation;()!()) / Build registration arguments, with `name` missing
q).kxi.registerUDA args
Missing name argument in UDA registration, det=[query=`myQuery;aggregation=`myAgg;metadata=()!()]
-
Name
argument in UDA registration is not a symbol -
Error - The
name
is specified in the registration dictionary but has an incorrect datatype. Only symbols are supported. -
Solution - Ensure the
name
is of type symbol.For example:
Outputs the following error message:q)args:`name`query`aggregation`metadata!("some name";myQuery;`myAggregation;()!()) q).kxi.registerUDA args
Name argument in UDA registration is not a symbol, type=10 det=[name="some name";query=`myQuery;aggregation=`myAgg;metadata=()!()]
The error message outputs all the details passed to the
.kxi.registerUDA
function, helping you identify where in your code the issue is occurring. To fix this issue, ensure thename
is of type symbol. Using the example above, the correct arguments would be:q)args:`name`query`aggregation`metadata!(`$"some name";myQuery;`myAggregation;()!())
-
Query/Aggregation function not loaded into the process
-
Error - The query or aggregation function called using
.kxi.registerUDA
is not loaded or defined in the current process. -
Solution - Ensure the function is loaded into the process before calling
.kxi.registerUDA
. The error message displayed starts with either Query or Aggregation, indicating which function is not defined. -
Errors calling custom UDA functions
-
Error - The request returns the error
type_mismatch
when executing via REST. -
Solution - Ensure that when registering the custom UDA
.kxi.metaParam
if allowing both atom and list types, list must be declared first. For example://Registering a custom UDA .... .kxi.metaParam[`name`type`isReq`description!(`byCols;11 -11h;1b;"Column(s) to count by.")],
Common deployment errors
-
Missing dependencies
-
Error - The UDA fails to execute due to missing dependencies.
-
Solution - Ensure that all required dependencies are included in the package and correctly referenced in the manifest.
-
-
Incorrect configuration settings
-
Error - The deployment fails because of incorrect environment variables or configuration settings.
-
Solution - Review and update the configuration settings to match the target environment's requirements.
-
-
Permission denied
-
Error - The deployment process is halted due to insufficient permissions.
-
Solution - Check the permissions of the deployment user or service account and ensure they have the necessary access rights.
-
-
Syntax errors
-
Error - The deployment fails due to syntax errors in the UDA.
-
Solution - Review the code for syntax errors, correct them, and test the code before redeploying.
-
Example - Custom UDA file
uda.q
contains a syntax error:-break
This causes the DAP/Aggregator to have a
FATAL
error and generates the below messages in the process logs:ERROR KXI Failed to load :./uda.q with error: -
FATAL DAPAKX Error loading custom file: Failed to load :./uda.q with error: -
-
-
Integration failures
-
Error - The UDA does not integrate properly with other system components, causing failures.
-
Solution - Conduct thorough integration testing before deployment and address any incompatibilities or errors found.
-
-
Incorrect query parameter for memory-mapped tables
-
Error - The query function does not include the
table
as a parameter when using default aggregation with memory-mapped table types, such asbasic
orsplayed
, resulting in duplicated responses. -
Solution - Ensure the query function includes the
table
as a parameter to route the request to a single DAP and prevent duplicate results. For more information, refer to the aggregation examples.
-
FAQs
How do I update an existing UDA?
- Update the UDA in your development environment, repackage it, and redeploy the updated package.
Can I use multiple UDAs in the same query?
- Yes, UDAs can call other UDAs providing they are registered and deployed correctly. For more information, refer to the helper function
.kxi.response.callAPI
What should I do if the UDA deployment fails?
- Review the error logs generated during deployment, ensure all dependencies are included, and check for syntax errors.