If there are multiple queries in a stored procedure (for example, to read values from another table or to hold temporary combinations) each of the queries must return the same sets of columns in the same order (same names and data types). If two columns have the same name, or if no name is provided, the procedure can result in an error. That is, stored procedure writers must not depend on Tableau to start transactions before invoking stored procedures, or to commit them afterward.Ĭolumn names must be unique for stored procedures to work. Tableau does not perform any transaction management for stored procedures. Tableau cannot determine in advance whether parameters are required. If no value is provided for a parameter that the stored procedure requires, an error occurs. Stored procedures that return no result sets are listed on the data source page but fail if selected. If all result set columns map to unknown data types, Tableau displays a message: ![]() Result set columns that don't have matching types in Tableau (such as varbinary, geometry, and hierarchyid) are logged. ![]() Stored procedures that have parameters of a non-scalar type are excluded. If a stored procedure has output parameters, Tableau filters out the stored procedure. If a stored procedure returns more than one result set, Tableau reads the first one and ignores the rest. If you use stored procedures to define a data source for Tableau, keep the following in mind: They are represented in a single logical table in the logical layer, and don't allow opening the Join/Union canvas (physical layer). Stored procedures don't support federation, relating, or joining. If you then expose the Tableau parameter in the view, users are able to change the value of the parameter in the procedure interactively. Instead of entering a value, you can use an existing Tableau parameter, or create a new Tableau parameter for the value: If parameters are available in the procedure, the Parameters dialog box automatically displays. When you create a data source using one of these data types, available procedures are listed under Stored Procedures, as shown in the Microsoft SQL Server example:įrom the left pane, drag the procedure to the canvas or double-click one of the listed procedures. Oracle table functions act similarly to stored procedures and are listed under Stored Procedures on the Data Source page. When you connect to a SAP Sybase ASE, Microsoft SQL Server, or Teradata database with Tableau, you can use a stored procedure to define the connection.įor Oracle, you can use a table function to define the connection. A stored procedure is a subroutine available to applications that access a relational database system.
0 Comments
Leave a Reply. |