|
| 1 | +--- |
| 2 | +displayed_sidebar: docs |
| 3 | +toc_max_heading_level: 4 |
| 4 | +keywords: ['StarRocks', 'translation test', 'Iceberg', 'Hive'] |
| 5 | +--- |
| 6 | + |
1 | 7 | # Sample Markdown Document |
2 | 8 |
|
3 | 9 | If you define configuration items in the custom catalog and want configuration items to take effect when you query data, you can add the configuration items to the `PROPERTIES` parameter as key-value pairs when you create an external table. For example, if you define a configuration item `custom-catalog.properties` in the custom catalog, you can run the following command to create an external table. |
@@ -339,3 +345,159 @@ insert into external_t select * from other_table; |
339 | 345 | - [ALTER TABLE](ALTER_TABLE.md) |
340 | 346 | - [DROP TABLE](DROP_TABLE.md) |
341 | 347 |
|
| 348 | +## HTML in Table Cells |
| 349 | + |
| 350 | +Some StarRocks docs use HTML inside Markdown table cells to support complex multi-item content. The HTML tags must be preserved exactly: |
| 351 | + |
| 352 | +| External Data Source | Supported Scenarios | Stable Versions | |
| 353 | +| :------------------- | :------------------ | :-------------- | |
| 354 | +| Hive | <ul><li>Non-partitioned table: v2.5.4 & v3.0+</li><li>DATE and DATETIME-type partition: v2.5.4 & v3.0+</li><li>STRING-type Partition Key to DATE: v3.1.4+</li></ul> | v2.5.13+<br />v3.0.6+<br />v3.1.5+ | |
| 355 | +| Iceberg | <ul><li>Non-partitioned table: v3.0+</li><li>Partition Transform: v3.2.3</li><li>Partition-level refresh: v3.1.7 & v3.2.3</li></ul> | v3.1.5+<br />v3.2+ | |
| 356 | + |
| 357 | +Cells may also contain inline HTML: set the `index` parameter to <code class="language-text">hello*</code> to retrieve all indexes whose names start with `hello`. |
| 358 | + |
| 359 | +## Tilde Fence Code Blocks |
| 360 | + |
| 361 | +Some older StarRocks docs use tilde fences (~~~) instead of backtick fences. These must be processed correctly: |
| 362 | + |
| 363 | +~~~SQL |
| 364 | +CREATE TABLE tbl (k1 int, v1 int sum) |
| 365 | +DISTRIBUTED BY HASH(k1) |
| 366 | +BUCKETS 8 |
| 367 | +PROPERTIES( |
| 368 | + "colocate_with" = "group1" |
| 369 | +); |
| 370 | +~~~ |
| 371 | + |
| 372 | +~~~Plain Text |
| 373 | +SHOW PROC '/colocation_group'; |
| 374 | +~~~ |
| 375 | + |
| 376 | +## MDX Imports and JSX Components |
| 377 | + |
| 378 | +StarRocks MDX files use Docusaurus Tabs components for multi-platform documentation: |
| 379 | + |
| 380 | +import Tabs from '@theme/Tabs'; |
| 381 | +import TabItem from '@theme/TabItem'; |
| 382 | + |
| 383 | +<Tabs groupId="storage"> |
| 384 | +<TabItem value="AWS" label="AWS S3" default> |
| 385 | + |
| 386 | +Configure your StarRocks cluster to access AWS S3 storage. Choose one of the following authentication methods: |
| 387 | + |
| 388 | +- Instance profile (recommended for production) |
| 389 | +- Assumed role |
| 390 | +- IAM user |
| 391 | + |
| 392 | +</TabItem> |
| 393 | + |
| 394 | +<TabItem value="HDFS" label="HDFS"> |
| 395 | + |
| 396 | +Configure your StarRocks cluster to access HDFS storage. |
| 397 | + |
| 398 | +:::tip |
| 399 | + |
| 400 | +If an error indicating an unknown host is returned when you send a query, add the mapping between host names and IP addresses of your HDFS cluster nodes to the **/etc/hosts** file. |
| 401 | + |
| 402 | +::: |
| 403 | + |
| 404 | +</TabItem> |
| 405 | +</Tabs> |
| 406 | + |
| 407 | +## Template Variables in Code |
| 408 | + |
| 409 | +Integration docs for Airflow and dbt use double-brace template syntax inside code blocks. These must not be translated: |
| 410 | + |
| 411 | +```sql |
| 412 | +-- Load new rows since the last run |
| 413 | +SELECT * |
| 414 | +FROM source_table |
| 415 | +WHERE loaded_at >= '{{ data_interval_start }}' |
| 416 | + AND loaded_at < '{{ data_interval_end }}' |
| 417 | + AND record_id NOT IN (SELECT record_id FROM target_table) |
| 418 | +``` |
| 419 | + |
| 420 | +The dbt `config` block uses the same double-brace syntax: |
| 421 | + |
| 422 | +```sql |
| 423 | +{{ config( |
| 424 | + materialized='table', |
| 425 | + indexes=[{"columns":["order_id"]}] |
| 426 | +)}} |
| 427 | + |
| 428 | +SELECT * FROM {{ source('your_source', 'orders') }} |
| 429 | +JOIN {{ source('your_source', 'users') }} USING (user_id) |
| 430 | +``` |
| 431 | + |
| 432 | +## HTML Comparison Table |
| 433 | + |
| 434 | +Data lake documentation uses full HTML tables with colspan for comparison grids: |
| 435 | + |
| 436 | +<table> |
| 437 | + <thead> |
| 438 | + <tr> |
| 439 | + <th> </th> |
| 440 | + <th>Data Cache</th> |
| 441 | + <th>Materialized view</th> |
| 442 | + <th>Native table</th> |
| 443 | + </tr> |
| 444 | + </thead> |
| 445 | + <tbody> |
| 446 | + <tr> |
| 447 | + <td><b>Data loading and updates</b></td> |
| 448 | + <td>Queries automatically trigger data caching.</td> |
| 449 | + <td>Refresh tasks are triggered automatically or manually.</td> |
| 450 | + <td>Supports various import methods but requires manual maintenance.</td> |
| 451 | + </tr> |
| 452 | + <tr> |
| 453 | + <td><b>Query performance</b></td> |
| 454 | + <td colspan="3">Data Cache ≤ Materialized view = Native table</td> |
| 455 | + </tr> |
| 456 | + </tbody> |
| 457 | +</table> |
| 458 | + |
| 459 | +## Admonition Inside a Numbered List |
| 460 | + |
| 461 | +When an admonition appears inside a numbered list item, its indentation must be preserved: |
| 462 | + |
| 463 | +1. Create the database and schema in StarRocks. |
| 464 | + |
| 465 | +2. Load your data into the staging table. |
| 466 | + |
| 467 | + :::note |
| 468 | + Ensure that the staging table schema matches the target table schema. If the schemas differ, the load job will fail with a schema mismatch error. |
| 469 | + ::: |
| 470 | + |
| 471 | +3. Insert data from the staging table into the target table. |
| 472 | + |
| 473 | + :::caution |
| 474 | + Running INSERT OVERWRITE replaces all existing data in the target partition. Verify your filter conditions before executing. |
| 475 | + ::: |
| 476 | + |
| 477 | +4. Verify the row counts match between staging and target. |
| 478 | + |
| 479 | +## Details Block |
| 480 | + |
| 481 | +The HTML `<details>` element creates a collapsible section. Content indentation must be preserved: |
| 482 | + |
| 483 | +<details> |
| 484 | +<summary>Advanced configuration options</summary> |
| 485 | + |
| 486 | +- `max_scan_key_num`: Maximum number of scan keys evaluated per query (default: 1024). |
| 487 | +- `enable_profile`: Enable query profile collection for performance analysis (default: false). |
| 488 | +- `query_timeout`: Maximum query execution time in seconds before cancellation (default: 300). |
| 489 | + |
| 490 | +</details> |
| 491 | + |
| 492 | +## Cross-References with Anchors |
| 493 | + |
| 494 | +Links with relative paths and in-page anchors must have their URL portion preserved unchanged: |
| 495 | + |
| 496 | +For more information, see the following resources: |
| 497 | + |
| 498 | +- [Query Planning](../best_practices/query_tuning/query_planning.md) |
| 499 | +- [JOIN Operations](../sql-reference/sql-statements/table_bucket_part_index/SELECT/SELECT.md#join) |
| 500 | +- [ALTER RESOURCE](../sql-reference/sql-statements/Resource/ALTER_RESOURCE.md) |
| 501 | +- [Data type mapping](External_table.md#Data-type-mapping) |
| 502 | +- [Iceberg catalog](./catalog/iceberg/iceberg_catalog.md) |
| 503 | + |
0 commit comments