Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-2630

Procedure Writing in Teiid

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Critical
    • Resolution: Won't Do
    • None
    • None
    • None
    • None
    • Hide

      Procedure that I built is as mentioned below.

      IN Parameter is LinkFileTrain.FetchTrainFromFile.FileName
      OUT Parameters are TrainId and BW_Node
      VARIABLES.x is used to store the unique identifier from one table to be used in another query. Results are stored in the OUT Parameters. This query doesn't give me any error in the designer.

      BEGIN
      DECLARE string VARIABLES.x = '123';
      VARIABLES.x = (SELECT CassandraSource.id_mapper.dst_id FROM CassandraSource.id_mapper WHERE (CassandraSource.id_mapper.src_name = 'FileName') AND (CassandraSource.id_mapper.src_id = LinkFileTrain.FetchTrainFromFile.FileName) AND (CassandraSource.id_mapper.dst_name = 'TrainId'));
      SELECT CassandraSource.train.train_id AS TrainId, CassandraSource.train.bw_node AS BW_Node FROM CassandraSource.train WHERE CassandraSource.train.train_id = VARIABLES.x;
      END

      Show
      Procedure that I built is as mentioned below. IN Parameter is LinkFileTrain.FetchTrainFromFile.FileName OUT Parameters are TrainId and BW_Node VARIABLES.x is used to store the unique identifier from one table to be used in another query. Results are stored in the OUT Parameters. This query doesn't give me any error in the designer. BEGIN DECLARE string VARIABLES.x = '123'; VARIABLES.x = (SELECT CassandraSource.id_mapper.dst_id FROM CassandraSource.id_mapper WHERE (CassandraSource.id_mapper.src_name = 'FileName') AND (CassandraSource.id_mapper.src_id = LinkFileTrain.FetchTrainFromFile.FileName) AND (CassandraSource.id_mapper.dst_name = 'TrainId')); SELECT CassandraSource.train.train_id AS TrainId, CassandraSource.train.bw_node AS BW_Node FROM CassandraSource.train WHERE CassandraSource.train.train_id = VARIABLES.x; END

    Description

      I created a Procedure using Cassandra as the Datasource. The procedure has 1 input and 2 outputs. I use the input to run a query which retrieves me a unique identifier which is the input for the 2nd table. When I fire another query on the 2nd table, data is retrieved but I am unable to assign it to my OUT parameters.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jayeshgarg Jayesh Garg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: