-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b26feec
commit 051fa5d
Showing
8 changed files
with
124 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
src/main/java/net/snowflake/ingest/streaming/internal/RefreshTableInformationRequest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package net.snowflake.ingest.streaming.internal; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class RefreshTableInformationRequest implements IStreamingIngestRequest { | ||
@JsonProperty("database") | ||
private String dbName; | ||
|
||
@JsonProperty("schema") | ||
private String schemaName; | ||
|
||
@JsonProperty("table") | ||
private String tableName; | ||
|
||
@JsonProperty("role") | ||
private String role; | ||
|
||
@JsonProperty("is_iceberg") | ||
private boolean isIceberg; | ||
|
||
public RefreshTableInformationRequest(TableRef tableRef, String role, boolean isIceberg) { | ||
this.dbName = tableRef.dbName; | ||
this.schemaName = tableRef.schemaName; | ||
this.tableName = tableRef.tableName; | ||
this.role = role; | ||
this.isIceberg = isIceberg; | ||
} | ||
|
||
String getDBName() { | ||
return this.dbName; | ||
} | ||
|
||
String getSchemaName() { | ||
return this.schemaName; | ||
} | ||
|
||
String getTableName() { | ||
return this.tableName; | ||
} | ||
|
||
String getRole() { | ||
return this.role; | ||
} | ||
|
||
boolean getIsIceberg() { | ||
return this.isIceberg; | ||
} | ||
|
||
@Override | ||
public String getStringForLogging() { | ||
return String.format( | ||
"RefreshTableInformation(db=%s, schema=%s, table=%s, role=%s, isIceberg=%s)", | ||
dbName, schemaName, tableName, role, isIceberg); | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/net/snowflake/ingest/streaming/internal/RefreshTableInformationResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package net.snowflake.ingest.streaming.internal; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class RefreshTableInformationResponse extends StreamingIngestResponse { | ||
@JsonProperty("status_code") | ||
private Long statusCode; | ||
|
||
@JsonProperty("message") | ||
private String message; | ||
|
||
@JsonProperty("iceberg_location") | ||
private FileLocationInfo icebergLocationInfo; | ||
|
||
@Override | ||
Long getStatusCode() { | ||
return this.statusCode; | ||
} | ||
|
||
String getMessage() { | ||
return this.message; | ||
} | ||
|
||
FileLocationInfo getIcebergLocationInfo() { | ||
return this.icebergLocationInfo; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters