Skip to main content

Table description

The near.function_call table contains flattened out details for records in the actions table of the FUNCTION_CALL type.

Column Descriptions

Table Sample

Data Manipulation Tips

The actions data in NEAR can be complicated and nested, causing it hard to analyze sometimes. So here we give two examples on how to work array and json data to make it easier to analyze.

Explode array of rows into separate rows with defined fields

When the action type is “DELEGATE_ACTION”, the action_delegate_delegate_action_actions becomes an array of size n with rows of fields. We can utilize CROSS JOIN UNNEST to first explode the array, then use . directly to access the fields in the row. Reference query can be found here.

Extract fields from JSON string

When the action type is “FUNCTION_CALL”, the action_function_call_args_parsed becomes a JSON string. We can utilize json_extract with $.<field_name> syntax to extract the fields from the JSON string. Reference query can be found here.