Skip to content

Troubleshooting and FAQs

Common issues with UDAs

Troubleshooting registration

  1. Missing name argument in UDA registration

  2. 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.

  3. 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
Outputs the following error message:

Missing name argument in UDA registration, det=[query=`myQuery;aggregation=`myAgg;metadata=()!()]
  1. Name argument in UDA registration is not a symbol

  2. Error - The name is specified in the registration dictionary but has an incorrect datatype. Only symbols are supported.

  3. Solution - Ensure the name is of type symbol.

    For example:

    q)args:`name`query`aggregation`metadata!("some name";myQuery;`myAggregation;()!())
    q).kxi.registerUDA args
    
    Outputs the following error message:

    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 the name is of type symbol. Using the example above, the correct arguments would be:

    q)args:`name`query`aggregation`metadata!(`$"some name";myQuery;`myAggregation;()!())
    
  4. Query/Aggregation function not loaded into the process

  5. Error - The query or aggregation function called using .kxi.registerUDA is not loaded or defined in the current process.

  6. 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.

  7. Errors calling custom UDA functions

  8. Error - The request returns the error type_mismatch when executing via REST.

  9. 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

  1. 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.

  2. 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.

  3. 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.

  1. 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: -

  2. 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.

  3. 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 as basic or splayed, 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.