A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.snowflake.com/en/sql-reference/external-functions-creating-azure-troubleshooting below:

Website Navigation


Troubleshooting external functions for Azure

Troubleshooting external functions for Azure

This topic provides troubleshooting information for external functions for Azure.

Platform-independent Runtime Issues Data Type Return Values Do Not Match Expected Return Values

When passing arguments to or from an external function, ensure that the data types are appropriate. If the value sent can’t fit into the data type being received, the value might be truncated or corrupted in some other way.

For more details, see Ensure that arguments to the external function correspond to arguments parsed by the remote service.

Error: Row numbers out of order
Possible Causes:

The row numbers you return within each batch should be monotonically ascending integers starting at 0. The input row numbers must also follow this rule, and each output row should match the corresponding input row. For example, the output in output row 0 should correspond to the input in input row 0.

Possible Solutions:

Ensure that the row numbers you return are the same as the row numbers you received, and that each output value uses the row number of the corresponding input. If this doesn’t work, then the input row numbers may not be correct or you did not return the rows in the correct order.

Next, ensure that the output row numbers start from 0, increase by 1, and are in order.

For more information about data input and output formats, see Remote service input and output data formats.

Error: “Error parsing JSON: Invalid response”
Possible Causes:

The most likely cause is that the JSON returned by the remote service (e.g. AWS Lambda function) is not constructed correctly.

Possible Solutions:

Ensure that the external function returns an array of arrays, with one inner array returned for each input row received. Review the description of the output format at Data format received by Snowflake.

Error: Format of the returned value is not JSON
Possible Causes:

Your return value includes double quotes inside the value.

Possible Solutions:

Although JSON strings are delimited by double quotes, the string itself should not start and end with a quotation mark in most cases. If the embedded double quotes are incorrect, remove them.

Error: Function received the wrong number of rows
Possible Causes:

The remote service tried to return more or fewer rows than it received. Even though the function is nominally scalar, it might receive multiple rows in the body field of the event parameter, and should return exactly as many rows as it received.

Possible Solution(s):

Ensure that the remote service returns one row for each row that it receives.

Azure-specific issues Unable to modify settings during creation of the Azure function
Possible Causes:

When creating your Azure Function, you may not be able to modify settings for the function under the Authentication/Authorization menu.

This problem can occur if all of the following are true:

Azure AD authentication is not available on the Linux Consumption plan for Azure Functions. You must use an App Service plan or Premium plan in order to authenticate with Azure AD.

Possible Solutions:
External function times out
Possible Causes:

There are many possible causes of timeouts. On Azure, one of the possible causes is that the Azure Functions app was not written to scale properly.

Possible Solutions:

Ensure that you are following the Azure guidelines for writing scalable functions .

For more information about troubleshooting scalability and performance issues, see Troubleshooting scalability and performance issues .

Error: Failed to obtain Azure active directory access token.
Possible Solutions:

Try the following steps:

Error: 401 ‘{ “statusCode”: 401, “message”: “Access denied due to missing subscription key…” }’

Full error message text:

Request failed for external function <function_name>. Error: 401 '{ "statusCode": 401, "message":
"Access denied due to missing subscription key. Make sure to include subscription key when making requests to an API." }'

Copy

Possible Causes:

The API Management service’s subscription requirement might be on.

Possible Solutions:

You might need to turn off the subscription requirement for the API Management service.

Error: 401 ‘{ “statusCode”: 401, “message”: “Access denied due to missing subscription key.” }
Possible Causes:

The proxy service requires an API key (aka “subscription key”), typically for authentication or billing. However, no API key was supplied in the API_KEY clause of the CREATE API INTEGRATION command.

Possible Solutions:

Use the ALTER API INTEGRATION command to update the API integration with a valid API key.

Error: 401 ‘{ “statusCode”: 401, “message”: “Access denied due to invalid subscription key.” }’
Possible Causes:

The proxy service requires an API key (aka “subscription key”), typically for authentication or billing. However, the API key supplied in the API_KEY clause of the CREATE API INTEGRATION command was not valid.

Possible Solutions:

Use the ALTER API INTEGRATION command to update the API integration with a valid API key.

Error: 401 ‘{ “statusCode”: 401, “message”: “Invalid JWT.” }’

Full error message text:

Request failed for external function <function_name>. Error: 401 '{ "statusCode": 401, "message": "Invalid JWT." }'

Copy

Possible Causes:
Possible Solutions:
Error (remote service): 401 ‘{ “statusCode”: 401, “message”: “Invalid JWT.” }’

Full error message text:

Request failed for external function <function_name> with remote service error: 401 '{ "statusCode": 401, "message": "Invalid JWT." }'

Copy

Possible Causes:

If you used the ARM template, you might not have updated the JWT (JSON Web Token) that the template created for you.

Possible Solutions:

Update the JWT as documented in Step 6: Update the Azure security policy for the proxy service in the Portal.

Error: 500 …
Possible Causes:

You might have chosen the wrong option for your Azure AD app:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4