How to change dynamically value field of “Generate rows step” in Pentaho data integration, to be used to...





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I want to access data from a rest API using pentaho data integration and save the result into a table.



I am using the following steps:




  1. Generate rows step

  2. Rest Client

  3. JSON input

  4. select values

  5. Table output


The API I want to access take a date as an argument.



My Question is here:




How can I automatically change date in the url (generate row step) so
that I can get data of many dates at a time. With one date the
transformation works fine.




enter image description here



enter image description here



Note that the first part of the url was intentionally changed.
Now I want to dynamically change that dates.










share|improve this question































    0















    I want to access data from a rest API using pentaho data integration and save the result into a table.



    I am using the following steps:




    1. Generate rows step

    2. Rest Client

    3. JSON input

    4. select values

    5. Table output


    The API I want to access take a date as an argument.



    My Question is here:




    How can I automatically change date in the url (generate row step) so
    that I can get data of many dates at a time. With one date the
    transformation works fine.




    enter image description here



    enter image description here



    Note that the first part of the url was intentionally changed.
    Now I want to dynamically change that dates.










    share|improve this question



























      0












      0








      0


      1






      I want to access data from a rest API using pentaho data integration and save the result into a table.



      I am using the following steps:




      1. Generate rows step

      2. Rest Client

      3. JSON input

      4. select values

      5. Table output


      The API I want to access take a date as an argument.



      My Question is here:




      How can I automatically change date in the url (generate row step) so
      that I can get data of many dates at a time. With one date the
      transformation works fine.




      enter image description here



      enter image description here



      Note that the first part of the url was intentionally changed.
      Now I want to dynamically change that dates.










      share|improve this question
















      I want to access data from a rest API using pentaho data integration and save the result into a table.



      I am using the following steps:




      1. Generate rows step

      2. Rest Client

      3. JSON input

      4. select values

      5. Table output


      The API I want to access take a date as an argument.



      My Question is here:




      How can I automatically change date in the url (generate row step) so
      that I can get data of many dates at a time. With one date the
      transformation works fine.




      enter image description here



      enter image description here



      Note that the first part of the url was intentionally changed.
      Now I want to dynamically change that dates.







      pentaho kettle pentaho-spoon pentaho-data-integration pdi






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 4 at 22:31









      Suraj Kumar

      2,80841026




      2,80841026










      asked Jan 4 at 12:12









      pentaho_Userpentaho_User

      31




      31
























          1 Answer
          1






          active

          oldest

          votes


















          0














          You can't do that in the Generate Rows step, you'll have to calculate dates and concatenate them in the URL.



          Step 1 - Generate rows with how many days backwards you want (say 60)



          Step 2 - Add Sequence step - Beggining value -1, increment of -1.



          Step 3 - Formula step - create a column with desired name, formula = TODAY(), data type DATE.



          Step 4 - Calculator Step - create a new column that uses the calculation "DATE A + B Days", use Field A = Date from formula step, Field B = 'valuename'(Default field name from Add Sequence step). Data type DATE, conversion mask aaaa-MM-dd.



          Using these 4 steps you now have the dates of 60 days backwards in the aaaa-MM-dd format, which you just have to concatenate to the end of your url, and run this url once for each date.






          share|improve this answer
























          • Thank you very much @cristiaCurti this is very helpful to generate dynamic url according to desired dates. I did the 4 steps and successfully generated all desired urls, now how can I pass each one in the rest client step. Thank you again for the help.

            – pentaho_User
            Jan 4 at 13:35






          • 1





            @cristiaCurti I just added rest client and it worked, Thank you very much for your help.

            – pentaho_User
            Jan 4 at 14:13














          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54038756%2fhow-to-change-dynamically-value-field-of-generate-rows-step-in-pentaho-data-in%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You can't do that in the Generate Rows step, you'll have to calculate dates and concatenate them in the URL.



          Step 1 - Generate rows with how many days backwards you want (say 60)



          Step 2 - Add Sequence step - Beggining value -1, increment of -1.



          Step 3 - Formula step - create a column with desired name, formula = TODAY(), data type DATE.



          Step 4 - Calculator Step - create a new column that uses the calculation "DATE A + B Days", use Field A = Date from formula step, Field B = 'valuename'(Default field name from Add Sequence step). Data type DATE, conversion mask aaaa-MM-dd.



          Using these 4 steps you now have the dates of 60 days backwards in the aaaa-MM-dd format, which you just have to concatenate to the end of your url, and run this url once for each date.






          share|improve this answer
























          • Thank you very much @cristiaCurti this is very helpful to generate dynamic url according to desired dates. I did the 4 steps and successfully generated all desired urls, now how can I pass each one in the rest client step. Thank you again for the help.

            – pentaho_User
            Jan 4 at 13:35






          • 1





            @cristiaCurti I just added rest client and it worked, Thank you very much for your help.

            – pentaho_User
            Jan 4 at 14:13


















          0














          You can't do that in the Generate Rows step, you'll have to calculate dates and concatenate them in the URL.



          Step 1 - Generate rows with how many days backwards you want (say 60)



          Step 2 - Add Sequence step - Beggining value -1, increment of -1.



          Step 3 - Formula step - create a column with desired name, formula = TODAY(), data type DATE.



          Step 4 - Calculator Step - create a new column that uses the calculation "DATE A + B Days", use Field A = Date from formula step, Field B = 'valuename'(Default field name from Add Sequence step). Data type DATE, conversion mask aaaa-MM-dd.



          Using these 4 steps you now have the dates of 60 days backwards in the aaaa-MM-dd format, which you just have to concatenate to the end of your url, and run this url once for each date.






          share|improve this answer
























          • Thank you very much @cristiaCurti this is very helpful to generate dynamic url according to desired dates. I did the 4 steps and successfully generated all desired urls, now how can I pass each one in the rest client step. Thank you again for the help.

            – pentaho_User
            Jan 4 at 13:35






          • 1





            @cristiaCurti I just added rest client and it worked, Thank you very much for your help.

            – pentaho_User
            Jan 4 at 14:13
















          0












          0








          0







          You can't do that in the Generate Rows step, you'll have to calculate dates and concatenate them in the URL.



          Step 1 - Generate rows with how many days backwards you want (say 60)



          Step 2 - Add Sequence step - Beggining value -1, increment of -1.



          Step 3 - Formula step - create a column with desired name, formula = TODAY(), data type DATE.



          Step 4 - Calculator Step - create a new column that uses the calculation "DATE A + B Days", use Field A = Date from formula step, Field B = 'valuename'(Default field name from Add Sequence step). Data type DATE, conversion mask aaaa-MM-dd.



          Using these 4 steps you now have the dates of 60 days backwards in the aaaa-MM-dd format, which you just have to concatenate to the end of your url, and run this url once for each date.






          share|improve this answer













          You can't do that in the Generate Rows step, you'll have to calculate dates and concatenate them in the URL.



          Step 1 - Generate rows with how many days backwards you want (say 60)



          Step 2 - Add Sequence step - Beggining value -1, increment of -1.



          Step 3 - Formula step - create a column with desired name, formula = TODAY(), data type DATE.



          Step 4 - Calculator Step - create a new column that uses the calculation "DATE A + B Days", use Field A = Date from formula step, Field B = 'valuename'(Default field name from Add Sequence step). Data type DATE, conversion mask aaaa-MM-dd.



          Using these 4 steps you now have the dates of 60 days backwards in the aaaa-MM-dd format, which you just have to concatenate to the end of your url, and run this url once for each date.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 4 at 12:36









          Cristian CurtiCristian Curti

          503410




          503410













          • Thank you very much @cristiaCurti this is very helpful to generate dynamic url according to desired dates. I did the 4 steps and successfully generated all desired urls, now how can I pass each one in the rest client step. Thank you again for the help.

            – pentaho_User
            Jan 4 at 13:35






          • 1





            @cristiaCurti I just added rest client and it worked, Thank you very much for your help.

            – pentaho_User
            Jan 4 at 14:13





















          • Thank you very much @cristiaCurti this is very helpful to generate dynamic url according to desired dates. I did the 4 steps and successfully generated all desired urls, now how can I pass each one in the rest client step. Thank you again for the help.

            – pentaho_User
            Jan 4 at 13:35






          • 1





            @cristiaCurti I just added rest client and it worked, Thank you very much for your help.

            – pentaho_User
            Jan 4 at 14:13



















          Thank you very much @cristiaCurti this is very helpful to generate dynamic url according to desired dates. I did the 4 steps and successfully generated all desired urls, now how can I pass each one in the rest client step. Thank you again for the help.

          – pentaho_User
          Jan 4 at 13:35





          Thank you very much @cristiaCurti this is very helpful to generate dynamic url according to desired dates. I did the 4 steps and successfully generated all desired urls, now how can I pass each one in the rest client step. Thank you again for the help.

          – pentaho_User
          Jan 4 at 13:35




          1




          1





          @cristiaCurti I just added rest client and it worked, Thank you very much for your help.

          – pentaho_User
          Jan 4 at 14:13







          @cristiaCurti I just added rest client and it worked, Thank you very much for your help.

          – pentaho_User
          Jan 4 at 14:13






















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54038756%2fhow-to-change-dynamically-value-field-of-generate-rows-step-in-pentaho-data-in%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Monofisismo

          Angular Downloading a file using contenturl with Basic Authentication

          Olmecas