-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#3001] docs(spark-connector): add spark connector document #3018
Conversation
3. Execute the spark sql query. | ||
|
||
Suppose there are two catalogs in the metalake `test`, `hive` and `iceberg`, and the table `hive_table1` in the catalog `hive`, and the table `iceberg_table1` in the catalog `iceberg`. | ||
```sql |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add blank line between paragraphs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
use hive; | ||
select * from db.hive_table1; | ||
``` | ||
:::info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
select * from db.hive_table1; | ||
``` | ||
:::info | ||
The command SHOW CATALOGS will only display the Spark default catalog, named spark_catalog, due to limitations within the Spark catalog manager. It does not list the catalogs present in the metalake. However, after explicitly using the USING CATALOG command with a specific catalog name, that catalog name then becomes visible in the output of SHOW CATALOGS. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use backquotes "`" in "SHOW CATALOGS".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This software is licensed under the Apache License version 2." | ||
--- | ||
|
||
With the Gravitino Spark connector, accessing data or managing metadata in Hive catalogs becomes straightforward, enabling seamless federation queries across different Hive catalogs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have some Hive or Iceberg specific configurations that should be listed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, the configurations are retrivied from Gravitino server.
[ COMMENT table_comment ] | ||
[ TBLPROPERTIES ( key1=val1, key2=val2, ... ) ] | ||
[ AS select_statement ] | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you need to add more SQL examples about DDL, DML and DQL to show users how to use it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
```sql | ||
select * from hive.db.hive_table1 union all select * from iceberg.db.iceberg_table1; | ||
use hive; | ||
select * from db.hive_table1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uppercase all the SQL reserved words.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
…ache#3018) ### What changes were proposed in this pull request? add spark connector document ### Why are the changes needed? Fix: apache#3001 ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? document
What changes were proposed in this pull request?
add spark connector document
Why are the changes needed?
Fix: #3001
Does this PR introduce any user-facing change?
no
How was this patch tested?
document