Native SDK for Connectors Java - release notes

Release notes for Native SDK for Connectors Java library.

Version 2.1.0 (July 8th, 2024)

Behavior changes

  • New identifier approach.

    Important

    This new approach may change how identifiers are used in your connector, please test the new changes thoroughly!

    • The SDK now expects all identifiers to be sent as provided by the user; the SDK will asses by itself whether it’s a quoted identifier or not in order to process it correctly further.

    • Auto quoting of identifiers will be done only when using values returned by Snowflake queries.

    • To use the new approach with the UI - the connector must return a new property in the PUBLIC.APP_PROPERTIES view, with the key of UI_ADD_QUOTES_TO_EXISTING_QUOTED_IDENTIFIERS and a value of TRUE.

    • Changed com.snowflake.connectors.common.object.Identifier class:

      • Removed fromWithAutoQuoting() and getName() methods.

      • Removed the concept of an empty identifier; removed empty(), isNullOrEmpty(), validateNullOrEmpty(), and isEmpty() methods.

      • Added new from() method, which allows for enabling of auto quoting during identifier instance creation; the provided String will not be auto quoted if it is an unquoted, fully uppercase identifier.

      • Changed validate() method to isValid().

      • Changed toSqlString() method to getValue().

      • Added getUnquotedValue(), getQuotedValue(), getVariantValue(), and isUnquoted() methods.

  • Changed com.snowflake.connectors.common.object.ObjectName class:

    • Made database and schema properties Optional.

    • Changed return type of getDatabase() and getSchema() to Optional.

    • Changed validate() method to isValid().

    • Changed validateDoubleDot() method to isDoubleDot().

    • Changed getEscapedName() method to getValue().

    • Added getVariantValue() and getSchemaName() methods.

  • Changed com.snowflake.connectors.common.object.Reference class:

    • Removed the concept of an empty reference; removed empty() and isEmpty() methods.

    • Changed validate() method to isValid().

    • Changed referenceName() method to getName().

    • Changed value() method to getValue().

    • Added new com.snowflake.connectors.common.object.SchemaName class for representing the schema; similar behavior to com.snowflake.connectors.common.object.ObjectName class.

    • Added new com.snowflake.connectors.common.object.InvalidSchemaNameException class.

Other additions and changes

  • Changed applyToAllInitializedTaskReactorInstances() method in the com.snowflake.connectors.taskreactor.TaskReactorInstanceActionExecutor to execute an action only on initialized task reactor instances. Previous behavior: actions were executed on all registered task reactor instances.

New features

  • Resource management procedures:

    • Introduced new callbacks to PUBLIC.CREATE_RESOURCE() procedure that allows to perform custom operations during the procedure flow. See also Create resource.

    • New PUBLIC.ENABLE_RESOURCE() procedure that allows to enable disabled resource. Additionally there are added callbacks that allow to perform custom operations during the procedure flow. See also Enable resource.

    • New PUBLIC.DISABLE_RESOURCE() procedure that allows to disable enabled resource. Additionally there are added callbacks that allow to perform custom operations during the procedure flow. See also Disable resource.

    • New PUBLIC.UPDATE_RESOURCE() procedure that allows to update ingestion configurations of a particular resource. Additionally there are added callbacks that allow to perform custom operations during the procedure flow. See also Update resource.

  • com.snowflake.connectors.util.sql.SqlTools:

    • Added asVarchar() method that is expected to replace varcharArgument() method.

    • Added asVariant() method that is expected to replace variantArgument() method.

    • Marked varcharArgument() and variantArgument() methods as deprecated and set them to be removed in the future.

  • Other additions:

    • Defined Ingestion Process status as constants in the com.snowflake.connectors.application.ingestion.process.IngestionProcessStatuses class.

    • Added isNotOk() method to com.snowflake.connectors.common.response.ConnectorResponse class.

    • Added com.snowflake.connectors.util.snowflake.DefaultTransactionManager class that allows to execute sql statements within a transaction by using the withTransaction() method.

    • Improved logging in the task reactor.

Bug fixes

  • Fixed bug that resulted in removing task reactor instance schema, once unexpected error was raised during CREATE_INSTANCE_OBJECTS() procedure.

Version 2.0.0 (May 24th, 2024)

Initial release.