Announcement

Collapse
No announcement yet.

How to pass VoltDB table to a stored proc using REST API?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to pass VoltDB table to a stored proc using REST API?

    According to Passing Arguments to a Stored Procedure
    it is possible to pass an argument of type VoltTable (and an array of any supported scalar type) to a stored procedure
    but it isn't explained how to do it using REST API here
    8.2.3. How Parameters Are Interpreted

    a.k.a How to pass multiple rows to INSERT stored procedure (aside from passing very large string then splitting and parsing it)?
    Last edited by ThatDud3; 10-26-2015, 04:34 PM.

  • #2
    There is no way to pass in a VoltTable input parameter via the REST API. When you call the REST API, the values are passed in a strings to the procedure, and these are converted to the primitive types, but there is no conversion or string representation for a VoltTable.

    The REST API is meant for lightweight use, such as to gather data for dashboards. Are you wanting to use it for ingestion?

    Comment


    • #3
      Hi ThatDud3,

      It turns out what I wrote is not correct. You can pass in a JSON representation of a VoltTable over the REST API when calling a procedure that has a VoltTable input parameter.

      To get an example of the JSON format, you can create a VoltTable in java and then call the toJSONString() method.

      Sorry for the misinformation, this is very seldom used and not documented.

      Comment

      Working...
      X