Hi Team, Could you please share a sample logical t...
# general
s
Hi Team, Could you please share a sample logical table configuration? I’m currently using the configuration below for my logical table, but it only fetches data from the realtime table the offline table data is not being fetched.
Copy code
{
  "tableName": "logicalTable",
  "physicalTableConfigMap": {
    "user_stream_REALTIME": {},
    "user_batch_OFFLINE": {}
  },
  "refOfflineTableName": "user_batch_OFFLINE",
  "refRealtimeTableName": "user_stream_REALTIME",
  "brokerTenant": "DefaultTenant",
  "timeBoundaryConfig": {
    "boundaryStrategy": "min",
    "parameters": {
      "function": "min"
    }
  }
}
If I create the logical table using only the offline table, it will be able to fetch data from that table
@Abhishek Bafna @Mayank could you please help me here?
m
Why do you need logical table?
s
I’m doing a POC for my use case
m
I meant what requirement in your use case makes you need logical tables?
s
we need logical tables so that we can query a single table while Pinot automatically fetches data from both the REALTIME and OFFLINE tables, performs the union internally, and returns the combined results. This simplifies our queries and gives us a unified view of both streaming and batch data.
Updated config
Copy code
{
  "tableName": "logicalTable",
  "physicalTableConfigMap": {
    "user_stream_REALTIME": {},
    "user_batch_OFFLINE": {}
  },
  "refOfflineTableName": "user_batch_OFFLINE",
  "refRealtimeTableName": "user_stream_REALTIME",
  "brokerTenant": "DefaultTenant",
  "timeBoundaryConfig": {
    "boundaryStrategy": "min",
    "parameters": {
      "includedTables": [
        "user_batch_OFFLINE"
      ]
    }
  }
}
now i can see "totalDocs": 25 (realtime 5 doc and offline 20 doc) but offline records are getting PrunedByValue
m
That is not logical table, that is hybrid table (I suspected that is what you need and not logical table, hence I asked the question)
s
the recent release (1.4.0) introduces the concept of a logical table, so I’d appreciate your help with it
m
The reason for designing logical tables was for a scale where you have multi-million segments within a single table, and you start to hit some of the limits due to that. What's your data size, how many segments do you have?
➕ 1
s
7000 segments and 3 TB of data for 10 days of ingestion
m
Yep, you don't need logical tables.
s
But data and segments will grow based on the retention period
m
What I am saying is unless you go into millions of segments range, you don't need logical table. You can either stay using real-time table, or use the hybrid table, by periodically offloading data to offline table using managed offline flow.
➕ 1