Skip to content
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

[Question] Why the java sdk tablesImpl doesn't have create table API #400

Open
zymap opened this issue Jan 15, 2025 · 1 comment
Open

[Question] Why the java sdk tablesImpl doesn't have create table API #400

zymap opened this issue Jan 15, 2025 · 1 comment

Comments

@zymap
Copy link

zymap commented Jan 15, 2025

Description

I want to use the WorkspaceClient to use the table api to communicate with the unity catalog, but I found there is no create table api in the databricks sdk.
So my question is, how to create the table using the sdk? is there any special reason?

@zymap zymap changed the title [Question] Why the java sdk tablesImpl doens't have create table API [Question] Why the java sdk tablesImpl doesn't have create table API Jan 15, 2025
@thomaseadiealloy
Copy link

thomaseadiealloy commented Jan 21, 2025

I'm in the same boat. From the javadocs it mentions the permissions required to create a table but the method doesn't actually exist.

I'd also expect there to be a CreateTableRequest class, but there is not.

As a workaround it may be necessary to just run a SQL statement:

workspaceClient.statementExecution().executeStatement("CREATE TABLE <catalog>.<schema>.<table>", warehouseId);

It looks like this is a limitation of the Databricks API, it also confusingly doesn't have a method to create tables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants