Slackbot
10/12/2026, 6:43 AMRocky
10/12/2026, 6:44 AMmax_unknown_string_meta_length to a higher value (e.g., 1024 or 4096) to ensure the metadata reports a sufficient size:
sql
SET GLOBAL max_unknown_string_meta_length = 4096;
* Alternative: Ensure your columns are defined as VARCHAR(N) with an explicit size rather than just STRING or TEXT, as explicit lengths help the driver allocate the correct buffer.
2. ODBC Driver Configuration (Fetch Size)
The ODBC driver handles how data is "fetched" in batches. If the fetch size is too small or encounters a timeout, it can lead to incomplete data transfers.
* Action: Go to your Windows ODBC Data Source Administrator, find your StarRocks/MySQL DSN, and look for settings like "Row Fetch Size" or "Don't Cache Results".
* Recommendation: Try enabling "Don't Cache Results" (or similar "Streaming" mode) in the MySQL ODBC driver options. This prevents the driver from trying to buffer the entire result set in memory, which often causes issues with large imports.
3. Data Type Incompatibility
Power BI's ODBC implementation sometimes struggles with specific StarRocks types:
* LARGEINT: Power BI doesn't natively support 128-bit integers. These should be cast to BIGINT or VARCHAR in your query.
* JSON/Bitmap: These types are not standard SQL types and may be skipped or mangled by the ODBC driver. Always cast these to VARCHAR when importing to Power BI.
4. Use the Official StarRocks Connector
Instead of a generic ODBC driver, it is highly recommended to use the StarRocks Power BI Connector.
* StarRocks has a custom connector (often distributed as a .mez file) that supports DirectQuery and optimized Import modes.
* There is also a newer Arrow Flight SQL based connection method which is significantly faster and more reliable for large data imports.
5. Check StarRocks Session Timeouts
If the "missing data" happens after a long period of loading, StarRocks might be closing the connection.
* Check the net_write_timeout and wait_timeout variables:
sql
SHOW VARIABLES LIKE '%timeout%';
* You may need to increase these for very large imports:
sql
SET GLOBAL net_write_timeout = 600; -- 10 minutes
Next Step: Try running a SELECT COUNT(*) in Power BI versus StarRocks for the same query to confirm exactly how many rows are missing. If only specific columns are empty while the row exists, focus on Point 1 (Metadata). If entire rows are missing, focus on Point 2 (Fetch Size) or Point 5 (Timeouts).
References
• faq/loading/Flink_connector_faq.md
• unloading/arrow_flight.md
• release_notes/release-2.5.md
• data_source/feature-support-data-lake-analytics.mdZurab Kiknavelidze
10/12/2026, 7:26 AMRocky
10/12/2026, 7:26 AMnet_write_timeout (Most Likely)
StarRocks has a system variable called net_write_timeout (default is 60 seconds). This is the time StarRocks waits for the client (Power BI/ODBC) to consume the data.
* The Issue: When importing 200 million rows, the transfer often takes much longer than 60 seconds. If Power BI is slow to process/compress a batch of data, StarRocks may close the connection. Some ODBC drivers interpret a closed connection as "end of data" rather than an error, leading to a silent truncation.
* The Fix: Increase the timeout significantly for your session before running the import:
sql
SET GLOBAL net_write_timeout = 3600; -- Set to 1 hour
2. brpc_socket_max_unwritten_bytes (BE Buffer)
When StarRocks sends massive result sets, it uses an internal buffer to hold data before it is sent over the network.
* The Issue: If the client is slower than the StarRocks backends, these buffers can fill up. If they hit the limit, the RPC call may fail.
* The Fix: Increase the buffer size in your be.conf (requires a BE restart):
properties
brpc_socket_max_unwritten_bytes = 4294967296 # Increase to 4GB
3. ODBC Driver "Result Caching"
The MySQL ODBC driver often tries to cache the entire result set in local memory before handing it to Power BI.
* The Issue: If your machine runs out of memory or hits a driver-specific limit during this caching phase, the driver may stop fetching more rows and return what it has collected so far.
* The Fix: In your ODBC Data Source Administrator (DSN) settings:
* Enable "Don't Cache Result" (or "Limit column size to threshold").
* This forces the driver to "stream" the rows directly to Power BI instead of buffering 200 million rows in Windows memory.
4. StarRocks query_timeout
Check if the query itself is timing out.
* Action: Run SHOW VARIABLES LIKE 'query_timeout';. If the default is 300 (5 minutes), and your 150 million rows took exactly 5 minutes to load, the query was killed by the StarRocks scheduler.
* The Fix:
sql
SET GLOBAL query_timeout = 7200; -- Set to 2 hours
5. Verify the "Audit Log"
To confirm if StarRocks actually finished the query or if it was killed/timed out:
1. Go to your StarRocks FE node.
2. Check the fe/log/fe.audit.log.
3. Find your specific query. Look at the State column.
* If it says EOF or FINISHED, StarRocks thinks it sent everything.
* If it says ERR or CANCELLED, StarRocks stopped early.
6. Recommended Connectivity
For 200 million rows, the standard ODBC/MySQL protocol is very inefficient.
* Switch to Arrow Flight SQL: If you are on StarRocks v3.2+, use the Arrow Flight SQL connector. it is designed for high-speed, parallel data transfer and is far more stable for datasets of this size.
* StarRocks Power BI Connector: Use the official .mez connector which handles StarRocks-specific metadata better than a generic ODBC driver.
Recommendation: Start by increasing net_write_timeout to 3600 and enabling "Don't Cache Result" in the ODBC driver. These two changes solve the majority of "silent truncation" issues.
References
• quick_start/shared-nothing.md
• release_notes/release-3.3.md
• release_notes/release-2.1.md
• release_notes/release-2.5.mdZurab Kiknavelidze
10/12/2026, 7:30 AMRocky
10/12/2026, 7:30 AMnet_write_timeout (Most Likely Fix)
StarRocks has a default net_write_timeout of 60 seconds. If Power BI takes more than 60 seconds to pull a specific batch of data (common with 200M rows), StarRocks will drop the connection.
* The Fix: Run this command on your StarRocks cluster to give the transfer more time:
sql
SET GLOBAL net_write_timeout = 3600; -- Set to 1 hour
2. Check query_timeout
If the loading process stops after exactly 5 minutes (300s), you have hit the default query timeout.
* The Fix:
sql
SET GLOBAL query_timeout = 7200; -- Set to 2 hours
3. ODBC Driver "Streaming" Mode
Generic MySQL ODBC drivers often try to cache the entire result set in Windows memory before passing it to Power BI. For 200 million rows, this will likely hit a local memory limit or a driver buffer limit.
* The Fix: In your ODBC Data Source Administrator (DSN) settings:
* Enable "Don't Cache Results" (sometimes called "Streaming").
* This forces the driver to pass rows to Power BI immediately instead of trying to hold all 200 million in memory.
4. Recommended: Switch to Arrow Flight SQL
For datasets of this scale (200M+ rows), the standard MySQL/ODBC protocol is extremely slow and prone to the issues you are seeing. StarRocks now supports Arrow Flight SQL, which provides high-speed, parallel, columnar data transfer.
* Advantage: It can be up to 10x faster for Power BI imports and is much more stable for massive datasets.
* How to use: Follow the StarRocks Arrow Flight SQL Guide. You will need to install the Arrow Flight SQL driver on your Power BI machine.
5. Verify the Audit Log
To be 100% sure why StarRocks stopped sending data, check the FE audit log on your StarRocks leader node (fe/log/fe.audit.log).
* Find the query and check the State column.
* If it says ERR or CANCELLED, it will often provide the specific reason (e.g., "Slow sink" or "Timeout").
References
• integrations/BI_integrations/QuickBI.md
• integrations/integrations.mdx
• cover_pages/bi_tools.mdx
• integrations/BI_integrations/Querybook.md
• integrations/BI_integrations/FineBI.md
• integrations/BI_integrations/Hex.md
• integrations/BI_integrations/Rill.md
• integrations/BI_integrations/Superset.mdZurab Kiknavelidze
10/12/2026, 7:32 AMRocky
10/12/2026, 7:32 AMnet_write_timeout (Default 60s): This is the time StarRocks waits for the client to "pick up" the data packets. If Power BI is busy processing or compressing the 150 million rows it just received and stops reading from the network socket for more than 60 seconds, StarRocks will drop the connection. This is the most common cause of "silent truncation" in large imports.
2. wait_timeout (Default 8 hours): This is the one that waits for a new request. If the connection is sitting idle (no query running) for this long, StarRocks closes it.
3. query_timeout (Default 300s / 5 mins): This is the maximum time the entire query is allowed to run. If your 200M row transfer takes 6 minutes and this is set to 300s, the query will be killed at the 5-minute mark (which might happen to be around 150M rows).
Why you see 150M instead of 200M
When one of these timeouts is hit, the connection is severed. Because of how the MySQL ODBC driver works, it often doesn't report an "error" to Power BI; it simply assumes the stream ended normally and hands the 150M rows it did get to the report.
Recommendations to fix the 150M/200M gap:
* Increase both timeouts immediately:
Run this in your StarRocks console before starting the Power BI import:
sql
SET GLOBAL net_write_timeout = 3600; -- 1 hour
SET GLOBAL query_timeout = 7200; -- 2 hours
* ODBC "Don't Cache" Setting:
In your Windows ODBC Data Source Administrator, go to Details > Options and check "Don't Cache Result". By default, the driver tries to buffer the result set in your computer's RAM. If you hit a memory limit at 150M rows, the driver may stop fetching. Enabling this option tells the driver to "stream" the data directly to Power BI.
* Check the Audit Log:
To confirm exactly why it stopped, look at the fe/log/fe.audit.log on your StarRocks leader node. Search for that query and look at the State and QueryTime columns. If it says ERR or CANCELLED, you’ll know it was a timeout.
Summary: net_write_timeout is for "the client is too slow to receive," while wait_timeout is for "the client hasn't asked for anything in a while." For your 200M row issue, net_write_timeout and query_timeout are the critical ones.
References
• faq/operation_maintenance_faq.md
• administration/management/resource_management/Query_management.md
• administration/management/monitor_manage_big_queries.md
• sql-reference/System_limit.md
• release_notes/release-2.4.mdZurab Kiknavelidze
10/12/2026, 7:33 AMRocky
10/12/2026, 7:34 AMquery_timeout is a "Total Budget," not "Per Batch"
The query_timeout (default 300 seconds) starts the moment Power BI sends the SQL command and does not reset when a new batch of 10k rows is fetched.
* The Math: If fetching and processing each 10k batch takes 0.03 seconds, you can only fetch ~100 million rows before the 300-second timer runs out.
* Result: StarRocks kills the query at the 5-minute mark. Because you are using an ODBC cursor, the driver often sees the "Kill" as a simple "End of Data" and tells Power BI "That's all the rows!" without throwing an error. This is why you see exactly 150M instead of 200M.
2. The "Slow Client" Problem (net_write_timeout)
Even if the StarRocks documentation says net_write_timeout has "no practical usage," in practice, StarRocks backends (BE) have internal RPC buffers.
* If Power BI is slow to process a 10k batch (e.g., it's doing heavy compression or your RAM is full), the StarRocks BE nodes are forced to wait.
* If the internal buffer (brpc_socket_max_unwritten_bytes) fills up because the client isn't "pulling" fast enough, the connection can be dropped.
3. ODBC vs. Arrow Flight
The MySQL/ODBC protocol is "chatty." Fetching 10k rows at a time for 200 million rows requires 20,000 round-trips between your computer and StarRocks. This overhead significantly inflates the total query time, making you hit the query_timeout much faster than a single large stream would.
──────────
How to fix this specifically for 10k batching:
1. Increase the Total Budget (Mandatory):
You must give the query enough time to finish all those 10k round-trips.
sql
-- Set to 2 hours (7200 seconds) to be safe
SET GLOBAL query_timeout = 7200;
2. Increase BE Buffers:
If you have access to the be.conf, ensure the socket buffer is large enough to handle the backup of data while the client is busy:
properties
brpc_socket_max_unwritten_bytes = 1073741824 -- 1GB
3. Check Power BI "Import" Limits:
If you are using Power BI Pro, there is a 1 GB limit on the total dataset size. If 150 million rows happen to hit roughly 1 GB of compressed data, Power BI may stop the import itself.
4. The "Pro" Solution: Arrow Flight SQL
For 200 million rows, stop using the MySQL ODBC driver. Switch to the StarRocks Arrow Flight SQL driver. It transfers data in large columnar chunks (much larger than 10k) and is designed specifically to prevent these "silent truncation" issues during massive data transfers.
To verify: Run your query, then immediately run SHOW PROC '/queries' in StarRocks. Look for your query and check if the State is FINISHED or CANCELLED. If it's CANCELLED, it will tell you if it hit a timeout or a memory limit.
References
• unloading/arrow_flight.mdZurab Kiknavelidze
10/12/2026, 7:36 AMRocky
10/12/2026, 7:36 AMquery_timeout or net_write_timeout, it kills the query and closes the network socket.
* The Driver's Perspective: The ODBC driver is asking for the "next 10k rows." Suddenly, the socket closes. Instead of reporting a "Fatal Error," many versions of the MySQL/MariaDB ODBC driver interpret a closed connection as a "Clean EOF" (End of File).
* Power BI's Perspective: Power BI asks the driver, "Is there more data?" The driver says, "No, that’s all I got," because the connection is gone. Power BI assumes the 150M rows were the entire table and marks the refresh as "Success."
How to make it throw an error
To stop this from being a "silent" success and force an actual error, you have a few options:
1. Set a "Command Timeout" in Power BI (Best for Errors)
By default, Power BI’s "Command Timeout" is often blank (unlimited) or very high, allowing the driver to fail first. You can force Power BI to monitor the clock:
1. In Power BI Desktop, go to Get Data > MySQL database (or ODBC).
2. Enter your Server/Database.
3. Expand Advanced options.
4. In Command timeout in minutes, enter a value (e.g., 120).
_ _Note:* Set this to be shorter than your StarRocks query_timeout. If Power BI's timer runs out first, it will explicitly throw an "Execution Timeout Expired" error instead of letting the driver guess.
2. Verify the "True" Error in StarRocks
StarRocks does throw an error; the driver just isn't passing it to you. You can find the real error message by checking the FE Audit Log:
* Location: fe/log/fe.audit.log on your leader FE node.
* What to look for: Find your query (search for the table name). Look at the State column. It will likely say EOF or ERR. The ErrorCode and ErrorMsg columns will tell you exactly what happened (e.g., [CANCEL] Query exceeded time limit).
3. Use "Arrow Flight SQL" (The Real Fix)
The MySQL ODBC protocol was never designed to stream 200 million rows. Arrow Flight SQL is a modern protocol designed for exactly this.
* Error Handling: It has much stricter "Fast-Fail" mechanics. If the connection drops or a timeout occurs, it will immediately throw a clear gRPC error to Power BI rather than truncating the data.
* Speed: It is significantly faster for large imports because it skips the "row-by-row" translation that ODBC does.
4. Driver Setting: "Return matched rows instead of affected rows"
In your Windows ODBC Data Source Administrator, check the configuration of your DSN:
* Under Details > Cursors/Results, ensure "Don't cache results" is enabled.
* Some drivers have an "Enable Safe Metadata" or "Force Error on Truncation" option, but these are inconsistent across driver versions.
Summary: To guarantee an error, the most reliable way is to set the Command Timeout in the Power BI connection settings so that Power BI kills the process itself if it takes too long.
References
• unloading/arrow_flight.md
• administration/management/FE_configuration.md
• faq/Sql_faq.md
• administration/management/resource_management/Query_management.md
• administration/management/monitoring/Monitor_and_Alert.md
• sql-reference/System_variable.md
• faq/operation_maintenance_faq.mdRocky
10/12/2026, 7:36 AMZurab Kiknavelidze
10/12/2026, 7:43 AMRocky
10/12/2026, 7:43 AMSET query_timeout = 7200; to give your large import more time:
* The moment the driver "automatically reconnects," you get a brand-new session.
* That new session reverts to the default 300-second timeout.
* If your import takes 10 minutes, it will keep timing out every 5 minutes, reconnecting, and giving you incomplete data without ever telling you why.
3. It hides the "Smoke"
When this setting is OFF, the moment StarRocks drops the connection, the ODBC driver will throw a "Communication Link Failure" or "Connection Lost" error. Power BI will then show a big red "X" and fail the refresh.
* This is actually what you want. A failed refresh tells you something is wrong.
* With it ON, you get a "Success" message but missing data, which is much more dangerous for business reporting.
──────────
What you should do:
1. Turn OFF "Enable Automatic Reconnect" in your ODBC DSN settings. You want the system to fail loudly if there is a timeout.
2. Manually increase the timeouts in StarRocks for the user Power BI is connecting with. Since you can't rely on session variables if a connection flakes, set them globally or via a Resource Group:
sql
-- Run this as an admin to ensure it sticks
SET GLOBAL query_timeout = 7200;
SET GLOBAL net_write_timeout = 3600;
3. Check the StarRocks Audit Log:
Now that you’ve turned off auto-reconnect, if it fails again, check the fe/log/fe.audit.log. It will finally show a clear CANCEL or TIMEOUT status for that specific query, confirming exactly which limit you hit.
Summary: "Enable Automatic Reconnect" is designed for small, intermittent web requests, not for streaming 200 million rows. For massive data transfers, it is better to have a stable, long-running connection that fails explicitly if interrupted.
References
• faq/Sql_faq.md
• sql-reference/System_variable.md
• administration/management/resource_management/Query_management.md
• unloading/arrow_flight.md
• administration/management/monitoring/Monitor_and_Alert.md
• administration/management/FE_configuration.md
• administration/management/monitor_manage_big_queries.md
• faq/operation_maintenance_faq.md
References
• faq/operation_maintenance_faq.md
• sql-reference/System_variable.md
• administration/management/FE_configuration.mdRocky
10/12/2026, 7:43 AM