Join on table with id less than and equal to the current Announcing the arrival of Valued...

What is Arya's weapon design?

What's the meaning of 間時肆拾貳 at a car parking sign

Should I use a zero-interest credit card for a large one-time purchase?

What exactly is a "Meth" in Altered Carbon?

Why did the IBM 650 use bi-quinary?

Generate an RGB colour grid

What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?

Denied boarding although I have proper visa and documentation. To whom should I make a complaint?

Why do we bend a book to keep it straight?

How to answer "Have you ever been terminated?"

How come Sam didn't become Lord of Horn Hill?

What are the pros and cons of Aerospike nosecones?

Can inflation occur in a positive-sum game currency system such as the Stack Exchange reputation system?

How does the particle を relate to the verb 行く in the structure「A を + B に行く」?

Why did the rest of the Eastern Bloc not invade Yugoslavia?

Why did the Falcon Heavy center core fall off the ASDS OCISLY barge?

How does debian/ubuntu knows a package has a updated version

The logistics of corpse disposal

Why aren't air breathing engines used as small first stages

Dating a Former Employee

Check which numbers satisfy the condition [A*B*C = A! + B! + C!]

Bete Noir -- no dairy

Can an alien society believe that their star system is the universe?

Is it fair for a professor to grade us on the possession of past papers?



Join on table with id less than and equal to the current



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Splitting a table into two tables randomly with 50-50 percent of records in impalahow to insert data into extra columns of target avro table when source table is having less no of columns compared to target using hive or impala?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I have two tables tableA and tableB both with ids as key.
I have to make a join such that if corresponding id of tableA doesn't exist in tableB, query should join against the previous id of tableB.



I am using Cloudera Impala, so don't have the facility to use subquery in
select clause.



TableA:



id  Name
1 Iqbal
2 Hans
3 Griff
5 Fidgeon
6 V
7 MA
8 Shekh


TableB:



id  Designation
1 Developer
3 Data Analyst
4 Cloudera Administrator
6 Talend Developer


Expected Output:



t1_id   t2_id   name    designation
1 1 Iqbal Developer
2 1 Hans Developer
3 3 Griff Data Analyst
5 4 Fidgeon Cloudera Administrator
6 6 V Talend Developer
7 6 MA Talend Developer
8 6 Shekh Talend Developer








share







New contributor




Taha Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



























    0















    I have two tables tableA and tableB both with ids as key.
    I have to make a join such that if corresponding id of tableA doesn't exist in tableB, query should join against the previous id of tableB.



    I am using Cloudera Impala, so don't have the facility to use subquery in
    select clause.



    TableA:



    id  Name
    1 Iqbal
    2 Hans
    3 Griff
    5 Fidgeon
    6 V
    7 MA
    8 Shekh


    TableB:



    id  Designation
    1 Developer
    3 Data Analyst
    4 Cloudera Administrator
    6 Talend Developer


    Expected Output:



    t1_id   t2_id   name    designation
    1 1 Iqbal Developer
    2 1 Hans Developer
    3 3 Griff Data Analyst
    5 4 Fidgeon Cloudera Administrator
    6 6 V Talend Developer
    7 6 MA Talend Developer
    8 6 Shekh Talend Developer








    share







    New contributor




    Taha Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      0












      0








      0








      I have two tables tableA and tableB both with ids as key.
      I have to make a join such that if corresponding id of tableA doesn't exist in tableB, query should join against the previous id of tableB.



      I am using Cloudera Impala, so don't have the facility to use subquery in
      select clause.



      TableA:



      id  Name
      1 Iqbal
      2 Hans
      3 Griff
      5 Fidgeon
      6 V
      7 MA
      8 Shekh


      TableB:



      id  Designation
      1 Developer
      3 Data Analyst
      4 Cloudera Administrator
      6 Talend Developer


      Expected Output:



      t1_id   t2_id   name    designation
      1 1 Iqbal Developer
      2 1 Hans Developer
      3 3 Griff Data Analyst
      5 4 Fidgeon Cloudera Administrator
      6 6 V Talend Developer
      7 6 MA Talend Developer
      8 6 Shekh Talend Developer








      share







      New contributor




      Taha Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I have two tables tableA and tableB both with ids as key.
      I have to make a join such that if corresponding id of tableA doesn't exist in tableB, query should join against the previous id of tableB.



      I am using Cloudera Impala, so don't have the facility to use subquery in
      select clause.



      TableA:



      id  Name
      1 Iqbal
      2 Hans
      3 Griff
      5 Fidgeon
      6 V
      7 MA
      8 Shekh


      TableB:



      id  Designation
      1 Developer
      3 Data Analyst
      4 Cloudera Administrator
      6 Talend Developer


      Expected Output:



      t1_id   t2_id   name    designation
      1 1 Iqbal Developer
      2 1 Hans Developer
      3 3 Griff Data Analyst
      5 4 Fidgeon Cloudera Administrator
      6 6 V Talend Developer
      7 6 MA Talend Developer
      8 6 Shekh Talend Developer






      impala





      share







      New contributor




      Taha Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share







      New contributor




      Taha Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share






      New contributor




      Taha Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 4 mins ago









      Taha IqbalTaha Iqbal

      1




      1




      New contributor




      Taha Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Taha Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Taha Iqbal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "182"
          };
          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: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          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
          });


          }
          });






          Taha Iqbal is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f235000%2fjoin-on-table-with-id-less-than-and-equal-to-the-current%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Taha Iqbal is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Taha Iqbal is a new contributor. Be nice, and check out our Code of Conduct.













          Taha Iqbal is a new contributor. Be nice, and check out our Code of Conduct.












          Taha Iqbal is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Database Administrators Stack Exchange!


          • 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%2fdba.stackexchange.com%2fquestions%2f235000%2fjoin-on-table-with-id-less-than-and-equal-to-the-current%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

          Anexo:Material bélico de la Fuerza Aérea de Chile Índice Aeronaves Defensa...

          Always On Availability groups resolving state after failover - Remote harden of transaction...

          update json value to null Announcing the arrival of Valued Associate #679: Cesar Manara ...