Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
3772078
docs: add Java SDK nomenclature cleanup design spec
Devesh-Skyflow May 13, 2026
9afb24a
docs: clarify tokenizedData reasoning in nomenclature cleanup spec
Devesh-Skyflow May 13, 2026
850eedb
docs: expand reasoning in Java nomenclature cleanup spec
Devesh-Skyflow May 13, 2026
ea9efb2
docs: correct tokenizedData implementation rationale in spec
Devesh-Skyflow May 13, 2026
54cb54b
docs: remove tokenizedData from scope in nomenclature cleanup spec
Devesh-Skyflow May 13, 2026
5e484d9
docs: add implementation plan for Java SDK nomenclature cleanup
Devesh-Skyflow May 13, 2026
96e7e39
feat: accept clientId/keyId/tokenUri in BearerToken with fallback to …
Devesh-Skyflow May 13, 2026
c46ced7
feat: accept clientId/keyId in SignedDataTokens with fallback to old …
Devesh-Skyflow May 13, 2026
16e6ef5
feat: normalise skyflow_id to skyflowId in Get and Query response maps
Devesh-Skyflow May 13, 2026
77d2424
feat: add getErrors() accessor to QueryResponse
Devesh-Skyflow May 14, 2026
54b500a
chore: audit confirms no setFooID/getFooID violations in public API
Devesh-Skyflow May 14, 2026
33d6c22
chore: add Claude Code setup (CLAUDE.md + .claude/)
Devesh-Skyflow May 14, 2026
f4d71ae
chore: fix gaps and inaccuracies in Claude setup files
Devesh-Skyflow May 14, 2026
93a1150
docs: add v2 backward compat + deprecation warnings implementation plan
Devesh-Skyflow May 14, 2026
fd07ab6
docs: update deprecation messages to say 'upcoming release' not 'v3'
Devesh-Skyflow May 14, 2026
6c1de31
docs: add [DEPRECATED] prefix to deprecation log messages per industr…
Devesh-Skyflow May 14, 2026
de6e4b4
docs: add PM-facing document for v2 public interface changes and depr…
Devesh-Skyflow May 14, 2026
541da95
docs: add downloadURL→downloadUrl deprecation to plan and PM doc
Devesh-Skyflow May 14, 2026
bf8f83e
fix: remove SDK-level field value null/empty validation from Insert a…
Devesh-Skyflow May 14, 2026
8112876
docs: add IDE autocomplete behavior for deprecation signals
Devesh-Skyflow May 14, 2026
57fd8f6
chore: segregate code smells into dedicated section in code-review co…
Devesh-Skyflow May 14, 2026
de2da94
chore: add DEPRECATED_SKYFLOW_ID_KEY log entry to InfoLogs
Devesh-Skyflow May 18, 2026
938f566
fix: restore skyflow_id key in Get/Query responses for v2 backward co…
Devesh-Skyflow May 18, 2026
4c3b998
docs: add deprecation Javadoc for skyflow_id key in GetResponse and Q…
Devesh-Skyflow May 18, 2026
8a1744a
feat: deprecate downloadURL in favour of downloadUrl in GetRequest an…
Devesh-Skyflow May 18, 2026
92bcf33
chore: update CLAUDE.md — add code-smell command, update slash commands
Devesh-Skyflow May 18, 2026
dbdcc07
docs: update deprecation plan and PM doc - credentials permanently su…
Devesh-Skyflow May 18, 2026
5b57857
test: add new-form downloadUrl tests alongside deprecated downloadURL…
Devesh-Skyflow May 18, 2026
008f4ba
fix: changes to claude
Devesh-Skyflow May 18, 2026
b9f0e00
docs: migrate V1-to-V2 guide from README to docs/, update CHANGELOG
Devesh-Skyflow May 18, 2026
fa7a0fc
docs: simplify CHANGELOG — remove v1 entries, keep only v2.0.4
Devesh-Skyflow May 18, 2026
927e1be
docs: simplify CHANGELOG to point to GitHub and Maven releases
Devesh-Skyflow May 18, 2026
673e57b
docs: add v2 banner to README with migration link and EOL notice
Devesh-Skyflow May 18, 2026
18821fc
docs: use release notes link instead of CHANGELOG in banner
Devesh-Skyflow May 18, 2026
37a1c95
docs: update README banner to v2.1.x announcement
Devesh-Skyflow May 18, 2026
a83a28a
revert: remove .claude/ and CLAUDE.md — will be raised as separate PR…
Devesh-Skyflow May 18, 2026
06e55a1
chore: remove superpowers planning docs from repo
Devesh-Skyflow May 18, 2026
a08edf9
chore: ignore docs/superpowers/ — keep planning docs local only
Devesh-Skyflow May 18, 2026
566d9a9
chore: update cspell config — British English words, Maven flags, ign…
Devesh-Skyflow May 18, 2026
5734333
chore: remove v2-public-interface-changes.md
Devesh-Skyflow May 18, 2026
5acbb84
fix: replace real RSA key with fake key in BearerTokenTests
Devesh-Skyflow May 18, 2026
a802668
fix: guard against null in DetokenizeRequest.downloadUrl(null)
Devesh-Skyflow May 18, 2026
40b53de
chore: remove dead error constants after validation removal
Devesh-Skyflow May 18, 2026
bff8b52
Revert "fix: guard against null in DetokenizeRequest.downloadUrl(null)"
Devesh-Skyflow May 18, 2026
ee167b4
test: add positive tests for permissive Insert validation behaviour
Devesh-Skyflow May 18, 2026
6b6c25d
fix banner
Devesh-Skyflow May 19, 2026
48d08c8
feat: port PR #273 changes — raw body support, URL encoding, null-saf…
Devesh-Skyflow May 19, 2026
033c061
fix: guard unsafe Optional.get() calls and remove dead statement in D…
Devesh-Skyflow May 19, 2026
975dfba
fix: guard Optional.get() in delete, close FileReader, guard empty fo…
Devesh-Skyflow May 20, 2026
3406eaa
docs: update README for v2.1 public interface changes
Devesh-Skyflow May 20, 2026
2740de4
fix: do not generate SDK-side requestId when server omits x-request-i…
Devesh-Skyflow May 20, 2026
88cec18
feat: add printWarningLogOnce to suppress per-record deprecation spam
Devesh-Skyflow May 20, 2026
8c292d2
test: fix testSendRequestWithNullRequestId to assert null requestId
Devesh-Skyflow May 20, 2026
8cf3cd1
docs: fix request_index to requestIndex in README response examples
Devesh-Skyflow May 20, 2026
f90c75d
fix: readme
Devesh-Skyflow May 20, 2026
6727625
docs: add v2.1.0 upgrade banner and migration guide to v1 README (#310)
Devesh-Skyflow May 20, 2026
726735c
feat: accept camelCase skyflowId in UpdateRequest and fire deprecatio…
Devesh-Skyflow May 20, 2026
ef38806
Revert "docs: add v2.1.0 upgrade banner and migration guide to v1 REA…
Devesh-Skyflow May 20, 2026
2e34619
feat: prefer skyflowId over skyflow_id in UpdateRequest with deprecat…
Devesh-Skyflow May 21, 2026
b767c4c
feat: add getByot() as canonical form; keep getBYOT() as deprecated d…
Devesh-Skyflow May 21, 2026
e6be29b
test: add TokenModeTest covering getByot(), deprecated getBYOT() dele…
Devesh-Skyflow May 21, 2026
334f7b3
feat: emit runtime deprecation warning in getBYOT(); test that it fires
Devesh-Skyflow May 21, 2026
ddbf593
chore: merge origin/release/26.5.2 — resolve conflicts, keep per-requ…
Devesh-Skyflow May 21, 2026
9594bc4
refactor: consolidate both-keys deprecation warning into DEPRECATED_S…
Devesh-Skyflow May 21, 2026
c9f9976
Merge remote-tracking branch 'origin/main' into devesh/SK-2814-java--…
Devesh-Skyflow May 21, 2026
0065210
feat: deprecate updateLogLevel(); add setLogLevel() as canonical repl…
Devesh-Skyflow May 21, 2026
82e3856
samples: migrate UpdateExample to skyflowId; preserve deprecated skyf…
Devesh-Skyflow May 21, 2026
dfc276d
docs: update migration guide with v2.1 changes
Devesh-Skyflow May 21, 2026
3d28861
test: achieve 100% instruction/branch coverage on all public interfaces
Devesh-Skyflow May 21, 2026
0367ab7
fix: emit DEPRECATED_SKYFLOW_ID_KEY warning in getFormattedBatchInser…
Devesh-Skyflow May 21, 2026
1089293
docs: add Error Handling section to README
Devesh-Skyflow May 21, 2026
2aefccb
docs: remove redundant null-for-validation-errors notes from property…
Devesh-Skyflow May 21, 2026
b9e3557
Merge remote-tracking branch 'origin/release/26.5.2' into devesh/SK-2…
Devesh-Skyflow May 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ The Skyflow Java SDK is designed to help with integrating Skyflow into a Java ba
- [Generate scoped bearer tokens](#generate-scoped-bearer-tokens)
- [Generate signed data tokens](#generate-signed-data-tokens)
- [Bearer token expiry edge case](#bearer-token-expiry-edge-case)
- [Error Handling](#error-handling)
- [Catching SkyflowException](#catching-skyflowexception)
- [SkyflowException properties](#skyflowexception-properties)
- [Logging](#logging)
- [Reporting a Vulnerability](#reporting-a-vulnerability)

Expand Down Expand Up @@ -2786,6 +2789,48 @@ public class DetokenizeExample {
}
```

# Error Handling

The SDK uses `SkyflowException` for all errors — both client-side validation errors and server-side API errors.

## Catching SkyflowException

Wrap SDK calls in a `try/catch` block and catch `SkyflowException` to handle Skyflow-specific errors separately from unexpected exceptions:

```java
import com.skyflow.errors.SkyflowException;

try {
InsertResponse response = skyflowClient.vault().insert(insertRequest);
} catch (SkyflowException e) {
System.err.println("Skyflow error:");
System.err.println(" HTTP code : " + e.getHttpCode());
System.err.println(" Message : " + e.getMessage());
System.err.println(" Request ID: " + e.getRequestId());
System.err.println(" Details : " + e.getDetails());
} catch (Exception e) {
System.err.println("Unexpected error: " + e.getMessage());
}
```

## SkyflowException properties

| Property | Method | Description |
|---|---|---|
| HTTP status code | `getHttpCode()` | Integer status code (e.g. `400`, `404`, `500`). |
| Message | `getMessage()` | Human-readable description of the error. |
| HTTP status string | `getHttpStatus()` | Status string from the server (e.g. `"BAD_REQUEST"`). |
| gRPC code | `getGrpcCode()` | gRPC status code from the server. |
| Request ID | `getRequestId()` | The `x-request-id` header — useful for support escalations. |
| Details | `getDetails()` | `JsonArray` of additional error context from the server. Empty array for validation errors, `null` if the server response omitted the field. |

**Validation errors** (missing table name, empty token list, etc.) are thrown before any network call:
- `httpCode` is always `400`
- `requestId` and `grpcCode` are `null`
- `details` is an empty array

**API errors** are returned by the Skyflow server and have all fields populated from the response body and headers.

# Logging

The SDK provides logging with Java's built-in logging library. By default, the SDK's logging level is set to `LogLevel.ERROR`. This can be changed using the `setLogLevel(logLevel)` method, as shown below:
Expand Down
31 changes: 31 additions & 0 deletions docs/migrate_to_v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,4 +249,35 @@ Response maps now return `skyflowId` (camelCase). The legacy `skyflow_id` key is

---

## Update request data key (v2.1+)

When calling `update()`, use `skyflowId` (camelCase) as the key in the data map to identify the record. Using `skyflow_id` still works but emits a deprecation warning. If both keys are present, `skyflowId` takes precedence.

```java
HashMap<String, Object> data = new HashMap<>();
data.put("skyflowId", "<SKYFLOW_ID>"); // preferred
data.put("card_number", "<NEW_VALUE>");

UpdateRequest request = UpdateRequest.builder()
.table("<TABLE_NAME>")
.data(data)
.returnTokens(true)
.build();

skyflowClient.vault().update(request);
```

---

## Method renames (v2.1+)

The following instance methods have been renamed for consistency. The old names still work but emit deprecation warnings.

| Deprecated | Preferred |
|---|---|
| `skyflowClient.updateLogLevel(logLevel)` | `skyflowClient.setLogLevel(logLevel)` |
| `TokenMode.getBYOT()` | `TokenMode.getByot()` |

---

For the full list of changes see [CHANGELOG.md](../CHANGELOG.md).
4 changes: 2 additions & 2 deletions samples/src/main/java/com/example/vault/UpdateExample.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static void main(String[] args) throws SkyflowException {
// Step 5: Update records with TokenMode enabled
try {
HashMap<String, Object> data1 = new HashMap<>();
data1.put("skyflow_id", "<YOUR_SKYFLOW_ID>"); // Replace with the Skyflow ID of the record
data1.put("skyflowId", "<YOUR_SKYFLOW_ID>"); // Replace with the Skyflow ID of the record
data1.put("<COLUMN_NAME_1>", "<COLUMN_VALUE_1>"); // Replace with column name and value to update
data1.put("<COLUMN_NAME_2>", "<COLUMN_VALUE_2>"); // Replace with another column name and value

Expand All @@ -71,7 +71,7 @@ public static void main(String[] args) throws SkyflowException {
// Step 6: Update records with TokenMode disabled
try {
HashMap<String, Object> data2 = new HashMap<>();
data2.put("skyflow_id", "<YOUR_SKYFLOW_ID>"); // Replace with the Skyflow ID of the record
data2.put("skyflowId", "<YOUR_SKYFLOW_ID>"); // Replace with the Skyflow ID of the record
data2.put("<COLUMN_NAME_1>", "<COLUMN_VALUE_1>"); // Replace with column name and value to update
data2.put("<COLUMN_NAME_2>", "<COLUMN_VALUE_2>"); // Replace with another column name and value

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
package com.example.vault.deprecated;

import com.skyflow.Skyflow;
import com.skyflow.config.Credentials;
import com.skyflow.config.VaultConfig;
import com.skyflow.enums.Env;
import com.skyflow.enums.LogLevel;
import com.skyflow.enums.TokenMode;
import com.skyflow.errors.SkyflowException;
import com.skyflow.vault.data.UpdateRequest;
import com.skyflow.vault.data.UpdateResponse;

import java.util.HashMap;

/**
* @deprecated Pre-v2.1 pattern. The "skyflow_id" key in the data map is deprecated.
* Use "skyflowId" instead (see {@link com.example.vault.UpdateExample}).
*
* This example is retained for reference during the deprecation window.
* "skyflow_id" still works but emits a runtime warning and will be removed in a future release.
*/
@Deprecated
public class UpdateExample {
public static void main(String[] args) throws SkyflowException {
// Step 1: Set up credentials for the first vault configuration
Credentials credentials = new Credentials();
credentials.setApiKey("<YOUR_API_KEY>"); // Replace with the actual API key

// Step 2: Configure the vault
VaultConfig vaultConfig = new VaultConfig();
vaultConfig.setVaultId("<YOUR_VAULT_ID_1>"); // Replace with the ID of the vault
vaultConfig.setClusterId("<YOUR_CLUSTER_ID_1>"); // Replace with the cluster ID of the vault
vaultConfig.setEnv(Env.PROD); // Set the environment (e.g., DEV, STAGE, PROD)
vaultConfig.setCredentials(credentials); // Associate the credentials with the vault

// Step 3: Set up credentials for the Skyflow client
Credentials skyflowCredentials = new Credentials();
skyflowCredentials.setCredentialsString("<YOUR_CREDENTIALS_STRING>"); // Replace with the actual credentials string

// Step 4: Create a Skyflow client and add vault configurations
Skyflow skyflowClient = Skyflow.builder()
.setLogLevel(LogLevel.ERROR) // Enable debugging for detailed logs
.addVaultConfig(vaultConfig) // Add the vault configuration
.addSkyflowCredentials(skyflowCredentials) // Add general Skyflow credentials
.build();

// Step 5: Update records with TokenMode enabled
// DEPRECATED: use "skyflowId" key instead of "skyflow_id"
try {
HashMap<String, Object> data1 = new HashMap<>();
data1.put("skyflow_id", "<YOUR_SKYFLOW_ID>"); // @deprecated — use "skyflowId"
data1.put("<COLUMN_NAME_1>", "<COLUMN_VALUE_1>"); // Replace with column name and value to update
data1.put("<COLUMN_NAME_2>", "<COLUMN_VALUE_2>"); // Replace with another column name and value

HashMap<String, Object> tokens = new HashMap<>();
tokens.put("<COLUMN_NAME_2>", "<TOKEN_VALUE_2>"); // Replace with the token for COLUMN_NAME_2

UpdateRequest updateRequest1 = UpdateRequest.builder()
.table("<TABLE_NAME>") // Replace with the table name
.tokenMode(TokenMode.ENABLE) // Enable TokenMode for token validation
.data(data1) // Data to update
.tokens(tokens) // Provide tokens for TokenMode columns
.returnTokens(true) // Return tokens along with the update response
.build();

UpdateResponse updateResponse1 = skyflowClient.vault().update(updateRequest1); // Perform the update
System.out.println("Update Response (TokenMode Enabled): " + updateResponse1);
} catch (SkyflowException e) {
System.out.println("Error during update with TokenMode enabled:");
e.printStackTrace();
}

// Step 6: Update records with TokenMode disabled
// DEPRECATED: use "skyflowId" key instead of "skyflow_id"
try {
HashMap<String, Object> data2 = new HashMap<>();
data2.put("skyflow_id", "<YOUR_SKYFLOW_ID>"); // @deprecated — use "skyflowId"
data2.put("<COLUMN_NAME_1>", "<COLUMN_VALUE_1>"); // Replace with column name and value to update
data2.put("<COLUMN_NAME_2>", "<COLUMN_VALUE_2>"); // Replace with another column name and value

UpdateRequest updateRequest2 = UpdateRequest.builder()
.table("<TABLE_NAME>") // Replace with the table name
.tokenMode(TokenMode.DISABLE) // Disable TokenMode
.data(data2) // Data to update
.returnTokens(false) // Do not return tokens
.build();

UpdateResponse updateResponse2 = skyflowClient.vault().update(updateRequest2); // Perform the update
System.out.println("Update Response (TokenMode Disabled): " + updateResponse2);
} catch (SkyflowException e) {
System.out.println("Error during update with TokenMode disabled:" + e);
}
}
}
9 changes: 8 additions & 1 deletion src/main/java/com/skyflow/Skyflow.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,18 @@ public Skyflow updateSkyflowCredentials(Credentials credentials) throws SkyflowE
return this;
}

public Skyflow updateLogLevel(LogLevel logLevel) {
public Skyflow setLogLevel(LogLevel logLevel) {
this.builder.setLogLevel(logLevel);
return this;
}

/** @deprecated Use {@link #setLogLevel(LogLevel)} instead. */
@Deprecated(since = "2.1", forRemoval = true)
public Skyflow updateLogLevel(LogLevel logLevel) {
LogUtil.printWarningLog(InfoLogs.DEPRECATED_UPDATE_LOG_LEVEL.getLog());
return setLogLevel(logLevel);
}

public LogLevel getLogLevel() {
return this.builder.logLevel;
}
Expand Down
60 changes: 60 additions & 0 deletions src/main/java/com/skyflow/errors/SkyflowException.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,33 @@
import java.util.List;
import java.util.Map;

/**
* Exception thrown by all Skyflow SDK operations.
*
* <p>There are two broad categories of errors:
*
* <ul>
* <li><b>Validation errors</b> — caught before any network call is made (e.g. missing table,
* empty token list). These always have {@code httpCode = 400} and an empty
* {@link #getDetails()} array. {@link #getRequestId()} and {@link #getGrpcCode()} are
* {@code null}.
* <li><b>API errors</b> — returned by the Skyflow server. The HTTP status code, gRPC code,
* human-readable status string, error message, and request ID are all parsed from the
* response and available via the corresponding getters.
* </ul>
*
* <p>Typical error-handling pattern:
* <pre>{@code
* try {
* InsertResponse response = vault.insert(request);
* } catch (SkyflowException e) {
* System.err.println("HTTP " + e.getHttpCode() + " — " + e.getMessage());
* if (e.getRequestId() != null) {
* System.err.println("Request ID: " + e.getRequestId());
* }
* }
* }</pre>
*/
public class SkyflowException extends Exception {
private String requestId;
private Integer grpcCode;
Expand All @@ -33,6 +60,11 @@ public SkyflowException(String message, Throwable cause) {
this.message = message;
}

/**
* Constructs a validation error with a fixed HTTP 400 status.
* {@link #getDetails()} returns an empty array; {@link #getRequestId()} and
* {@link #getGrpcCode()} return {@code null}.
*/
public SkyflowException(int code, String message) {
super(message);
this.httpCode = code;
Expand All @@ -41,6 +73,13 @@ public SkyflowException(int code, String message) {
this.details = new JsonArray();
}

/**
* Constructs an API error from an HTTP response.
* Parses the JSON error body to populate {@link #getMessage()}, {@link #getGrpcCode()},
* {@link #getHttpStatus()}, and {@link #getDetails()}. The request ID is read from the
* {@code x-request-id} response header. If the body cannot be parsed, falls back to the
* raw body string as the message.
*/
public SkyflowException(int httpCode, Throwable cause, Map<String, List<String>> responseHeaders, String responseBody) {
super(cause);
this.httpCode = httpCode > 0 ? httpCode : 400;
Expand All @@ -65,6 +104,10 @@ private void setResponseBody(String responseBody, Map<String, List<String>> resp
}
}

/**
* Returns the {@code x-request-id} from the server response, useful for support escalations.
* {@code null} for validation errors that never reached the server.
*/
public String getRequestId() {
return requestId;
}
Expand All @@ -89,10 +132,19 @@ private void setHttpStatus() {
this.httpStatus = statusElement == null ? null : statusElement.getAsString();
}

/**
* Returns the HTTP status code (e.g. 400, 404, 500).
* Defaults to 400 when the server returned a non-positive code.
*/
public int getHttpCode() {
return httpCode;
}

/**
* Returns additional error details from the server response, or an empty array for
* validation errors. Never {@code null} for validation errors; may be {@code null} for
* API errors whose response body contained no {@code details} field.
*/
public JsonArray getDetails() {
return details;
}
Expand All @@ -112,10 +164,18 @@ private void setDetails(Map<String, List<String>> responseHeaders) {
}
}

/**
* Returns the gRPC status code from the server response.
* {@code null} for validation errors and API responses that omit this field.
*/
public Integer getGrpcCode() {
return grpcCode;
}

/**
* Returns the human-readable HTTP status string from the server response (e.g.
* {@code "Bad Request"}, {@code "Not Found"}).
*/
public String getHttpStatus() {
return httpStatus;
}
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/skyflow/logs/InfoLogs.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ public enum InfoLogs {
DEPRECATED_SKYFLOW_ID_KEY("[DEPRECATED] Response key 'skyflow_id' is deprecated and will be removed in an upcoming release. Use 'skyflowId' instead."),
DEPRECATED_SKYFLOW_ID_REQUEST_KEY("[DEPRECATED] Request data key 'skyflow_id' is deprecated and will be removed in an upcoming release. Use 'skyflowId' instead."),
DEPRECATED_DOWNLOAD_URL("[DEPRECATED] Method 'downloadURL()' is deprecated and will be removed in an upcoming release. Use 'downloadUrl()' instead."),
DEPRECATED_GET_BYOT("[DEPRECATED] Method 'getBYOT()' is deprecated and will be removed in an upcoming release. Use 'getByot()' instead.");
DEPRECATED_GET_BYOT("[DEPRECATED] Method 'getBYOT()' is deprecated and will be removed in an upcoming release. Use 'getByot()' instead."),
DEPRECATED_UPDATE_LOG_LEVEL("[DEPRECATED] Method 'updateLogLevel()' is deprecated and will be removed in an upcoming release. Use 'setLogLevel()' instead.");



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ private static synchronized HashMap<String, Object> getFormattedBatchInsertRecor
if (records != null) {
for (JsonElement recordElement : records) {
JsonObject recordObject = recordElement.getAsJsonObject();
insertRecord.put("skyflowId", recordObject.get("skyflow_id").getAsString());
if (recordObject.has("skyflowId")) {
insertRecord.put("skyflowId", recordObject.get("skyflowId").getAsString());
} else if (recordObject.has("skyflow_id")) {
insertRecord.put("skyflowId", recordObject.get("skyflow_id").getAsString());
LogUtil.printWarningLog(InfoLogs.DEPRECATED_SKYFLOW_ID_KEY.getLog());
}
JsonElement tokensElement = recordObject.get("tokens");
if (tokensElement != null) {
insertRecord.putAll(tokensElement.getAsJsonObject().asMap());
Expand Down
Loading
Loading