Skip to content

Commit

Permalink
adding in StarRocks connection information (#315)
Browse files Browse the repository at this point in the history
Signed-off-by: alberttwong <[email protected]>

Update starrocks.md

correcting syntax for starrocks

Update sidebars.js

adding starrocks page.
  • Loading branch information
alberttwong authored Feb 1, 2024
1 parent a1736a1 commit cd04bac
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
70 changes: 70 additions & 0 deletions website/docs/starrocks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
sidebar_position: 8
title: "StarRocks"
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Querying from StarRocks

StarRocks allows you to query table formats like Hudi, Delta and Iceberg tables using our [external catalog](https://docs.starrocks.io/docs/data_source/catalog/catalog_overview/) feature.
Users do not need additional configurations to work with OneTable synced tables.

For more information and required configurations refer to:
* [Hudi Catalog](https://docs.starrocks.io/docs/data_source/catalog/hudi_catalog/)
* [Delta Lake Catalog](https://docs.starrocks.io/docs/data_source/catalog/deltalake_catalog/)
* [Iceberg Catalog](https://docs.starrocks.io/docs/data_source/catalog/iceberg_catalog/)

For hands on experimentation, please follow [Creating your first interoperable table](/docs/how-to#create-dataset)
to create OneTable synced tables followed by [Hive Metastore](/docs/hms) to register the target table
in Hive Metastore. Once done, please follow the below high level steps:
1. Start the StarRocks server
2. From the directory where you have installed mysql-cli: login by running `mysql -P 9030 -h 127.0.0.1 -u root --prompt="StarRocks > "`.

<Tabs
groupId="table-format"
defaultValue="hudi"
values={[
{ label: 'targetFormat: HUDI', value: 'hudi', },
{ label: 'targetFormat: DELTA', value: 'delta', },
{ label: 'targetFormat: ICEBERG', value: 'iceberg', },
]}
>
<TabItem value="hudi">
:::tip Note:
If you are following the example from [Hive Metastore](/docs/hms), you can query the OneTable synced Hudi table
from StarRocks using the below query.
```sql md title="sql"
CREATE EXTERNAL CATALOG unified_catalog_hms PROPERTIES ("type" = "unified","unified.metastore.type" = "hive", "hive.metastore.uris" = "thrift://hivemetastore:9083" );
SELECT * FROM unified_catalog_hms.hudi_db.<table_name>;
```
:::

</TabItem>
<TabItem value="delta">

:::tip Note:
If you are following the example from [Hive Metastore](/docs/hms), you can query the OneTable synced Delta table
from StarRocks using the below query.
```sql md title="sql"
CREATE EXTERNAL CATALOG unified_catalog_hms PROPERTIES ("type" = "unified","unified.metastore.type" = "hive", "hive.metastore.uris" = "thrift://hivemetastore:9083" );
SELECT * FROM unified_catalog_hms.delta_db.<table_name>;
```
:::

</TabItem>
<TabItem value="iceberg">

:::tip Note:
If you are following the example from [Hive Metastore](/docs/hms), you can query the OneTable synced Iceberg table
from StarRocks using the below query.
```sql md title="sql"
CREATE EXTERNAL CATALOG unified_catalog_hms PROPERTIES ("type" = "unified","unified.metastore.type" = "hive", "hive.metastore.uris" = "thrift://hivemetastore:9083" );
SELECT * FROM unified_catalog_hms.iceberg_db.<table_name>;
```
:::

</TabItem>
</Tabs>
3 changes: 2 additions & 1 deletion website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ module.exports = {
'fabric',
'presto',
'snowflake',
'starrocks',
'trino',
],
}
]
},
'demo/docker',
],
};
};

0 comments on commit cd04bac

Please sign in to comment.