You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/09/13 08:14:45 UTC

[GitHub] [doris-flink-connector] JNSimba opened a new pull request, #61: [Feature] Support flink table lookup join

JNSimba opened a new pull request, #61:
URL: https://github.com/apache/doris-flink-connector/pull/61

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem Summary:
   
   At present, the data of the flink stream join doris table is to read the doris table into the memory at one time and join it, such as kafka join doris. This makes it impossible to read the newly added data of the doris table.
    
   Therefore, lookup join is supported on the flink doris connector. The principle is to search in doris in real time according to the data in the fact stream.
   
   tips:
   For query performance, the cache setting is supported, which is disabled by default.
   `lookup.cache.max-rows` //The maximum row of the cache
   `lookup.cache.ttl`.            //cache's ttl
   `lookup.max-retries`.      //The maximum number of retries to read doris
   
   example:
   ```sql
   CREATE TABLE fact_table (
     `id` BIGINT,
     `name` STRING,
     `city` STRING,
     `process_time` as proctime()
   ) WITH (
     'connector' = 'kafka',
     'topic' = 'test_lookup',
     'properties.bootstrap.servers' = '127.0.0.1:9092',
     'properties.group.id' = 'testGroup',
     'scan.startup.mode' = 'earliest-offset',
     'format' = 'csv'
   );
   
   
   create table dim_city(
     `city` STRING,
     `level` INT ,
     `province` STRING,
     `country` STRING
   ) WITH (
     'connector' = 'doris',
     'fenodes' = '127.0.0.1:8030',
     'table.identifier' = 'test.dim_city',
     'username' = 'root',
     'password' = '',
     'lookup.cache.max-rows' = '1000',
     'lookup.cache.ttl' = '60000'
   );
   
   SELECT a.id, a.name, a.city, c.province, c.country,c.level
   FROM fact_table a
     left join dim_city FOR SYSTEM_TIME AS OF a.process_time AS c
     ON a.city = c.city
   
   ```
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (Yes/No/I Don't know)
   2. Has unit tests been added: (Yes/No/No Need)
   3. Has document been added or modified: (Yes/No/No Need)
   4. Does it need to update dependencies: (Yes/No)
   5. Are there any changes that cannot be rolled back: (Yes/No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris-flink-connector] JNSimba merged pull request #61: [Feature] Support flink table lookup join

Posted by GitBox <gi...@apache.org>.
JNSimba merged PR #61:
URL: https://github.com/apache/doris-flink-connector/pull/61


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org