Showing preview only (2,295K chars total). Download the full file or copy to clipboard to get everything.
Repository: snowflakedb/snowflake-kafka-connector
Branch: master
Commit: 1a8c6d75b9a3
Files: 399
Total size: 2.1 MB
Directory structure:
gitextract_xko0tdbw/
├── .githooks/
│ └── pre-commit
├── .github/
│ ├── CODEOWNERS
│ ├── actions/
│ │ ├── build-connector/
│ │ │ └── action.yml
│ │ └── run-e2e-tests/
│ │ └── action.yml
│ ├── dependabot.yaml
│ ├── scripts/
│ │ ├── decrypt_secret.sh
│ │ ├── parse_java_test_reports.py
│ │ ├── profile.json.gpg
│ │ ├── profile_azure.json.gpg
│ │ ├── profile_gcs.json.gpg
│ │ └── squid.conf
│ └── workflows/
│ ├── IntegrationTest.yml
│ ├── build-apache-kafka-images.yml
│ ├── end-to-end-legacy.yml
│ ├── end-to-end-stress.yml
│ ├── end-to-end.yaml
│ ├── formatting.yml
│ └── semgrep.yml
├── .gitignore
├── .java-version
├── LICENSE
├── README.md
├── deploy.sh
├── format.sh
├── pom.xml
├── pom_confluent.xml
├── profile.json.enc
├── profile.json.example
├── scripts/
│ └── process_licenses.py
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── snowflake/
│ │ │ ├── ingest/
│ │ │ │ └── streaming/
│ │ │ │ └── internal/
│ │ │ │ └── TimestampWrapper.java
│ │ │ └── kafka/
│ │ │ └── connector/
│ │ │ ├── ConnectorConfigTools.java
│ │ │ ├── ConnectorConfigValidator.java
│ │ │ ├── Constants.java
│ │ │ ├── DefaultConnectorConfigValidator.java
│ │ │ ├── SemanticVersion.java
│ │ │ ├── SnowflakeSinkTask.java
│ │ │ ├── SnowflakeSinkTaskAuthorizationExceptionTracker.java
│ │ │ ├── SnowflakeStreamingSinkConnector.java
│ │ │ ├── TopicToTableParser.java
│ │ │ ├── Utils.java
│ │ │ ├── config/
│ │ │ │ ├── AuthenticatorType.java
│ │ │ │ ├── CommaSeparatedKeyValueValidator.java
│ │ │ │ ├── ConnectorConfigDefinition.java
│ │ │ │ ├── SinkTaskConfig.java
│ │ │ │ ├── SnowflakeValidation.java
│ │ │ │ └── TopicToTableValidator.java
│ │ │ ├── dlq/
│ │ │ │ └── KafkaRecordErrorReporter.java
│ │ │ ├── internal/
│ │ │ │ ├── CachingConfig.java
│ │ │ │ ├── CachingSnowflakeConnectionService.java
│ │ │ │ ├── DescribeTableRow.java
│ │ │ │ ├── InternalUtils.java
│ │ │ │ ├── JdbcProperties.java
│ │ │ │ ├── JdbcPropertyKeys.java
│ │ │ │ ├── KCLogger.java
│ │ │ │ ├── PrivateKeyTool.java
│ │ │ │ ├── SnowflakeConnectionService.java
│ │ │ │ ├── SnowflakeConnectionServiceFactory.java
│ │ │ │ ├── SnowflakeErrors.java
│ │ │ │ ├── SnowflakeKafkaConnectorException.java
│ │ │ │ ├── SnowflakeSinkService.java
│ │ │ │ ├── SnowflakeURL.java
│ │ │ │ ├── StandardSnowflakeConnectionService.java
│ │ │ │ ├── URL.java
│ │ │ │ ├── metrics/
│ │ │ │ │ ├── MetricsJmxReporter.java
│ │ │ │ │ ├── MetricsUtil.java
│ │ │ │ │ ├── NoopTaskMetrics.java
│ │ │ │ │ ├── SnowflakeSinkTaskMetrics.java
│ │ │ │ │ └── TaskMetrics.java
│ │ │ │ ├── schemaevolution/
│ │ │ │ │ ├── ColumnInfos.java
│ │ │ │ │ ├── ColumnTypeMapper.java
│ │ │ │ │ ├── SchemaEvolutionTargetItems.java
│ │ │ │ │ ├── SnowflakeColumnTypeMapper.java
│ │ │ │ │ ├── SnowflakeSchemaEvolutionService.java
│ │ │ │ │ ├── TableSchema.java
│ │ │ │ │ ├── TableSchemaResolver.java
│ │ │ │ │ └── ValidationResultMapper.java
│ │ │ │ ├── streaming/
│ │ │ │ │ ├── DefaultStreamingConfigValidator.java
│ │ │ │ │ ├── IngestionMethodConfig.java
│ │ │ │ │ ├── LatestCommitedOffsetTokenExecutor.java
│ │ │ │ │ ├── OpenChannelRetryPolicy.java
│ │ │ │ │ ├── SnowflakeSinkServiceV2.java
│ │ │ │ │ ├── StreamingClientProperties.java
│ │ │ │ │ ├── StreamingConfigValidator.java
│ │ │ │ │ ├── StreamingErrorHandler.java
│ │ │ │ │ ├── TopicPartitionChannelInsertionException.java
│ │ │ │ │ ├── channel/
│ │ │ │ │ │ └── TopicPartitionChannel.java
│ │ │ │ │ ├── telemetry/
│ │ │ │ │ │ ├── PeriodicTelemetryReporter.java
│ │ │ │ │ │ ├── SnowflakeTelemetryChannelCreation.java
│ │ │ │ │ │ ├── SnowflakeTelemetryChannelStatus.java
│ │ │ │ │ │ └── SnowflakeTelemetrySsv1Migration.java
│ │ │ │ │ └── v2/
│ │ │ │ │ ├── AppendRowWithFallbackPolicy.java
│ │ │ │ │ ├── BackpressureException.java
│ │ │ │ │ ├── ClientRecreationException.java
│ │ │ │ │ ├── ClientRecreator.java
│ │ │ │ │ ├── PipeNameProvider.java
│ │ │ │ │ ├── SnowpipeStreamingPartitionChannel.java
│ │ │ │ │ ├── WaitForLastOffsetCommittedPolicy.java
│ │ │ │ │ ├── channel/
│ │ │ │ │ │ └── PartitionOffsetTracker.java
│ │ │ │ │ ├── client/
│ │ │ │ │ │ ├── StreamingClientFactory.java
│ │ │ │ │ │ ├── StreamingClientPool.java
│ │ │ │ │ │ ├── StreamingClientPools.java
│ │ │ │ │ │ └── StreamingClientSupplier.java
│ │ │ │ │ ├── migration/
│ │ │ │ │ │ ├── Ssv1MigrationMode.java
│ │ │ │ │ │ └── Ssv1MigrationResponse.java
│ │ │ │ │ └── service/
│ │ │ │ │ ├── BatchOffsetFetcher.java
│ │ │ │ │ ├── PartitionChannelManager.java
│ │ │ │ │ └── ThreadPools.java
│ │ │ │ ├── telemetry/
│ │ │ │ │ ├── SnowflakeTelemetryBasicInfo.java
│ │ │ │ │ ├── SnowflakeTelemetryService.java
│ │ │ │ │ ├── SnowflakeTelemetryServiceFactory.java
│ │ │ │ │ └── TelemetryConstants.java
│ │ │ │ └── validation/
│ │ │ │ ├── BinaryStringUtils.java
│ │ │ │ ├── ByteArraySerializer.java
│ │ │ │ ├── ColumnLogicalType.java
│ │ │ │ ├── ColumnPhysicalType.java
│ │ │ │ ├── ColumnSchema.java
│ │ │ │ ├── DataValidationUtil.java
│ │ │ │ ├── DuplicateDetector.java
│ │ │ │ ├── DuplicateKeyValidatedObject.java
│ │ │ │ ├── DuplicateKeyValidatingSerializer.java
│ │ │ │ ├── ErrorCode.java
│ │ │ │ ├── Power10Util.java
│ │ │ │ ├── RowValidator.java
│ │ │ │ ├── SFExceptionValidation.java
│ │ │ │ ├── SqlIdentifierNormalizer.java
│ │ │ │ ├── TimestampWrapper.java
│ │ │ │ ├── Utils.java
│ │ │ │ ├── ValidationResult.java
│ │ │ │ └── ZonedDateTimeSerializer.java
│ │ │ ├── records/
│ │ │ │ ├── KafkaRecordConverter.java
│ │ │ │ ├── SnowflakeMetadataConfig.java
│ │ │ │ └── SnowflakeSinkRecord.java
│ │ │ └── streaming/
│ │ │ └── iceberg/
│ │ │ └── IcebergDDLTypes.java
│ │ └── resources/
│ │ └── com/
│ │ └── snowflake/
│ │ └── kafka/
│ │ └── connector/
│ │ ├── ingest_error_messages.properties
│ │ └── internal/
│ │ └── validation/
│ │ └── ingest_error_messages.properties
│ └── test/
│ ├── java/
│ │ └── com/
│ │ └── snowflake/
│ │ └── kafka/
│ │ └── connector/
│ │ ├── CachingConfigValidatorTest.java
│ │ ├── ConnectClusterBaseIT.java
│ │ ├── ConnectorConfigValidatorLogsTest.java
│ │ ├── ConnectorConfigValidatorTest.java
│ │ ├── ConnectorIT.java
│ │ ├── InjectQueryRunner.java
│ │ ├── InjectQueryRunnerExtension.java
│ │ ├── InjectSnowflakeDataSource.java
│ │ ├── InjectSnowflakeDataSourceExtension.java
│ │ ├── LegacySchemaToggleIT.java
│ │ ├── SchemaEvolutionAvroSrIT.java
│ │ ├── SchemaEvolutionBase.java
│ │ ├── SchemaEvolutionJsonIT.java
│ │ ├── SinkTaskIT.java
│ │ ├── SinkTaskProxyIT.java
│ │ ├── SmtIT.java
│ │ ├── SnowflakeSinkTaskAuthorizationExceptionTrackerTest.java
│ │ ├── SnowflakeSinkTaskForStreamingIT.java
│ │ ├── TopicToTableParserTest.java
│ │ ├── UtilsTest.java
│ │ ├── builder/
│ │ │ └── SinkRecordBuilder.java
│ │ ├── config/
│ │ │ ├── ClientValidationConfigTest.java
│ │ │ ├── SinkTaskConfigTest.java
│ │ │ ├── SinkTaskConfigTestBuilder.java
│ │ │ └── SnowflakeSinkConnectorConfigBuilder.java
│ │ ├── dlq/
│ │ │ └── InMemoryKafkaRecordErrorReporter.java
│ │ ├── internal/
│ │ │ ├── CachingSnowflakeConnectionServiceStatsTest.java
│ │ │ ├── CachingSnowflakeConnectionServiceTest.java
│ │ │ ├── ConnectionServiceIT.java
│ │ │ ├── EmbeddedProxyServer.java
│ │ │ ├── InternalUtilsTest.java
│ │ │ ├── JdbcPropertiesTest.java
│ │ │ ├── KCLoggerTest.java
│ │ │ ├── NonEncryptedKeyTestSnowflakeConnection.java
│ │ │ ├── ResetProxyConfigExec.java
│ │ │ ├── SchematizationTestUtils.java
│ │ │ ├── SnowflakeConnectionServiceCacheTest.java
│ │ │ ├── SnowflakeDataSourceFactory.java
│ │ │ ├── SnowflakeURLTest.java
│ │ │ ├── StandardSnowflakeConnectionServiceDdlTest.java
│ │ │ ├── TestUtils.java
│ │ │ ├── TombstoneRecordIngestionIT.java
│ │ │ ├── metrics/
│ │ │ │ ├── MetricsJmxReporterTest.java
│ │ │ │ └── SnowflakeSinkTaskMetricsTest.java
│ │ │ ├── schemaevolution/
│ │ │ │ ├── ColumnInfosTest.java
│ │ │ │ ├── SchemaEvolutionTargetItemsTest.java
│ │ │ │ ├── SnowflakeColumnTypeMapperTest.java
│ │ │ │ ├── SnowflakeSchemaEvolutionServiceTest.java
│ │ │ │ ├── TableSchemaResolverTest.java
│ │ │ │ └── ValidationResultMapperTest.java
│ │ │ ├── streaming/
│ │ │ │ ├── BatchOffsetFetcherTest.java
│ │ │ │ ├── ChannelStatusCheckIT.java
│ │ │ │ ├── CloseTopicPartitionChannelIT.java
│ │ │ │ ├── DefaultStreamingConfigValidatorTest.java
│ │ │ │ ├── FakeIngestClientSupplier.java
│ │ │ │ ├── FakeSnowflakeStreamingIngestChannel.java
│ │ │ │ ├── FakeSnowflakeStreamingIngestClient.java
│ │ │ │ ├── InMemorySinkTaskContext.java
│ │ │ │ ├── OpenChannelRetryPolicyTest.java
│ │ │ │ ├── SnowflakeSinkServiceV2AvroSchematizationIT.java
│ │ │ │ ├── SnowflakeSinkServiceV2BaseIT.java
│ │ │ │ ├── SnowflakeSinkServiceV2IT.java
│ │ │ │ ├── SnowflakeSinkServiceV2SchematizationIT.java
│ │ │ │ ├── SnowflakeSinkServiceV2Test.java
│ │ │ │ ├── SnowflakeSinkServiceV2ValidationLoggingTest.java
│ │ │ │ ├── StreamingClientPropertiesTest.java
│ │ │ │ ├── StreamingErrorHandlerIT.java
│ │ │ │ ├── StreamingManualModeIT.java
│ │ │ │ ├── StreamingSinkServiceBuilder.java
│ │ │ │ ├── telemetry/
│ │ │ │ │ └── PeriodicTelemetryReporterTest.java
│ │ │ │ └── v2/
│ │ │ │ ├── AppendRowWithFallbackPolicyTest.java
│ │ │ │ ├── BackpressureExceptionTest.java
│ │ │ │ ├── ClientRecreationExceptionTest.java
│ │ │ │ ├── SnowpipeStreamingPartitionChannelTest.java
│ │ │ │ ├── StreamingClientManagerIT.java
│ │ │ │ ├── client/
│ │ │ │ │ ├── StreamingClientPoolTest.java
│ │ │ │ │ └── StreamingClientPoolsTest.java
│ │ │ │ └── service/
│ │ │ │ └── PartitionChannelManagerTest.java
│ │ │ ├── telemetry/
│ │ │ │ ├── SnowflakeTelemetryChannelStatusTest.java
│ │ │ │ └── SnowflakeTelemetryServiceTest.java
│ │ │ └── validation/
│ │ │ ├── DataValidationUtilTest.java
│ │ │ ├── RowValidatorTest.java
│ │ │ └── SqlIdentifierNormalizerTest.java
│ │ ├── mock/
│ │ │ └── MockResultSetForSizeTest.java
│ │ ├── records/
│ │ │ ├── ConverterTest.java
│ │ │ └── SnowflakeSinkRecordTest.java
│ │ └── streaming/
│ │ └── iceberg/
│ │ ├── BaseIcebergIT.java
│ │ ├── IcebergIngestionIT.java
│ │ ├── IcebergIngestionIntoVariantIT.java
│ │ ├── IcebergIngestionNoSchemaEvolutionIT.java
│ │ ├── IcebergVersion.java
│ │ └── sql/
│ │ ├── ComplexJsonRecord.java
│ │ ├── MetadataRecord.java
│ │ ├── PrimitiveJsonRecord.java
│ │ └── RecordWithMetadata.java
│ └── resources/
│ ├── com/
│ │ └── snowflake/
│ │ └── kafka/
│ │ └── connector/
│ │ ├── complexJsonPayload.json
│ │ ├── complexJsonWithSchema.json
│ │ └── records/
│ │ ├── test.avro
│ │ ├── test_key.avro
│ │ └── test_multi.avro
│ ├── log4j.properties
│ └── squid.conf
├── test/
│ ├── .gitignore
│ ├── E2E_TEST_PLAN.md
│ ├── README.md
│ ├── __init__.py
│ ├── apache_properties/
│ │ ├── connect-distributed.properties
│ │ ├── file-secrets.txt
│ │ ├── kraft-server.properties
│ │ ├── schema-registry.properties
│ │ ├── server.properties
│ │ └── zookeeper.properties
│ ├── build_image.sh
│ ├── build_runtime_jar.sh
│ ├── conftest.py
│ ├── connect-log4j.properties
│ ├── docker/
│ │ ├── .gitignore
│ │ ├── Dockerfile.apache-kafka
│ │ ├── Dockerfile.builder
│ │ ├── Dockerfile.test-runner
│ │ ├── docker-compose.amd64.yml
│ │ ├── docker-compose.apache.yml
│ │ ├── docker-compose.base.yml
│ │ ├── docker-compose.confluent-kraft.yml
│ │ ├── docker-compose.confluent.yml
│ │ ├── docker-compose.profile-apache.yml
│ │ ├── docker-compose.profile-confluent.yml
│ │ └── scripts/
│ │ └── start-apache-kafka.sh
│ ├── download_v3_jar.sh
│ ├── lib/
│ │ ├── __init__.py
│ │ ├── config.py
│ │ ├── config_migration.py
│ │ ├── crypto.py
│ │ ├── driver.py
│ │ ├── fixtures/
│ │ │ ├── __init__.py
│ │ │ ├── connector.py
│ │ │ ├── function.py
│ │ │ ├── session.py
│ │ │ └── table.py
│ │ ├── matchers.py
│ │ └── utils.py
│ ├── pyproject.toml
│ ├── rest_request_template/
│ │ ├── datagen_connector.json
│ │ ├── datatype_ingestion.json
│ │ ├── iceberg_avro_aws.json
│ │ ├── iceberg_json_aws.json
│ │ ├── iceberg_schema_evolution_avro_aws.json
│ │ ├── iceberg_schema_evolution_json_aws.json
│ │ ├── nullable_values_after_smt.json
│ │ ├── snowpipe_streaming_legacy_avro_sr.json
│ │ ├── snowpipe_streaming_legacy_byte_array_converter.json
│ │ ├── snowpipe_streaming_legacy_string_converter.json
│ │ ├── snowpipe_streaming_legacy_string_json.json
│ │ ├── snowpipe_streaming_schema_evolution.json
│ │ ├── snowpipe_streaming_schema_mapping_dlq.json
│ │ ├── snowpipe_streaming_string_json_dlq.json
│ │ ├── test_kc_delete_create.json
│ │ ├── test_kc_delete_create_chaos.json
│ │ ├── test_kc_delete_resume.json
│ │ ├── test_kc_delete_resume_chaos.json
│ │ ├── test_kc_pause_create.json
│ │ ├── test_kc_pause_create_chaos.json
│ │ ├── test_kc_pause_resume.json
│ │ ├── test_kc_pause_resume_chaos.json
│ │ ├── test_kc_recreate.json
│ │ ├── test_kc_recreate_chaos.json
│ │ ├── test_kc_resilience.json
│ │ ├── test_kc_restart.json
│ │ ├── test_snowpipe_streaming_string_json_ignore_tombstone.json
│ │ ├── travis_correct_auto_table_creation.json
│ │ ├── travis_correct_auto_table_creation_topic2table.json
│ │ ├── travis_correct_avro_avro.json
│ │ ├── travis_correct_avrosr_avrosr.json
│ │ ├── travis_correct_confluent_protobuf_protobuf.json
│ │ ├── travis_correct_json_json.json
│ │ ├── travis_correct_multiple_topic_to_one_table_snowpipe_streaming.json
│ │ ├── travis_correct_native_complex_smt.json
│ │ ├── travis_correct_native_string_json_without_schema.json
│ │ ├── travis_correct_native_string_protobuf.json
│ │ ├── travis_correct_schema_mapping.json
│ │ ├── travis_correct_schema_not_supported_converter.json
│ │ ├── travis_correct_snowpipe_streaming_string_avro_sr.json
│ │ ├── travis_correct_snowpipe_streaming_string_json.json
│ │ ├── travis_correct_string_avro.json
│ │ ├── travis_correct_string_avrosr.json
│ │ ├── travis_correct_string_json.json
│ │ └── travis_correct_string_proxy.json
│ ├── run_tests.sh
│ ├── scripts/
│ │ ├── analyze_metrics.sh
│ │ ├── profile_connect.sh
│ │ └── scrape_metrics.sh
│ ├── test_data/
│ │ ├── .gitignore
│ │ ├── protobuf/
│ │ │ └── pom.xml
│ │ ├── sensor.proto
│ │ └── twitter.avro
│ └── tests/
│ ├── __init__.py
│ ├── compatibility/
│ │ ├── __init__.py
│ │ ├── conftest.py
│ │ ├── test_compatibility_case_sensitivity.py
│ │ ├── test_migration.py
│ │ ├── test_schematization_disabled.py
│ │ ├── test_type_compatibility.py
│ │ ├── test_type_compatibility_avro.py
│ │ └── test_unsupported_types.py
│ ├── high_performance/
│ │ └── test_case_sensitivity.py
│ ├── iceberg/
│ │ ├── __init__.py
│ │ ├── test_iceberg_avro.py
│ │ ├── test_iceberg_json.py
│ │ ├── test_iceberg_se_avro.py
│ │ └── test_iceberg_se_json.py
│ ├── pressure/
│ │ ├── test_perf_backlog_drain.py
│ │ ├── test_pressure_init.py
│ │ └── test_pressure_restart.py
│ ├── schema_evolution/
│ │ ├── __init__.py
│ │ ├── test_se_auto_table_creation_avro_sr.py
│ │ ├── test_se_auto_table_creation_json.py
│ │ ├── test_se_avro_sr.py
│ │ ├── test_se_json_ignore_tombstone.py
│ │ ├── test_se_multi_topic_replace_table.py
│ │ ├── test_se_nonnullable_json.py
│ │ ├── test_se_nullable_values_after_smt.py
│ │ ├── test_se_random_row_count.py
│ │ └── test_se_replace_table.py
│ ├── test_auto_table_creation.py
│ ├── test_auto_table_creation_topic2table.py
│ ├── test_avrosr_avrosr.py
│ ├── test_channel_invalidation.py
│ ├── test_channel_invalidation_recovery.py
│ ├── test_column_identifier_normalization.py
│ ├── test_confluent_protobuf_protobuf.py
│ ├── test_default_pipe_features.py
│ ├── test_error_table.py
│ ├── test_json_json.py
│ ├── test_kc_delete_create.py
│ ├── test_kc_delete_create_chaos.py
│ ├── test_kc_delete_resume.py
│ ├── test_kc_delete_resume_chaos.py
│ ├── test_kc_pause_create.py
│ ├── test_kc_pause_create_chaos.py
│ ├── test_kc_pause_resume.py
│ ├── test_kc_pause_resume_chaos.py
│ ├── test_kc_recreate.py
│ ├── test_kc_recreate_chaos.py
│ ├── test_kc_restart.py
│ ├── test_multiple_topic_to_one_table_snowpipe_streaming.py
│ ├── test_native_complex_smt.py
│ ├── test_native_string_json_without_schema.py
│ ├── test_native_string_protobuf.py
│ ├── test_nullable_values_after_smt.py
│ ├── test_schema_evolution_streaming.py
│ ├── test_schema_mapping.py
│ ├── test_schema_not_supported_converter.py
│ ├── test_snowpipe_streaming_legacy_avro_sr.py
│ ├── test_snowpipe_streaming_legacy_byte_array_converter.py
│ ├── test_snowpipe_streaming_legacy_string_converter.py
│ ├── test_snowpipe_streaming_legacy_string_json.py
│ ├── test_snowpipe_streaming_schema_mapping_dlq.py
│ ├── test_snowpipe_streaming_string_avro_sr.py
│ ├── test_snowpipe_streaming_string_json.py
│ ├── test_snowpipe_streaming_string_json_dlq.py
│ ├── test_snowpipe_streaming_string_json_ignore_tombstone.py
│ ├── test_string_avrosr.py
│ └── test_string_json.py
└── upload_jar.sh
================================================
FILE CONTENTS
================================================
================================================
FILE: .githooks/pre-commit
================================================
#!/usr/bin/env bash
#
# Git pre-commit hook that enforces the same formatting checks as CI:
# 1. Java – google-java-format via ./format.sh (requires java)
# 2. Python – ruff check + ruff format --check (requires ruff)
# Each tool is skipped when it is not available.
#
# Install with:
# git config core.hooksPath .githooks
#
# If you need the corporate secret-scanner hook as well, this script
# delegates to .git/hooks/pre-commit after running its own checks.
set -euo pipefail
REPO_ROOT="$(git rev-parse --show-toplevel)"
# --- Java formatting (google-java-format) ---
if git diff --cached --name-only | grep -q '^src/'; then
"$REPO_ROOT/format.sh"
fi
# --- Python linting & formatting (ruff) ---
PYTHON_PATHS="test/tests test/lib test/conftest.py"
if git diff --cached --name-only | grep -q '^test/'; then
if command -v ruff &>/dev/null; then
ruff check --fix --exit-non-zero-on-fix $PYTHON_PATHS
ruff format --exit-non-zero-on-format $PYTHON_PATHS
fi
fi
# Chain to the default hooks directory so the secret-scanner (or any other
# hook installed into .git/hooks/) still runs.
if [ -x .git/hooks/pre-commit ]; then
exec .git/hooks/pre-commit "$@"
fi
================================================
FILE: .github/CODEOWNERS
================================================
* @snowflakedb/streaming-ingest
================================================
FILE: .github/actions/build-connector/action.yml
================================================
name: Build Connector
description: Build the Snowflake Kafka Connector JAR/ZIP for a given platform
inputs:
platform:
description: "Target platform: 'apache' or 'confluent'"
required: true
runs:
using: composite
steps:
- name: Install Java 11
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: >
${{ runner.os }}-maven-${{ hashFiles(
case(inputs.platform == 'confluent', '**/pom_confluent.xml', '**/pom.xml')
) }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build connector
shell: bash
working-directory: test
run: ./build_runtime_jar.sh ../../snowflake-kafka-connector package "$PLATFORM"
env:
SNOWFLAKE_CREDENTIAL_FILE: "../profile.json"
PLATFORM: ${{ inputs.platform }}
================================================
FILE: .github/actions/run-e2e-tests/action.yml
================================================
name: Run E2E Tests
description: Run Docker-based end-to-end tests for the Snowflake Kafka Connector
inputs:
platform:
description: "Target platform: 'apache' or 'confluent'"
required: true
platform-version:
description: "Platform version (e.g. '2.8.2', '7.8.2')"
required: true
snowflake-cloud:
description: "Snowflake cloud provider: 'AWS', 'GCP', or 'AZURE'"
required: true
java-version:
description: "Java version for Apache Kafka (e.g. '11', '17'). Ignored for Confluent."
required: false
default: '11'
marker-filter:
description: "pytest -m expression controlling which tests run (e.g. 'compatibility' or 'not compatibility and not schema_evolution and not correctness and not pressure')"
required: false
default: 'not pressure'
test-group:
description: "Short label for this test group used in artifact names (e.g. 'core', 'compatibility', 'schema_and_correctness')"
required: false
default: 'default'
pressure:
description: "Run pressure/stress tests instead of regular tests"
required: false
default: 'false'
runs:
using: composite
steps:
- name: Log in to GHCR (for prebuilt Apache Kafka image)
if: inputs.platform == 'apache'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Run end-to-end tests
shell: bash
working-directory: test
env:
SNOWFLAKE_CREDENTIAL_FILE: "${{ github.workspace }}/profile.json"
PLATFORM: ${{ inputs.platform }}
PLATFORM_VERSION: ${{ inputs['platform-version'] }}
SNOWFLAKE_CLOUD: ${{ inputs['snowflake-cloud'] }}
JAVA_VERSION: ${{ inputs['java-version'] }}
LOGS_DIR: "${{ github.workspace }}/test-logs"
MARKER_FILTER: ${{ inputs.pressure == 'true' && 'pressure' || inputs['marker-filter'] }}
run: |
./run_tests.sh \
--platform="$PLATFORM" \
--platform-version="$PLATFORM_VERSION" \
--cloud="$SNOWFLAKE_CLOUD" \
--java-version="$JAVA_VERSION" \
--logs-dir="$LOGS_DIR" \
-- -m "$MARKER_FILTER"
- name: Upload service logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: logs-${{ inputs.platform }}-${{ inputs['platform-version'] }}-${{ inputs['snowflake-cloud'] }}-${{ inputs['test-group'] }}
path: ${{ github.workspace }}/test-logs/
retention-days: 14
if-no-files-found: ignore
================================================
FILE: .github/dependabot.yaml
================================================
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
version: 2
updates:
- package-ecosystem: "maven" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
ignore:
- dependency-name: "org.apache.kafka:*"
update-types: ["version-update:semver-major"]
================================================
FILE: .github/scripts/decrypt_secret.sh
================================================
#!/bin/sh
# Decrypt the file
# mkdir $HOME/secrets
# --batch to prevent interactive command --yes to assume "yes" for questions
snowflake_deployment=$1
if [ $snowflake_deployment = 'AWS' ]; then
gpg --quiet --batch --yes --decrypt --passphrase="$SNOWFLAKE_TEST_PROFILE_SECRET" \
--output profile.json .github/scripts/profile.json.gpg
elif [ $snowflake_deployment = 'GCS' ]; then
gpg --quiet --batch --yes --decrypt --passphrase="$SNOWFLAKE_TEST_PROFILE_SECRET" \
--output profile.json .github/scripts/profile_gcs.json.gpg
else
gpg --quiet --batch --yes --decrypt --passphrase="$SNOWFLAKE_TEST_PROFILE_SECRET" \
--output profile.json .github/scripts/profile_azure.json.gpg
fi
================================================
FILE: .github/scripts/parse_java_test_reports.py
================================================
#!/usr/bin/env python3
"""
Parse Maven Surefire and Failsafe XML reports, append a Markdown summary to
GITHUB_STEP_SUMMARY when set, and emit ::error workflow commands to stderr
for annotations. Exits silently when GITHUB_STEP_SUMMARY is unset or no failures.
"""
import os
import re
import sys
import xml.etree.ElementTree as ET
from pathlib import Path
def _classname_to_path(classname: str, connector_root: Path):
"""Return repo-relative path to Java file (src/test/... or src/main/...)."""
rel = classname.replace(".", "/") + ".java"
for prefix in ("src/test/java/", "src/main/java/"):
candidate = connector_root / prefix / rel
if candidate.exists():
return prefix + rel
return None
def _line_in_test_class(stack_trace: str, classname: str):
"""First (File.java:line) in stack trace for the test class (not JUnit/framework)."""
test_class_file = classname.split(".")[-1] + ".java"
pattern = re.escape(test_class_file) + r":(\d+)\)"
match = re.search(pattern, stack_trace)
return int(match.group(1)) if match else None
def parse_suite(path: Path) -> list[tuple[str, str, str, str, str]]:
"""Parse a TEST-*.xml file; return list of (classname, testname, exc_type, message, stack_trace)."""
failures = []
try:
root = ET.parse(path).getroot()
except (ET.ParseError, OSError):
return failures
for testcase in root.findall(".//testcase"):
for kind in ("failure", "error"):
node = testcase.find(kind)
if node is not None:
classname = testcase.get("classname", "")
name = testcase.get("name", "")
exc_type = (node.get("type") or "").strip()
message = (node.get("message") or "").strip()
stack_trace = (node.text or "").strip()
failures.append((classname, name, exc_type, message, stack_trace))
return failures
def _first_line_for_annotation(exc_type: str, message: str, stack_trace: str) -> str:
"""First line of failure for ::error message (exception type + message or first stack line)."""
if message:
first = f"{exc_type}: {message}" if exc_type else message
elif stack_trace:
first = stack_trace.split("\n")[0].strip()
else:
first = exc_type or "Failure"
return first[:500]
def _emit_error_annotation(
classname: str,
name: str,
exc_type: str,
message: str,
stack_trace: str,
connector_root: Path,
stderr: object,
) -> None:
"""Print one ::error workflow command to stderr for GitHub annotations."""
title = f"{classname}#{name}"
first_line = _first_line_for_annotation(exc_type, message, stack_trace)
first_line_escaped = (
first_line.replace("%", "%25").replace("\r", "%0D").replace("\n", "%0A")
)
file_path = _classname_to_path(classname, connector_root)
file_line = _line_in_test_class(stack_trace, classname) if stack_trace else None
parts = [f"title={title}"]
if file_path:
parts.append(f"file={file_path}")
if file_line is not None:
parts.append(f"line={file_line}")
opts = ",".join(parts)
print(f"::error {opts}::{first_line_escaped}", file=stderr)
def main() -> None:
summary_path = os.environ.get("GITHUB_STEP_SUMMARY")
if not summary_path:
sys.exit(0)
connector_root = (
Path(sys.argv[1])
if len(sys.argv) >= 2
else Path(os.environ.get("GITHUB_WORKSPACE", "."))
)
surefire_dir = connector_root / "target" / "surefire-reports"
failsafe_dir = connector_root / "target" / "failsafe-reports"
all_failures = []
for report_dir in (surefire_dir, failsafe_dir):
if not report_dir.is_dir():
continue
for path in sorted(report_dir.glob("TEST-*.xml")):
all_failures.extend(parse_suite(path))
if not all_failures:
sys.exit(0)
for classname, name, exc_type, message, stack_trace in all_failures:
_emit_error_annotation(
classname, name, exc_type, message, stack_trace, connector_root, sys.stderr
)
# Group by class for headings: class -> [(name, exc_type, message, stack_trace), ...]
by_class = {}
for classname, name, exc_type, message, stack_trace in all_failures:
by_class.setdefault(classname, []).append(
(name, exc_type, message, stack_trace)
)
lines = ["", "## Java test failures", ""]
for classname in sorted(by_class.keys()):
short_name = classname.split(".")[-1] if classname else classname
lines.append(f"## {short_name}")
lines.append("")
lines.append(f"**Class:** `{classname}`")
lines.append("")
for name, exc_type, message, stack_trace in by_class[classname]:
lines.append(f"### {name}")
lines.append("")
if exc_type:
lines.append(f"**Exception type:** `{exc_type}`")
lines.append("")
if message:
lines.append("**Message:**")
lines.append("")
lines.append(message)
lines.append("")
if stack_trace:
lines.append("**Stack trace:**")
lines.append("")
lines.append("```")
lines.append(stack_trace)
lines.append("```")
lines.append("")
lines.append("")
with open(summary_path, "a", encoding="utf-8") as summary_file:
summary_file.write("\n".join(lines))
if __name__ == "__main__":
main()
================================================
FILE: .github/scripts/squid.conf
================================================
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_port 3128
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
auth_param basic program /usr/lib/squid/basic_ncsa_auth /etc/squid/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
http_access allow localhost
ident_lookup_access deny all
http_access deny all
================================================
FILE: .github/workflows/IntegrationTest.yml
================================================
name: Kafka Connector Java Integration Tests
on:
push:
branches: [ master ]
pull_request:
branches: '**'
jobs:
build_and_test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast
matrix:
snowflake_cloud: ['AWS'] # for now only AWS has support for ssv2
# snowflake_cloud: [ 'AWS', 'AZURE', 'GCP' ]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: "Install Java 11"
uses: actions/setup-java@v1
with:
java-version: 11
- name: "Cache local Maven repository"
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
architecture: 'x64'
- name: Decrypt profile.json in Snowflake Cloud ${{ matrix.snowflake_cloud }}
run: ./.github/scripts/decrypt_secret.sh ${{ matrix.snowflake_cloud }}
env:
SNOWFLAKE_TEST_PROFILE_SECRET: ${{ secrets.SNOWFLAKE_TEST_PROFILE_SECRET }}
- name: Install Dependency
run: |
pip3 install --upgrade setuptools
pip3 install requests certifi "confluent-kafka[avro,json,protobuf]==1.9.2"
pip3 install avro kafka-python
pip3 install protobuf
pip3 install --upgrade snowflake-connector-python==2.7.4
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
sudo apt update
sudo apt-get -y install jq vim
sudo apt-get -y install protobuf-compiler
- name: Install Squid as Proxy Server and Apache Utils for Password Authentication
run: |
sudo apt-get -y install squid
sudo apt-get install apache2-utils
- name: Change squid config and run Proxy Server
run: |
sudo touch /etc/squid/passwords
sudo chmod 777 /etc/squid/passwords
sudo htpasswd -db -c /etc/squid/passwords admin test
sudo mv .github/scripts/squid.conf /etc/squid/squid.conf
sudo service squid start
- name: Unit and Integration Test - ${{ matrix.snowflake_cloud }}
id: java_tests
env:
SNOWFLAKE_CREDENTIAL_FILE: "${{ github.workspace }}/profile.json"
SHELL: "/bin/bash"
run: |
set -Eeuo pipefail
# line-buffer stdout/stderr for all child procs
export PYTHONUNBUFFERED=1
export RUST_BACKTRACE=1
cd test
trap 'echo "::group::Last 1000 lines of logs"; tail -n 1000 build.log || true; echo "::endgroup::"' ERR
stdbuf -oL -eL ./build_runtime_jar.sh ../../snowflake-kafka-connector verify apache ${{ matrix.snowflake_cloud }} 2>&1 | tee build.log
- name: Report Java test failures to job summary
if: failure() && steps.java_tests.outcome == 'failure'
run: ./.github/scripts/parse_java_test_reports.py "${{ github.workspace }}"
================================================
FILE: .github/workflows/build-apache-kafka-images.yml
================================================
name: Build Apache Kafka Docker images
on:
push:
branches: [ master ]
paths:
- 'test/docker/Dockerfile.apache-kafka'
- 'test/apache_properties/**'
- 'test/connect-log4j.properties'
- '.github/workflows/build-apache-kafka-images.yml'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
permissions:
packages: write
strategy:
fail-fast: false
matrix:
include:
- kafka_version: '2.8.2'
scala_version: '2.12'
java_version: '11'
- kafka_version: '3.9.2'
scala_version: '2.12'
java_version: '11'
- kafka_version: '4.1.1'
scala_version: '2.13'
java_version: '17'
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push apache-kafka:${{ matrix.kafka_version }}-java${{ matrix.java_version }}
uses: docker/build-push-action@v6
with:
context: test
file: test/docker/Dockerfile.apache-kafka
build-args: |
KAFKA_VERSION=${{ matrix.kafka_version }}
SCALA_VERSION=${{ matrix.scala_version }}
JAVA_VERSION=${{ matrix.java_version }}
push: true
tags: ghcr.io/snowflakedb/snowflake-kafka-connector/apache-kafka:${{ matrix.kafka_version }}-java${{ matrix.java_version }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha,scope=apache-kafka-${{ matrix.kafka_version }}-java${{ matrix.java_version }}
cache-to: type=gha,mode=max,scope=apache-kafka-${{ matrix.kafka_version }}-java${{ matrix.java_version }}
================================================
FILE: .github/workflows/end-to-end-legacy.yml
================================================
name: Kafka Connector end-to-end tests (legacy platforms)
# Runs the core e2e suite on older Kafka platform versions.
# Intentionally limited to master push and workflow_dispatch — these jobs are
# skipped on pull_requests to reduce concurrent load on the shared Snowflake
# test account. Full PR coverage is provided by end-to-end.yaml on the new
# platforms (apache 4.1.1 / confluent 8.2.0).
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build_and_test:
runs-on: ubuntu-22.04
name: >
${{ matrix.platform }} ${{ matrix.platform_version }},
${{ matrix.java_test_version && format('Java {0},', matrix.java_test_version) || '' }}
${{ matrix.snowflake_cloud }}
[${{ matrix.test_group }}]
permissions:
packages: read
strategy:
fail-fast: false
matrix:
include:
# Compatibility, schema_evolution and correctness groups are intentionally
# skipped here — full coverage runs on the new platforms in end-to-end.yaml.
- platform: apache
platform_version: '2.8.2'
snowflake_cloud: 'AWS'
java_test_version: '11'
test_group: core
marker_filter: 'not compatibility and not schema_evolution and not correctness and not pressure'
- platform: apache
platform_version: '3.9.2'
snowflake_cloud: 'GCP'
java_test_version: '11'
test_group: core
marker_filter: 'not compatibility and not schema_evolution and not correctness and not pressure'
- platform: confluent
platform_version: '6.2.15'
snowflake_cloud: 'AZURE'
test_group: core
marker_filter: 'not compatibility and not schema_evolution and not correctness and not pressure'
- platform: confluent
platform_version: '7.9.3'
snowflake_cloud: 'AWS'
test_group: core
marker_filter: 'not compatibility and not schema_evolution and not correctness and not pressure'
steps:
- uses: actions/checkout@v4
- name: Decrypt profile.json in Snowflake Cloud ${{ matrix.snowflake_cloud }}
run: ./.github/scripts/decrypt_secret.sh ${{ matrix.snowflake_cloud }}
env:
SNOWFLAKE_TEST_PROFILE_SECRET: ${{ secrets.SNOWFLAKE_TEST_PROFILE_SECRET }}
- uses: ./.github/actions/build-connector
with:
platform: ${{ matrix.platform }}
- uses: ./.github/actions/run-e2e-tests
with:
platform: ${{ matrix.platform }}
platform-version: ${{ matrix.platform_version }}
snowflake-cloud: ${{ matrix.snowflake_cloud }}
java-version: ${{ matrix.java_test_version || '11' }}
marker-filter: ${{ matrix.marker_filter }}
test-group: ${{ matrix.test_group }}
================================================
FILE: .github/workflows/end-to-end-stress.yml
================================================
name: Kafka Connector stress test
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
build_and_test:
runs-on: ubuntu-22.04
name: ${{ matrix.platform }} ${{ matrix.platform_version }}, ${{ matrix.snowflake_cloud }}
strategy:
fail-fast: false
matrix:
include:
- platform: confluent
platform_version: '7.6.0'
snowflake_cloud: 'AWS'
steps:
- uses: actions/checkout@v4
- name: Decrypt profile.json in Snowflake Cloud ${{ matrix.snowflake_cloud }}
run: ./.github/scripts/decrypt_secret.sh ${{ matrix.snowflake_cloud }}
env:
SNOWFLAKE_TEST_PROFILE_SECRET: ${{ secrets.SNOWFLAKE_TEST_PROFILE_SECRET }}
- uses: ./.github/actions/build-connector
with:
platform: ${{ matrix.platform }}
- uses: ./.github/actions/run-e2e-tests
env:
# Less frequent preCommit than default E2E
CONNECT_OFFSET_FLUSH_INTERVAL_MS: '10000'
with:
platform: ${{ matrix.platform }}
platform-version: ${{ matrix.platform_version }}
snowflake-cloud: ${{ matrix.snowflake_cloud }}
pressure: 'true'
================================================
FILE: .github/workflows/end-to-end.yaml
================================================
name: Kafka Connector end-to-end tests
on:
push:
branches: [ master ]
pull_request:
branches: ['**']
workflow_dispatch:
jobs:
build_and_test:
runs-on: ubuntu-22.04
name: >
${{ matrix.platform }} ${{ matrix.platform_version }},
${{ matrix.java_test_version && format('Java {0},', matrix.java_test_version) || '' }}
${{ matrix.snowflake_cloud }}
[${{ matrix.test_group }}]
permissions:
packages: read
strategy:
fail-fast: false
matrix:
include:
# ── New platforms: full suite split into 3 parallel groups ───────
- platform: apache
platform_version: '4.1.1'
snowflake_cloud: 'AWS'
java_test_version: '17'
test_group: compatibility
marker_filter: 'compatibility and not schema_evolution'
- platform: apache
platform_version: '4.1.1'
snowflake_cloud: 'AWS'
java_test_version: '17'
test_group: schema_and_correctness
marker_filter: 'schema_evolution or correctness'
- platform: apache
platform_version: '4.1.1'
snowflake_cloud: 'AWS'
java_test_version: '17'
test_group: core
marker_filter: 'not compatibility and not schema_evolution and not correctness and not pressure'
- platform: confluent
platform_version: '8.2.0'
snowflake_cloud: 'AWS'
test_group: compatibility
marker_filter: 'compatibility and not schema_evolution'
- platform: confluent
platform_version: '8.2.0'
snowflake_cloud: 'AWS'
test_group: schema_and_correctness
marker_filter: 'schema_evolution or correctness'
- platform: confluent
platform_version: '8.2.0'
snowflake_cloud: 'AWS'
test_group: core
marker_filter: 'not compatibility and not schema_evolution and not correctness and not pressure'
steps:
- uses: actions/checkout@v4
- name: Decrypt profile.json in Snowflake Cloud ${{ matrix.snowflake_cloud }}
run: ./.github/scripts/decrypt_secret.sh ${{ matrix.snowflake_cloud }}
env:
SNOWFLAKE_TEST_PROFILE_SECRET: ${{ secrets.SNOWFLAKE_TEST_PROFILE_SECRET }}
- uses: ./.github/actions/build-connector
with:
platform: ${{ matrix.platform }}
- uses: ./.github/actions/run-e2e-tests
with:
platform: ${{ matrix.platform }}
platform-version: ${{ matrix.platform_version }}
snowflake-cloud: ${{ matrix.snowflake_cloud }}
java-version: ${{ matrix.java_test_version || '11' }}
marker-filter: ${{ matrix.marker_filter }}
test-group: ${{ matrix.test_group }}
================================================
FILE: .github/workflows/formatting.yml
================================================
name: formatting
on:
pull_request:
push:
branches:
- master
jobs:
java:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: axel-op/googlejavaformat-action@v3
with:
skip-commit: true
version: v1.24.0
args: "-n --set-exit-if-changed"
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- run: pip install ruff
- run: ruff check test/tests test/lib test/conftest.py
- run: ruff format --check test/tests test/lib test/conftest.py
formatting-done:
needs: [java, python]
runs-on: ubuntu-latest
steps:
- run: echo "All formatting checks passed"
================================================
FILE: .github/workflows/semgrep.yml
================================================
---
name: Run semgrep checks
on:
pull_request:
branches: [master]
permissions:
contents: read
jobs:
run-semgrep-reusable-workflow:
uses: snowflakedb/reusable-workflows/.github/workflows/semgrep-v2.yml@main
secrets:
token: ${{ secrets.SEMGREP_APP_TOKEN }}
================================================
FILE: .gitignore
================================================
.DS_Store
.envrc
# IDEs
.idea/
.settings/
.claude/
.cursor/
.vscode/
.project/
# Python
__pycache__
venv
# Java
.cache/
.classpath
*.iml
target
docker-setup
*.log
*.log.*
profile*.json
licenses/
ai-docs/
docs/
CLAUDE.md
.mcp.json
profile.txt
profile_qa3.json
profiling-results*/
================================================
FILE: .java-version
================================================
11
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2019 Snowflake Computing, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
# `snowflake-kafka-connector`
[](http://www.apache.org/licenses/LICENSE-2.0.txt)
The Snowflake Kafka Connector is a plugin for Apache Kafka Connect. It ingests data from a Kafka Topic into a Snowflake Table.
[Official documentation](https://docs.snowflake.com/en/user-guide/kafka-connector) for the Snowflake Kafka Connector
## Contributing
### Guidelines
The following requirements must be met before you can merge your PR:
- Tests: all test suites must pass, see the [test README](https://github.com/snowflakedb/snowflake-kafka-connector/blob/master/test/README.md)
- Formatting: Java sources must pass [Google Java Format](https://github.com/google/google-java-format) (`./format.sh`) and Python test code must pass `ruff check` + `ruff format --check`. The [pre-commit hook](#pre-commit-hook) runs both automatically.
- CLA: all contributers must sign the Snowflake CLA. This is a one time signature, please provide your email so we can work with you to get this signed after you open a PR.
Thank you for contributing! We will review and approve PRs as soon as we can.
### Pre-commit hook
A pre-commit hook is provided in `.githooks/` that enforces the same formatting checks as CI.
Python formatting is skipped when ruff is not available. To enable the hook:
```bash
git config core.hooksPath .githooks
```
### Unit tests
```bash
mvn package -Dgpg.skip=true
```
Runs all test files in `src/test` that do not end with `IT`. Requires `SNOWFLAKE_CREDENTIAL_FILE` to be set.
### Integration tests
```bash
mvn verify -Dgpg.skip=true
```
Runs all test files in `src/test`, including unit tests.
### End-to-end tests
Refer to [test/README.md](test/README.md).
## Third party licenses
Custom license handling process is run during build to meet legal standards.
- License files are copied directly from JAR if present in one of the following locations: META-INF/LICENSE.txt, META-INF/LICENSE, META-INF/LICENSE.md
- If no license file is found then license must be manually added to [`process_licenses.py`](https://github.com/snowflakedb/snowflake-kafka-connector/blob/master/scripts/process_licenses.py) script in order to pass build
## Test and Code Coverage Statuses
[](https://github.com/snowflakedb/snowflake-kafka-connector/actions/workflows/IntegrationTest.yml)
[](https://github.com/snowflakedb/snowflake-kafka-connector/actions/workflows/end-to-end.yaml)
[](https://github.com/snowflakedb/snowflake-kafka-connector/actions/workflows/end-to-end-legacy.yml)
[](https://github.com/snowflakedb/snowflake-kafka-connector/actions/workflows/end-to-end-stress.yml)
<!-- [](https://codecov.io/gh/snowflakedb/snowflake-kafka-connector) -->
================================================
FILE: deploy.sh
================================================
#!/bin/bash
# exit on error
set -e
THIS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ -z "$GPG_KEY_ID" ]; then
echo "[ERROR] Key Id not specified!"
exit 1
fi
if [ -z "$GPG_KEY_PASSPHRASE" ]; then
echo "[ERROR] GPG passphrase is not specified for $GPG_KEY_ID!"
exit 1
fi
if [ -z "$GPG_PRIVATE_KEY" ]; then
echo "[ERROR] GPG private key file is not specified!"
exit 1
fi
echo "[INFO] Import PGP Key"
if ! gpg --list-secret-key | grep "$GPG_KEY_ID"; then
gpg --allow-secret-key-import --import "$GPG_PRIVATE_KEY"
fi
CENTRAL_DEPLOY_SETTINGS_XML="$THIS_DIR/mvn_settings_central_deploy.xml"
cat > $CENTRAL_DEPLOY_SETTINGS_XML << SETTINGS.XML
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>central</id>
<username>$SONATYPE_USER</username>
<password>$SONATYPE_PWD</password>
</server>
</servers>
<profiles>
<profile>
<id>central</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg2</gpg.executable>
<gpg.keyname>$GPG_KEY_ID</gpg.keyname>
<gpg.passphrase>$GPG_KEY_PASSPHRASE</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
SETTINGS.XML
mvn --settings $CENTRAL_DEPLOY_SETTINGS_XML -DskipTests clean deploy
#confluent release
mvn -f pom_confluent.xml --settings $CENTRAL_DEPLOY_SETTINGS_XML -DskipTests clean package
#white source
# whitesource/run_whitesource.sh
aws s3 cp target/components/packages/*.zip s3://sfc-eng-jenkins/repository/kafka/
================================================
FILE: format.sh
================================================
#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
DOWNLOAD_URL="https://github.com/google/google-java-format/releases/download/v1.24.0/google-java-format-1.24.0-all-deps.jar"
JAR_FILE="./.cache/google-java-format-1.24.0-all-deps.jar"
if [ ! -f "${JAR_FILE}" ]; then
mkdir -p "$(dirname "${JAR_FILE}")"
echo "Downloading Google Java format to ${JAR_FILE}"
curl -# -L --fail "${DOWNLOAD_URL}" --output "${JAR_FILE}"
fi
if ! command -v java > /dev/null; then
echo "Java not installed."
exit 1
fi
echo "Running Google Java Format"
find ./src -type f -name "*.java" -print0 | xargs -0 java -jar "${JAR_FILE}" --replace --set-exit-if-changed && echo "OK"
================================================
FILE: pom.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ /*
~ * Copyright (c) 2019 - 2024 Snowflake Computing Inc. All rights reserved.
~ */
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.snowflake</groupId>
<artifactId>snowflake-kafka-connector</artifactId>
<version>4.1.0</version>
<packaging>jar</packaging>
<name>Snowflake Kafka Connector</name>
<description>Snowflake Kafka Connect Sink Connector</description>
<url>https://www.snowflake.com/</url>
<developers>
<developer>
<name>Snowflake Support Team</name>
<email>snowflake-java@snowflake.com</email>
<organization>Snowflake Computing</organization>
<organizationUrl>https://www.snowflake.com</organizationUrl>
</developer>
</developers>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>
scm:git:https://github.com/snowflakedb/snowflake-kafka-connector.git
</connection>
<developerConnection>
scm:git:https://github.com/snowflakedb/snowflake-kafka-connector.git
</developerConnection>
<url>https://github.com/snowflakedb/snowflake-kafka-connector</url>
</scm>
<!-- Set our Language Level to Java 11 -->
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<skipTests>false</skipTests>
<skipUnitTests>${skipTests}</skipUnitTests>
<skipIntegrationTests>${skipTests}</skipIntegrationTests>
<kafka.version>3.9.2</kafka.version>
<awaitility.version>4.3.0</awaitility.version>
<assertj-core.version>3.27.7</assertj-core.version>
<confluent.version>7.9.2</confluent.version>
<!--Compatible protobuf version https://github.com/confluentinc/common/blob/v7.7.0/pom.xml#L91 -->
<protobuf.version>3.25.5</protobuf.version>
<guava.version>33.6.0-jre</guava.version>
<jackson.version>2.21.2</jackson.version>
<commons-compress.version>1.28.0</commons-compress.version>
<maven-surefire-plugin.version>3.5.5</maven-surefire-plugin.version>
<snowflake-jdbc.version>4.2.0</snowflake-jdbc.version>
<slf4j-api.version>2.0.17</slf4j-api.version>
<commons-lang3.version>3.20.0</commons-lang3.version>
<auto-value.version>1.11.1</auto-value.version>
</properties>
<repositories>
<repository>
<id>confluent</id>
<name>Confluent</name>
<url>https://packages.confluent.io/maven/</url>
</repository>
<repository>
<id>cloudera-repo</id>
<url>
https://repository.cloudera.com/content/repositories/releases/
</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.10.0</version>
<extensions>true</extensions>
<configuration>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>${skipUnitTests}</skipTests>
<useModulePath>false</useModulePath>
<argLine>--add-opens java.base/java.util=ALL-UNNAMED</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.15.0</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${auto-value.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.8.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}-${project.version}
</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.8</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>install</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.4.0</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.12.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>prepare-package</phase>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<failOnError>false</failOnError>
<failOnWarnings>false</failOnWarnings>
<doclint>none</doclint>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.2.0</version>
<configuration>
<mainClass>com.snowflake.kafka.connector.internal.ResetProxyConfigExec</mainClass>
<classpathScope>test</classpathScope>
</configuration>
</plugin>
</plugins>
<!-- disable default maven deploy plugin since we are using gpg:sign-and-deploy-file -->
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-fips -->
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-fips</artifactId>
<version>2.1.11</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.kafka/connect-api -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<version>${kafka.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
</exclusion>
<exclusion>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
<exclusions>
<exclusion>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--JDBC driver for building connection with Snowflake-->
<dependency>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc</artifactId>
<version>${snowflake-jdbc.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.12.1</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-compress -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Direct dependency for commons-lang3 with latest version to fix CVE-2025-48924 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- <https://mvnrepository.com/artifact/io.confluent/kafka-schema-registry-client?repo=confluent-packages -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client</artifactId>
<version>${confluent.version}</version>
<exclusions>
<exclusion>
<groupId>io.confluent</groupId>
<artifactId>common-utils</artifactId>
</exclusion>
<exclusion>
<groupId>io.confluent</groupId>
<artifactId>common-config</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/io.confluent/kafka-connect-avro-data -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>${confluent.version}</version>
<exclusions>
<exclusion>
<groupId>io.confluent</groupId>
<artifactId>common-utils</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/io.confluent/kafka-connect-avro-converter -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-connect-avro-converter</artifactId>
<version>${confluent.version}</version>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client-encryption</artifactId>
<version>${confluent.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-core -->
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>4.2.33</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-jmx -->
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jmx</artifactId>
<version>4.2.33</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<!-- Annotations (@AutoValue) visible to source; processor is on annotationProcessorPaths only -->
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
<version>${auto-value.version}</version>
</dependency>
<!-- Processor only needed at compile time (generates AutoValue_* classes) -->
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${auto-value.version}</version>
<scope>provided</scope>
</dependency>
<!-- Caffeine cache library for client-side validation (copied from SSv1 SDK) -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>3.2.4</version>
</dependency>
<!-- https://github.com/failsafe-lib/failsafe-->
<dependency>
<groupId>dev.failsafe</groupId>
<artifactId>failsafe</artifactId>
<version>3.3.2</version>
</dependency>
<!--junit for unit test-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<!--JUnit Jupiter Engine to depend on the JUnit4 engine and JUnit 4 API -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<!-- Optional : override the JUnit 4 API version provided by junit-vintage-engine -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<!--Mockito for unit test-->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>5.23.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-api.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.25.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
<version>1.19.0</version>
<scope>test</scope>
</dependency>
<!-- Apache Commons DBUtils for database operations in tests -->
<dependency>
<groupId>commons-dbutils</groupId>
<artifactId>commons-dbutils</artifactId>
<version>1.8.1</version>
<scope>test</scope>
</dependency>
<!-- Apache Commons DBCP2 for connection pooling in tests -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.14.0</version>
<scope>test</scope>
</dependency>
<!--Kafka JSON converter for SMT unit test-->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-json</artifactId>
<version>0.9.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<type>test-jar</type>
<classifier>test</classifier>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-server-common</artifactId>
<type>test-jar</type>
<classifier>test</classifier>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-runtime</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-runtime</artifactId>
<version>${kafka.version}</version>
<classifier>test</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
<classifier>test</classifier>
<type>test-jar</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<!-- Testcontainers for embedded proxy server in tests -->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>2.0.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.snowflake</groupId>
<artifactId>snowpipe-streaming</artifactId>
<version>1.4.0</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>aws</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.5</version>
<configuration>
<useModulePath>false</useModulePath>
<includes>
<include>**/*IT.java</include>
</includes>
<excludes>
<exclude>none</exclude>
</excludes>
<skipTests>${skipIntegrationTests}</skipTests>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>non-aws</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.5.5</version>
<configuration>
<useModulePath>false</useModulePath>
<includes>
<include>**/*IT.java</include>
</includes>
<excludes>
<!-- External volume configured only on AWS env -->
<exclude>**/*Iceberg*IT.java</exclude>
<!-- Rowset API is disabled on Azure and GCP -->
<exclude>**/*RowSchemaProvider*IT.java</exclude>
<exclude>**/*StreamingIngestClientV2Provider*IT.java</exclude>
<exclude>**/*SnowflakeSinkServiceV2*IT.java</exclude>
</excludes>
<skipTests>${skipIntegrationTests}</skipTests>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.14.4</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
================================================
FILE: pom_confluent.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ /*
~ * Copyright (c) 2019 - 2024 Snowflake Computing Inc. All rights reserved.
~ */
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.snowflake</groupId>
<artifactId>snowflake-kafka-connector</artifactId>
<version>4.1.0</version>
<packaging>jar</packaging>
<name>Snowflake Kafka Connector</name>
<description>Snowflake Kafka Connect Sink Connector</description>
<url>https://www.snowflake.com/</url>
<developers>
<developer>
<name>Snowflake Support Team</name>
<email>snowflake-java@snowflake.com</email>
<organization>Snowflake Computing</organization>
<organizationUrl>https://www.snowflake.com</organizationUrl>
</developer>
</developers>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<connection>
scm:git:https://github.com/snowflakedb/snowflake-kafka-connector.git
</connection>
<developerConnection>
scm:git:https://github.com/snowflakedb/snowflake-kafka-connector.git
</developerConnection>
<url>https://github.com/snowflakedb/snowflake-kafka-connector</url>
</scm>
<!-- Set our Language Level to Java 11 -->
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<skipTests>false</skipTests>
<skipUnitTests>${skipTests}</skipUnitTests>
<skipIntegrationTests>${skipTests}</skipIntegrationTests>
<license.processing.dependencyJarsDir>${project.build.directory}/dependency-jars
</license.processing.dependencyJarsDir>
<license.processing.dependencyListFile>${project.build.directory}/dependency-list.txt
</license.processing.dependencyListFile>
<!--
/licenses folder is copied into zip file distribution by kafka-connect-maven-plugin
It is an undocumented behaviour that originates from the zip file structure https://docs.confluent.io/platform/current/connect/confluent-hub/component-archive.html
There is no way to change the path for something inside /target, so it needs to be cleaned up independently
-->
<license.processing.targetDir>${project.build.directory}/../licenses</license.processing.targetDir>
<kafka.version>3.9.1</kafka.version>
<awaitility.version>4.2.2</awaitility.version>
<assertj-core.version>3.26.3</assertj-core.version>
<confluent.version>7.9.2</confluent.version>
<!--Compatible protobuf version https://github.com/confluentinc/common/blob/v7.7.0/pom.xml#L91 -->
<protobuf.version>3.25.5</protobuf.version>
<guava.version>33.4.0-jre</guava.version>
<jackson.version>2.18.2</jackson.version>
<commons-compress.version>1.27.1</commons-compress.version>
<maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
<snowflake-jdbc.version>4.0.2</snowflake-jdbc.version>
<slf4j-api.version>2.0.17</slf4j-api.version>
<parquet.version>1.14.4</parquet.version>
<commons-lang3.version>3.18.0</commons-lang3.version>
<auto-value.version>1.10.4</auto-value.version>
</properties>
<repositories>
<repository>
<id>confluent</id>
<name>Confluent</name>
<url>https://packages.confluent.io/maven/</url>
</repository>
<repository>
<id>cloudera-repo</id>
<url>
https://repository.cloudera.com/content/repositories/releases/
</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<!--
Copy all project dependencies to target/dependency-jars directory. License processing Python script will check
only this directory for the license files of SDK dependencies.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<goals>
<goal>copy-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<outputDirectory>${license.processing.dependencyJarsDir}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
</configuration>
</execution>
</executions>
</plugin>
<!--
Compile the list of SDK dependencies in 'compile' and 'runtime' scopes.
This list is an entry point for the license processing python script.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.6.0</version>
<configuration>
<includeScope>runtime</includeScope>
<outputFile>${license.processing.dependencyListFile}</outputFile>
</configuration>
<executions>
<execution>
<goals>
<goal>list</goal>
</goals>
<phase>generate-resources</phase>
</execution>
</executions>
</plugin>
<!--
Plugin executes license processing Python script, which copies third party license files into the "license"
directory which is later copied into zip file distribution.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>process-third-party-licenses</id>
<goals>
<goal>exec</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<executable>python3</executable>
<arguments>
<argument>${project.basedir}/scripts/process_licenses.py</argument>
<argument>${license.processing.dependencyListFile}</argument>
<argument>${license.processing.dependencyJarsDir}</argument>
<argument>${license.processing.targetDir}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.confluent</groupId>
<version>0.11.1</version>
<artifactId>kafka-connect-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>kafka-connect</goal>
</goals>
<configuration>
<title>Snowflake Sink Connector</title>
<documentationUrl>
https://docs.snowflake.com/en/connectors/kafkahp/about
</documentationUrl>
<description>
The Snowflake High Performance Kafka connector lets you
quickly and easily move messages in formats
such as Avro, JSON, and Protobuf from Kafka topics
into Snowflake tables. It uses the Snowpipe Streaming High Performance architecture.
</description>
<logo>logo/snowflake.png</logo>
<supportProviderName>Snowflake Inc.
</supportProviderName>
<supportSummary>Some features of the connector may be in preview
as mentioned in the documentation, and
provided primarily for evaluation and testing
purposes. If you decide to use a preview feature
in production, please contact Snowflake Support
before doing so.
</supportSummary>
<ownerUsername>snowflakeinc</ownerUsername>
<ownerType>organization</ownerType>
<ownerName>Snowflake Inc.</ownerName>
<ownerUrl>https://snowflake.com/</ownerUrl>
<ownerLogo>logo/snowflake.png</ownerLogo>
<componentTypes>
<componentType>sink</componentType>
</componentTypes>
<tags>
<tag>Snowflake</tag>
<tag>jdbc</tag>
<tag>database</tag>
<tag>dbms</tag>
<tag>rdbms</tag>
<tag>sql</tag>
<tag>data warehouse</tag>
<tag>high performance</tag>
</tags>
<confluentControlCenterIntegration>true
</confluentControlCenterIntegration>
<singleMessageTransforms>true
</singleMessageTransforms>
<supportedEncodings>any</supportedEncodings>
</configuration>
</execution>
</executions>
</plugin>
<!-- Clean additional files created outside of target -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<failOnError>false</failOnError>
<filesets>
<fileset>
<directory>${project.basedir}/licenses</directory>
<includes>
<include>**</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.12.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.8.0</version>
<extensions>true</extensions>
<configuration>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skipTests>${skipUnitTests}</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${auto-value.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}-${project.version}
</finalName>
<appendAssemblyId>false</appendAssemblyId>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.2.2</version>
<executions>
<execution>
<id>default-jar</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>package</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<failOnError>false</failOnError>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<!-- disable default maven deploy plugin since we are using gpg:sign-and-deploy-file -->
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-fips -->
<dependency>
<!-- Do not match this with pom.xml-->
<!-- This dependency won't be present in the kafka connect runtime, hence we are packaging this in an uber jar -->
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-fips</artifactId>
<version>2.1.8</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.kafka/connect-api -->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-api</artifactId>
<version>${kafka.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>com.github.luben</groupId>
<artifactId>zstd-jni</artifactId>
</exclusion>
<exclusion>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
<exclusions>
<exclusion>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!--JDBC driver for building connection with Snowflake-->
<dependency>
<groupId>net.snowflake</groupId>
<artifactId>snowflake-jdbc</artifactId>
<version>${snowflake-jdbc.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
<version>${protobuf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.avro</groupId>
<artifactId>avro</artifactId>
<version>1.11.4</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-compress -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>${commons-compress.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Direct dependency for commons-lang3 with latest version to fix CVE-2025-48924 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<!-- <https://mvnrepository.com/artifact/io.confluent/kafka-schema-registry-client?repo=confluent-packages -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client</artifactId>
<version>${confluent.version}</version>
<exclusions>
<exclusion>
<groupId>io.confluent</groupId>
<artifactId>common-utils</artifactId>
</exclusion>
<exclusion>
<groupId>io.confluent</groupId>
<artifactId>common-config</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
</exclusion>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/io.confluent/kafka-connect-avro-data -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
<version>${confluent.version}</version>
<exclusions>
<exclusion>
<groupId>io.confluent</groupId>
<artifactId>common-utils</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/io.confluent/kafka-connect-avro-converter -->
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-connect-avro-converter</artifactId>
<version>${confluent.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-schema-registry-client-encryption</artifactId>
<version>${confluent.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-core -->
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>4.2.26</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.dropwizard.metrics/metrics-jmx -->
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jmx</artifactId>
<version>4.2.3</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
<!-- Annotations (@AutoValue) visible to source; processor is on annotationProcessorPaths only -->
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value-annotations</artifactId>
<version>${auto-value.version}</version>
</dependency>
<!-- Processor only needed at compile time (generates AutoValue_* classes) -->
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${auto-value.version}</version>
<scope>provided</scope>
</dependency>
<!-- Caffeine cache library for client-side validation (copied from SSv1 SDK) -->
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
<artifactId>caffeine</artifactId>
<version>2.9.3</version>
</dependency>
<!-- https://github.com/failsafe-lib/failsafe-->
<dependency>
<groupId>dev.failsafe</groupId>
<artifactId>failsafe</artifactId>
<version>3.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.parquet</groupId>
<artifactId>parquet-column</artifactId>
<version>${parquet.version}</version>
</dependency>
<!--junit for unit test-->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<!--JUnit Jupiter Engine to depend on the JUnit4 engine and JUnit 4 API -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
</dependency>
<!-- Optional : override the JUnit 4 API version provided by junit-vintage-engine -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<!--Mockito for unit test-->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j-api.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.17.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.stefanbirkner</groupId>
<artifactId>system-rules</artifactId>
<version>1.19.0</version>
<scope>test</scope>
</dependency>
<!-- Apache Commons DBUtils for database operations in tests -->
<dependency>
<groupId>commons-dbutils</groupId>
<artifactId>commons-dbutils</artifactId>
<version>1.8.1</version>
<scope>test</scope>
</dependency>
<!-- Apache Commons DBCP2 for connection pooling in tests -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.12.0</version>
<scope>test</scope>
</dependency>
<!--Kafka JSON converter for SMT unit test-->
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-json</artifactId>
<version>0.9.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<type>test-jar</type>
<classifier>test</classifier>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-server-common</artifactId>
<type>test-jar</type>
<classifier>test</classifier>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-runtime</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>connect-runtime</artifactId>
<version>${kafka.version}</version>
<classifier>test</classifier>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
<classifier>test</classifier>
<type>test-jar</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.xerial.snappy</groupId>
<artifactId>snappy-java</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.assertj/assertj-core -->
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj-core.version}</version>
<scope>test</scope>
</dependency>
<!-- Testcontainers for embedded proxy server in tests -->
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.19.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.snowflake</groupId>
<artifactId>snowpipe-streaming</artifactId>
<version>1.2.0</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>aws</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<includes>
<include>**/*IT.java</include>
</includes>
<excludes>
<exclude>none</exclude>
</excludes>
<skipTests>${skipIntegrationTests}</skipTests>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>non-aws</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<includes>
<include>**/*IT.java</include>
</includes>
<excludes>
<!-- External volume configured only on AWS env -->
<exclude>**/*Iceberg*IT.java</exclude>
<!-- Rowset API is disabled on Azure and GCP -->
<exclude>**/*RowSchemaProvider*IT.java</exclude>
<exclude>**/*StreamingIngestClientV2Provider*IT.java</exclude>
<exclude>**/*SnowflakeSinkServiceV2*IT.java</exclude>
</excludes>
<skipTests>${skipIntegrationTests}</skipTests>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
================================================
FILE: profile.json.example
================================================
{
"user": "user name",
"private_key": "private key",
"host": "acountname.snowflakecomputing.com:443",
"schema": "schema name",
"database": "database name",
"warehouse": "warehouse name"
}
================================================
FILE: scripts/process_licenses.py
================================================
#!/usr/bin/env python
# This script processes licenses of 3rd party dependencies and stores them in the JAR. The rules are:
# 1. Dependencies, which contains a license file should be put into the shaded JAR as-is.
# 2. Dependencies, which do not contain a license file should be mentioned in the file ADDITIONAL_LICENCES, together with the name of its license.
#
#
# The script accepts the following arguments:
# * DEPENDENCY_LIST_FILE_PATH
# * Can be obtained by running mvn dependency:list -DincludeScope=runtime -DoutputFile=target/dependency_list.txt
# * DEPENDENCIES_DIR
# * Directory containing the JAR files of all SDK dependencies. Automatically generated by `mvn clean package` in target/dependency-jars
# * TARGET_DIR
# * Where to save all output, should be target/generated-sources/META-INF/third-party-licenses
#
#
# Useful mvn commands:
# * mvn clean license:add-third-party
# * Generate dependency report; useful to find out licenses for dependencies that don't ship with a license file
# * mvn dependency:list -DincludeScope=runtime -DoutputFile=target/dependency_list.txt
# * Used as input of this script (DEPENDENCY_LIST_FILE_PATH)
import sys
from pathlib import Path
from zipfile import ZipFile
# License name constants
APACHE_LICENSE = "Apache License 2.0"
BSD_2_CLAUSE_LICENSE = "2-Clause BSD License"
BSD_3_CLAUSE_LICENSE = "3-Clause BSD License"
EDL_10_LICENSE = "EDL 1.0"
MIT_LICENSE = "The MIT License"
GO_LICENSE = "The Go license"
BOUNCY_CASTLE_LICENSE = "Bouncy Castle License"
LGPL = "LGPL License"
# The SDK does not need to include licenses of dependencies, which aren't shaded
IGNORED_DEPENDENCIES = {"net.snowflake:snowflake-jdbc", "org.slf4j:slf4j-api"}
# List of dependencies, which don't ship with a license file.
# Only add a new record here after verifying that the dependency JAR does not contain a license!
ADDITIONAL_LICENSES_MAP = {
"com.eclipsesource.minimal-json:minimal-json": MIT_LICENSE,
"com.fasterxml.jackson.dataformat:jackson-dataformat-protobuf": APACHE_LICENSE,
"com.github.ben-manes.caffeine:caffeine": APACHE_LICENSE,
"com.github.luben:zstd-jni": BSD_2_CLAUSE_LICENSE,
"com.google.auto.value:auto-value-annotations": APACHE_LICENSE,
"com.google.code.findbugs:jsr305": APACHE_LICENSE,
"com.google.crypto.tink:tink": APACHE_LICENSE,
"com.google.errorprone:error_prone_annotations": APACHE_LICENSE,
"com.google.code.findbugs:annotations": LGPL,
"com.google.code.gson:gson": APACHE_LICENSE,
"com.google.guava:failureaccess": APACHE_LICENSE,
"com.google.guava:listenablefuture": APACHE_LICENSE,
"com.google.j2objc:j2objc-annotations": APACHE_LICENSE,
"com.google.protobuf:protobuf-java": BSD_3_CLAUSE_LICENSE,
"com.google.protobuf:protobuf-java-util": BSD_3_CLAUSE_LICENSE,
"com.google.re2j:re2j": GO_LICENSE,
"com.hubspot.jackson:jackson-datatype-protobuf": APACHE_LICENSE,
"com.ibm.jsonata4java:JSONata4Java": APACHE_LICENSE,
"com.snowflake:snowpipe-streaming": APACHE_LICENSE,
"com.squareup:protoparser": APACHE_LICENSE,
"dev.failsafe:failsafe": APACHE_LICENSE,
"info.picocli:picocli": APACHE_LICENSE,
"io.confluent:common-utils": APACHE_LICENSE,
"io.confluent:dek-registry-client": APACHE_LICENSE,
"io.confluent:kafka-avro-serializer": APACHE_LICENSE,
"io.confluent:kafka-connect-avro-converter": APACHE_LICENSE,
"io.confluent:kafka-connect-avro-data": APACHE_LICENSE,
"io.confluent:kafka-schema-converter": APACHE_LICENSE,
"io.confluent:kafka-schema-registry-client": APACHE_LICENSE,
"io.confluent:kafka-schema-registry-client-encryption": APACHE_LICENSE,
"io.confluent:kafka-schema-registry-client-encryption-tink": APACHE_LICENSE,
"io.confluent:kafka-schema-rules": APACHE_LICENSE,
"io.confluent:kafka-schema-serializer": APACHE_LICENSE,
"io.confluent:logredactor": APACHE_LICENSE,
"io.confluent:logredactor-metrics": APACHE_LICENSE,
"io.dropwizard.metrics:metrics-core": APACHE_LICENSE,
"io.dropwizard.metrics:metrics-jmx": APACHE_LICENSE,
"io.dropwizard.metrics:metrics-jvm": APACHE_LICENSE,
"io.swagger.core.v3:swagger-annotations": APACHE_LICENSE,
"net.snowflake:snowflake-kafka-connector": APACHE_LICENSE,
"net.snowflake:snowflake-ingest-sdk": APACHE_LICENSE,
"org.agrona:agrona": APACHE_LICENSE,
"org.antlr:antlr4-runtime": BSD_3_CLAUSE_LICENSE,
"org.apache.kafka:kafka-clients": APACHE_LICENSE,
"org.apache.parquet:parquet-common": APACHE_LICENSE,
"org.apache.parquet:parquet-format-structures": APACHE_LICENSE,
"org.bouncycastle:bc-fips": BOUNCY_CASTLE_LICENSE,
"org.bouncycastle:bcpkix-fips": BOUNCY_CASTLE_LICENSE,
"org.projectnessie.cel:cel-core": APACHE_LICENSE,
"org.projectnessie.cel:cel-generated-antlr": APACHE_LICENSE,
"org.projectnessie.cel:cel-generated-pb": APACHE_LICENSE,
"org.projectnessie.cel:cel-jackson": APACHE_LICENSE,
"org.projectnessie.cel:cel-tools": APACHE_LICENSE,
"org.xerial.snappy:snappy-java": APACHE_LICENSE,
"org.yaml:snakeyaml": APACHE_LICENSE,
"org.roaringbitmap:RoaringBitmap": APACHE_LICENSE,
"org.jspecify:jspecify": APACHE_LICENSE,
}
def parse_cmdline_args():
if len(sys.argv) != 4:
raise Exception(
"usage: process_licenses.py DEPENDENCY_LIST_FILE_PATH DEPENDENCIES_DIR TARGET_DIR"
)
dependency_list_file_path = Path(sys.argv[1]).absolute()
dependencies_dir_path = Path(sys.argv[2]).absolute()
target_dir = Path(sys.argv[3]).absolute()
if (
not dependency_list_file_path.exists()
or not dependency_list_file_path.is_file()
):
raise Exception(f"File {dependency_list_file_path} does not exist")
if not dependencies_dir_path.exists() or not dependencies_dir_path.is_dir():
raise Exception(f"Directory {dependencies_dir_path} does not exist")
return dependency_list_file_path, dependencies_dir_path, target_dir
def main():
dependency_list_path, dependency_jars_path, target_dir = parse_cmdline_args()
dependency_count = 0
dependency_with_license_count = 0
dependency_without_license_count = 0
dependency_ignored_count = 0
missing_licenses_str = ""
target_dir.mkdir(parents=True, exist_ok=True)
with open(dependency_list_path, "r") as dependency_file_handle:
for line in dependency_file_handle.readlines():
line = line.strip()
if line == "" or line == "The following files have been resolved:":
continue
dependency_count += 1
# Line is a string like: "commons-codec:commons-codec:jar:1.15:compile -- module org.apache.commons.codec [auto]"
artifact_details = line.split()[0]
group_id, artifact_id, _, version, scope = artifact_details.split(":")
current_jar = Path(dependency_jars_path, f"{artifact_id}-{version}.jar")
if not current_jar.exists() and current_jar.is_file():
raise Exception(f"Expected JAR file does not exist: {current_jar}")
current_jar_as_zip = ZipFile(current_jar)
dependency_lookup_key = f"{group_id}:{artifact_id}"
if dependency_lookup_key in IGNORED_DEPENDENCIES:
dependency_ignored_count += 1
continue
license_found = False
for zip_info in current_jar_as_zip.infolist():
if zip_info.is_dir():
continue
if zip_info.filename in (
"META-INF/LICENSE.txt",
"META-INF/LICENSE",
"META-INF/LICENSE.md",
):
license_found = True
dependency_with_license_count += 1
# Extract license to the target directory
zip_info.filename = f"LICENSE_{group_id}__{artifact_id}"
current_jar_as_zip.extract(zip_info, target_dir)
break
if (
"license" in zip_info.filename.lower()
): # Log potential license matches
print(f"Potential license match: {current_jar} {zip_info}")
if not license_found:
print(
f"License not found {current_jar}; using value from ADDITIONAL_LICENSES_MAP"
)
license_name = ADDITIONAL_LICENSES_MAP.get(dependency_lookup_key)
if license_name:
dependency_without_license_count += 1
missing_licenses_str += f"{dependency_lookup_key}: {license_name}\n"
else:
err_msg = f"The dependency {dependency_lookup_key} does not ship a license file, but neither is it not defined in ADDITIONAL_LICENSES_MAP"
raise Exception(err_msg)
with open(
Path(target_dir, "ADDITIONAL_LICENCES"), "w"
) as additional_licenses_handle:
additional_licenses_handle.write(missing_licenses_str)
if dependency_count < 30:
raise Exception(
f"Suspiciously low number of dependency JARs detected in {dependency_jars_path}: {dependency_count}"
)
print("License generation finished")
print(f"\tTotal dependencies: {dependency_count}")
print(f"\tTotal dependencies (with license): {dependency_with_license_count}")
print(f"\tTotal dependencies (without license): {dependency_without_license_count}")
print(f"\tIgnored dependencies: {dependency_ignored_count}")
if __name__ == "__main__":
main()
================================================
FILE: src/main/java/com/snowflake/ingest/streaming/internal/TimestampWrapper.java
================================================
package com.snowflake.ingest.streaming.internal;
import com.snowflake.kafka.connector.internal.validation.Power10Util;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.RoundingMode;
import java.time.OffsetDateTime;
/**
* Copy of {@code net.snowflake.ingest.streaming.internal.TimestampWrapper} from
* snowflake-ingest-sdk used by {@code PkgDataValidationUtil} to serialize timestamp values without
* depending on the legacy SDK artifact.
*/
public class TimestampWrapper {
private final long epoch;
private final int fraction;
private final int timezoneOffsetSeconds;
private final int scale;
private static final int BITS_FOR_TIMEZONE = 14;
private static final int MASK_OF_TIMEZONE = (1 << BITS_FOR_TIMEZONE) - 1;
public TimestampWrapper(OffsetDateTime offsetDateTime, int scale) {
if (scale < 0 || scale > 9) {
throw new IllegalArgumentException(
String.format("Scale must be between 0 and 9, actual: %d", scale));
}
this.epoch = offsetDateTime.toEpochSecond();
this.fraction =
offsetDateTime.getNano()
/ Power10Util.intTable[9 - scale]
* Power10Util.intTable[9 - scale];
this.timezoneOffsetSeconds = offsetDateTime.getOffset().getTotalSeconds();
this.scale = scale;
}
/** Convert the timestamp to a binary representation. */
public BigInteger toBinary(boolean includeTimezone) {
BigDecimal timeInNs =
BigDecimal.valueOf(epoch).scaleByPowerOfTen(9).add(new BigDecimal(fraction));
BigDecimal scaledTime = timeInNs.scaleByPowerOfTen(scale - 9);
scaledTime = scaledTime.setScale(0, RoundingMode.DOWN);
BigInteger fcpInt = scaledTime.unscaledValue();
if (includeTimezone) {
int offsetMin = timezoneOffsetSeconds / 60;
offsetMin += 1440;
fcpInt = fcpInt.shiftLeft(BITS_FOR_TIMEZONE);
fcpInt = fcpInt.add(BigInteger.valueOf(offsetMin & MASK_OF_TIMEZONE));
}
return fcpInt;
}
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/ConnectorConfigTools.java
================================================
/*
* Copyright (c) 2019 Snowflake Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.snowflake.kafka.connector;
import com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams;
import com.snowflake.kafka.connector.internal.KCLogger;
import java.util.Locale;
import java.util.Map;
import org.apache.kafka.common.config.ConfigDef;
public class ConnectorConfigTools {
private static final KCLogger LOGGER = new KCLogger(ConnectorConfigTools.class.getName());
public static final ConfigDef.Validator BOOLEAN_VALIDATOR =
new ConfigDef.Validator() {
private final ConfigDef.ValidString validator =
ConfigDef.ValidString.in(
Boolean.TRUE.toString().toLowerCase(Locale.ROOT),
Boolean.FALSE.toString().toLowerCase(Locale.ROOT));
@Override
public void ensureValid(String name, Object value) {
if (value instanceof String) {
value = ((String) value).toLowerCase(Locale.ROOT);
}
this.validator.ensureValid(name, value);
}
};
public static void setDefaultValues(Map<String, String> config) {
if (!config.containsKey(KafkaConnectorConfigParams.CACHE_TABLE_EXISTS)) {
config.put(
KafkaConnectorConfigParams.CACHE_TABLE_EXISTS,
String.valueOf(KafkaConnectorConfigParams.CACHE_TABLE_EXISTS_DEFAULT));
LOGGER.info(
"{} set to default {}",
KafkaConnectorConfigParams.CACHE_TABLE_EXISTS,
KafkaConnectorConfigParams.CACHE_TABLE_EXISTS_DEFAULT);
}
if (!config.containsKey(KafkaConnectorConfigParams.CACHE_TABLE_EXISTS_EXPIRE_MS)) {
config.put(
KafkaConnectorConfigParams.CACHE_TABLE_EXISTS_EXPIRE_MS,
String.valueOf(KafkaConnectorConfigParams.CACHE_TABLE_EXISTS_EXPIRE_MS_DEFAULT));
LOGGER.info(
"{} set to default {} ms",
KafkaConnectorConfigParams.CACHE_TABLE_EXISTS_EXPIRE_MS,
KafkaConnectorConfigParams.CACHE_TABLE_EXISTS_EXPIRE_MS_DEFAULT);
}
if (!config.containsKey(KafkaConnectorConfigParams.CACHE_PIPE_EXISTS)) {
config.put(
KafkaConnectorConfigParams.CACHE_PIPE_EXISTS,
String.valueOf(KafkaConnectorConfigParams.CACHE_PIPE_EXISTS_DEFAULT));
LOGGER.info(
"{} set to default {}",
KafkaConnectorConfigParams.CACHE_PIPE_EXISTS,
KafkaConnectorConfigParams.CACHE_PIPE_EXISTS_DEFAULT);
}
if (!config.containsKey(KafkaConnectorConfigParams.CACHE_PIPE_EXISTS_EXPIRE_MS)) {
config.put(
KafkaConnectorConfigParams.CACHE_PIPE_EXISTS_EXPIRE_MS,
String.valueOf(KafkaConnectorConfigParams.CACHE_PIPE_EXISTS_EXPIRE_MS_DEFAULT));
LOGGER.info(
"{} set to default {} ms",
KafkaConnectorConfigParams.CACHE_PIPE_EXISTS_EXPIRE_MS,
KafkaConnectorConfigParams.CACHE_PIPE_EXISTS_EXPIRE_MS_DEFAULT);
}
}
/**
* Get a property from the config map
*
* @param config connector configuration
* @param key name of the key to be retrieved
* @return property value or null
*/
public static String getProperty(final Map<String, String> config, final String key) {
if (config.containsKey(key) && !config.get(key).isEmpty()) {
return config.get(key);
} else {
return null;
}
}
/* The allowed values for tombstone records. */
public enum BehaviorOnNullValues {
// Default as the name suggests, would be a default behavior which will not filter null values.
// This will put an empty JSON string in corresponding snowflake table.
// Using this means we will fall back to old behavior before introducing this config.
DEFAULT,
// Ignore would filter out records which has null value, but a valid key.
IGNORE,
;
/* Validator to validate behavior.on.null.values which says whether kafka should keep null value records or ignore them while ingesting into snowflake table. */
public static final ConfigDef.Validator VALIDATOR =
new ConfigDef.Validator() {
private final ConfigDef.ValidString validator = ConfigDef.ValidString.in(names());
@Override
public void ensureValid(String name, Object value) {
if (value instanceof String) {
value = ((String) value).toLowerCase(Locale.ROOT);
}
validator.ensureValid(name, value);
}
// Overridden here so that ConfigDef.toEnrichedRst shows possible values correctly
@Override
public String toString() {
return validator.toString();
}
};
// All valid enum values
public static String[] names() {
BehaviorOnNullValues[] behaviors = values();
String[] result = new String[behaviors.length];
for (int i = 0; i < behaviors.length; i++) {
result[i] = behaviors[i].toString();
}
return result;
}
@Override
public String toString() {
return name().toLowerCase(Locale.ROOT);
}
}
/* https://www.confluent.io/blog/kafka-connect-deep-dive-error-handling-dead-letter-queues/ */
public enum ErrorTolerance {
/** Tolerate no errors. */
NONE,
/** Tolerate all errors. */
ALL;
/**
* Validator to validate behavior.on.null.values which says whether kafka should keep null value
* records or ignore them while ingesting into snowflake table.
*/
public static final ConfigDef.Validator VALIDATOR =
new ConfigDef.Validator() {
private final ConfigDef.ValidString validator =
ConfigDef.ValidString.in(ErrorTolerance.names());
@Override
public void ensureValid(String name, Object value) {
if (value instanceof String) {
value = ((String) value).toLowerCase(Locale.ROOT);
}
validator.ensureValid(name, value);
}
@Override
public String toString() {
return validator.toString();
}
};
/**
* @return All valid enum values
*/
public static String[] names() {
ErrorTolerance[] errorTolerances = values();
String[] result = new String[errorTolerances.length];
for (int i = 0; i < errorTolerances.length; i++) {
result[i] = errorTolerances[i].toString();
}
return result;
}
@Override
public String toString() {
return name().toLowerCase(Locale.ROOT);
}
}
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/ConnectorConfigValidator.java
================================================
package com.snowflake.kafka.connector;
import java.util.Map;
public interface ConnectorConfigValidator {
/**
* Validate input configuration
*
* @param config configuration Map
*/
void validateConfig(Map<String, String> config);
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/Constants.java
================================================
package com.snowflake.kafka.connector;
public final class Constants {
public static final String DEFAULT_PIPE_NAME_SUFFIX = "-STREAMING";
public static final class KafkaConnectorConfigParams {
// connector parameter list
public static final String NAME = "name";
public static final String TOPICS = "topics";
public static final String SNOWFLAKE_TOPICS2TABLE_MAP = "snowflake.topic2table.map";
public static final String SNOWFLAKE_URL_NAME = "snowflake.url.name";
public static final String SNOWFLAKE_USER_NAME = "snowflake.user.name";
public static final String SNOWFLAKE_PRIVATE_KEY = "snowflake.private.key";
public static final String SNOWFLAKE_DATABASE_NAME = "snowflake.database.name";
public static final String SNOWFLAKE_SCHEMA_NAME = "snowflake.schema.name";
public static final String SNOWFLAKE_PRIVATE_KEY_PASSPHRASE =
"snowflake.private.key.passphrase";
public static final String SNOWFLAKE_ROLE_NAME = "snowflake.role.name";
public static final String SNOWFLAKE_AUTHENTICATOR = "snowflake.authenticator";
public static final String SNOWFLAKE_OAUTH_CLIENT_ID = "snowflake.oauth.client.id";
public static final String SNOWFLAKE_OAUTH_CLIENT_SECRET = "snowflake.oauth.client.secret";
public static final String SNOWFLAKE_OAUTH_REFRESH_TOKEN = "snowflake.oauth.refresh.token";
public static final String SNOWFLAKE_OAUTH_TOKEN_ENDPOINT = "snowflake.oauth.token.endpoint";
public static final String SNOWFLAKE_JDBC_MAP = "snowflake.jdbc.map";
public static final String SNOWFLAKE_METADATA_CREATETIME = "snowflake.metadata.createtime";
public static final String SNOWFLAKE_METADATA_TOPIC = "snowflake.metadata.topic";
public static final String SNOWFLAKE_METADATA_OFFSET_AND_PARTITION =
"snowflake.metadata.offset.and.partition";
public static final String SNOWFLAKE_METADATA_ALL = "snowflake.metadata.all";
public static final String SNOWFLAKE_METADATA_ALL_DEFAULT = "true";
public static final String SNOWFLAKE_STREAMING_METADATA_CONNECTOR_PUSH_TIME =
"snowflake.streaming.metadata.connectorPushTime";
public static final boolean SNOWFLAKE_STREAMING_METADATA_CONNECTOR_PUSH_TIME_DEFAULT = true;
public static final String SNOWFLAKE_STREAMING_CLIENT_PROVIDER_OVERRIDE_MAP =
"snowflake.streaming.client.provider.override.map";
public static final String SNOWFLAKE_OPEN_CHANNEL_IO_THREADS =
"snowflake.open.channel.io.threads";
public static final int SNOWFLAKE_OPEN_CHANNEL_IO_THREADS_DEFAULT = 50;
// Validation
public static final String SNOWFLAKE_VALIDATION = "snowflake.validation";
public static final String SNOWFLAKE_VALIDATION_DEFAULT = "server_side";
// Snowpipe Streaming Classic (SSv1) offset migration
public static final String SNOWFLAKE_SSV1_OFFSET_MIGRATION =
"snowflake.streaming.classic.offset.migration";
public static final String SNOWFLAKE_SSV1_OFFSET_MIGRATION_DEFAULT = "skip";
public static final String SNOWFLAKE_SSV1_OFFSET_MIGRATION_INCLUDE_CONNECTOR_NAME =
"snowflake.streaming.classic.offset.migration.include.connector.name";
public static final boolean SNOWFLAKE_SSV1_OFFSET_MIGRATION_INCLUDE_CONNECTOR_NAME_DEFAULT =
false;
// Caching
public static final String CACHE_TABLE_EXISTS = "snowflake.cache.table.exists";
public static final boolean CACHE_TABLE_EXISTS_DEFAULT = true;
public static final String CACHE_TABLE_EXISTS_EXPIRE_MS =
"snowflake.cache.table.exists.expire.ms";
public static final long CACHE_TABLE_EXISTS_EXPIRE_MS_DEFAULT = 5 * 60 * 1000L;
public static final long CACHE_TABLE_EXISTS_EXPIRE_MS_MIN = 1L;
public static final String CACHE_PIPE_EXISTS = "snowflake.cache.pipe.exists";
public static final boolean CACHE_PIPE_EXISTS_DEFAULT = true;
public static final String CACHE_PIPE_EXISTS_EXPIRE_MS =
"snowflake.cache.pipe.exists.expire.ms";
public static final long CACHE_PIPE_EXISTS_EXPIRE_MS_DEFAULT = 5 * 60 * 1000L;
public static final long CACHE_PIPE_EXISTS_EXPIRE_MS_MIN = 1L;
public static final String BEHAVIOR_ON_NULL_VALUES = "behavior.on.null.values";
public static final String VALUE_CONVERTER_SCHEMAS_ENABLE = "value.converter.schemas.enable";
// metrics
public static final String JMX_OPT = "jmx";
public static final boolean JMX_OPT_DEFAULT = true;
public static final String ERRORS_TOLERANCE_CONFIG = "errors.tolerance";
public static final String ERRORS_TOLERANCE_DEFAULT =
ConnectorConfigTools.ErrorTolerance.NONE.toString();
public static final String ERRORS_LOG_ENABLE_CONFIG = "errors.log.enable";
public static final boolean ERRORS_LOG_ENABLE_DEFAULT = false;
public static final String ERRORS_DEAD_LETTER_QUEUE_TOPIC_NAME_CONFIG =
"errors.deadletterqueue.topic.name";
public static final String ERRORS_DEAD_LETTER_QUEUE_TOPIC_NAME_DEFAULT = "";
public static final String ENABLE_TASK_FAIL_ON_AUTHORIZATION_ERRORS =
"enable.task.fail.on.authorization.errors";
public static final boolean ENABLE_TASK_FAIL_ON_AUTHORIZATION_ERRORS_DEFAULT = false;
// Compatibility validation
public static final String SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC =
"snowflake.streaming.validate.compatibility.with.classic";
public static final boolean SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC_DEFAULT =
true;
public static final String
SNOWFLAKE_COMPATIBILITY_ENABLE_AUTOGENERATED_TABLE_NAME_SANITIZATION =
"snowflake.compatibility.enable.autogenerated.table.name.sanitization";
public static final boolean
SNOWFLAKE_COMPATIBILITY_ENABLE_AUTOGENERATED_TABLE_NAME_SANITIZATION_DEFAULT = false;
public static final String SNOWFLAKE_COMPATIBILITY_ENABLE_COLUMN_IDENTIFIER_NORMALIZATION =
"snowflake.compatibility.enable.column.identifier.normalization";
public static final boolean
SNOWFLAKE_COMPATIBILITY_ENABLE_COLUMN_IDENTIFIER_NORMALIZATION_DEFAULT = false;
public static final String SNOWFLAKE_ENABLE_SCHEMATIZATION = "snowflake.enable.schematization";
public static final boolean SNOWFLAKE_ENABLE_SCHEMATIZATION_DEFAULT = true;
// MDC logging header
public static final String ENABLE_MDC_LOGGING_CONFIG = "enable.mdc.logging";
public static final String ENABLE_MDC_LOGGING_DEFAULT = "false";
public static final String KEY_CONVERTER = "key.converter";
public static final String VALUE_CONVERTER = "value.converter";
public static final String VALUE_CONVERTER_SCHEMA_REGISTRY_URL =
"value.converter.schema.registry.url";
// Proxy Info
public static final String JVM_PROXY_HOST = "jvm.proxy.host";
public static final String JVM_PROXY_PORT = "jvm.proxy.port";
public static final String JVM_NON_PROXY_HOSTS = "jvm.nonProxy.hosts";
public static final String JVM_PROXY_USERNAME = "jvm.proxy.username";
public static final String JVM_PROXY_PASSWORD = "jvm.proxy.password";
// jvm proxy
public static final String HTTP_USE_PROXY = "http.useProxy";
public static final String HTTPS_PROXY_HOST = "https.proxyHost";
public static final String HTTPS_PROXY_PORT = "https.proxyPort";
public static final String HTTP_PROXY_HOST = "http.proxyHost";
public static final String HTTP_PROXY_PORT = "http.proxyPort";
public static final String HTTP_NON_PROXY_HOSTS = "http.nonProxyHosts";
public static final String HTTPS_PROXY_USER = "https.proxyUser";
public static final String HTTPS_PROXY_PASSWORD = "https.proxyPassword";
public static final String HTTP_PROXY_USER = "http.proxyUser";
public static final String HTTP_PROXY_PASSWORD = "http.proxyPassword";
}
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/DefaultConnectorConfigValidator.java
================================================
package com.snowflake.kafka.connector;
import static com.snowflake.kafka.connector.ConnectorConfigTools.BehaviorOnNullValues.VALIDATOR;
import static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams.BEHAVIOR_ON_NULL_VALUES;
import static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams.CACHE_PIPE_EXISTS;
import static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams.CACHE_PIPE_EXISTS_EXPIRE_MS;
import static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams.CACHE_TABLE_EXISTS;
import static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams.CACHE_TABLE_EXISTS_EXPIRE_MS;
import static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams.JMX_OPT;
import static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams.SNOWFLAKE_PRIVATE_KEY;
import static com.snowflake.kafka.connector.Utils.isValidSnowflakeApplicationName;
import static com.snowflake.kafka.connector.Utils.validateProxySettings;
import com.google.common.collect.ImmutableMap;
import com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams;
import com.snowflake.kafka.connector.config.AuthenticatorType;
import com.snowflake.kafka.connector.internal.KCLogger;
import com.snowflake.kafka.connector.internal.SnowflakeErrors;
import com.snowflake.kafka.connector.internal.streaming.StreamingConfigValidator;
import java.util.HashMap;
import java.util.Map;
import org.apache.kafka.common.config.ConfigException;
public class DefaultConnectorConfigValidator implements ConnectorConfigValidator {
private static final KCLogger LOGGER =
new KCLogger(DefaultConnectorConfigValidator.class.getName());
private final StreamingConfigValidator streamingConfigValidator;
public DefaultConnectorConfigValidator(StreamingConfigValidator streamingConfigValidator) {
this.streamingConfigValidator = streamingConfigValidator;
}
public void validateConfig(Map<String, String> config) {
Map<String, String> invalidConfigParams = new HashMap<String, String>();
// define the input parameters / keys in one place as static constants,
// instead of using them directly
// define the thresholds statically in one place as static constants,
// instead of using the values directly
// unique name of this connector instance
String connectorName = config.getOrDefault(KafkaConnectorConfigParams.NAME, "");
if (connectorName.isEmpty() || !isValidSnowflakeApplicationName(connectorName)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.NAME,
Utils.formatString(
"{} is empty or invalid. It should match Snowflake object identifier syntax. Please"
+ " see the documentation.",
KafkaConnectorConfigParams.NAME));
}
if (config.containsKey(KafkaConnectorConfigParams.SNOWFLAKE_TOPICS2TABLE_MAP)) {
try {
TopicToTableParser.parse(config.get(KafkaConnectorConfigParams.SNOWFLAKE_TOPICS2TABLE_MAP));
} catch (IllegalArgumentException e) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_TOPICS2TABLE_MAP, e.getMessage());
}
}
// sanity check
if (!config.containsKey(KafkaConnectorConfigParams.SNOWFLAKE_DATABASE_NAME)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_DATABASE_NAME,
Utils.formatString(
"{} cannot be empty.", KafkaConnectorConfigParams.SNOWFLAKE_DATABASE_NAME));
}
// sanity check
if (!config.containsKey(KafkaConnectorConfigParams.SNOWFLAKE_SCHEMA_NAME)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_SCHEMA_NAME,
Utils.formatString(
"{} cannot be empty.", KafkaConnectorConfigParams.SNOWFLAKE_SCHEMA_NAME));
}
AuthenticatorType authenticator;
try {
authenticator =
AuthenticatorType.fromConfig(
config.getOrDefault(
KafkaConnectorConfigParams.SNOWFLAKE_AUTHENTICATOR,
AuthenticatorType.SNOWFLAKE_JWT.toConfigValue()));
} catch (IllegalArgumentException e) {
invalidConfigParams.put(KafkaConnectorConfigParams.SNOWFLAKE_AUTHENTICATOR, e.getMessage());
authenticator = null;
}
if (authenticator != null) {
switch (authenticator) {
case OAUTH:
validateOAuthConfig(config, invalidConfigParams);
break;
case SNOWFLAKE_JWT:
if (!config.containsKey(SNOWFLAKE_PRIVATE_KEY)) {
invalidConfigParams.put(
SNOWFLAKE_PRIVATE_KEY,
Utils.formatString("{} cannot be empty", SNOWFLAKE_PRIVATE_KEY));
}
break;
default:
throw new IllegalStateException("Unhandled authenticator type: " + authenticator);
}
}
if (!config.containsKey(KafkaConnectorConfigParams.SNOWFLAKE_USER_NAME)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_USER_NAME,
Utils.formatString(
"{} cannot be empty.", KafkaConnectorConfigParams.SNOWFLAKE_USER_NAME));
}
if (!config.containsKey(KafkaConnectorConfigParams.SNOWFLAKE_URL_NAME)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_URL_NAME,
Utils.formatString("{} cannot be empty.", KafkaConnectorConfigParams.SNOWFLAKE_URL_NAME));
}
if (!config.containsKey(KafkaConnectorConfigParams.SNOWFLAKE_ROLE_NAME)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_ROLE_NAME,
Utils.formatString(
"{} cannot be empty.", KafkaConnectorConfigParams.SNOWFLAKE_ROLE_NAME));
}
// jvm proxy settings
invalidConfigParams.putAll(validateProxySettings(config));
if (config.containsKey(BEHAVIOR_ON_NULL_VALUES)) {
try {
// This throws an exception if config value is invalid.
VALIDATOR.ensureValid(BEHAVIOR_ON_NULL_VALUES, config.get(BEHAVIOR_ON_NULL_VALUES));
} catch (ConfigException exception) {
invalidConfigParams.put(
BEHAVIOR_ON_NULL_VALUES,
Utils.formatString(
"Kafka config: {} error: {}", BEHAVIOR_ON_NULL_VALUES, exception.getMessage()));
}
}
if (config.containsKey(JMX_OPT)) {
if (!(config.get(JMX_OPT).equalsIgnoreCase("true")
|| config.get(JMX_OPT).equalsIgnoreCase("false"))) {
invalidConfigParams.put(
JMX_OPT,
Utils.formatString("Kafka config: {} should either be true or false", JMX_OPT));
}
}
validateCacheConfig(config, invalidConfigParams);
validateCompatibilitySettings(config, invalidConfigParams);
// Check all config values for ingestion method == IngestionMethodConfig.SNOWPIPE_STREAMING
invalidConfigParams.putAll(streamingConfigValidator.validate(config));
// logs and throws exception if there are invalid params
handleInvalidParameters(ImmutableMap.copyOf(invalidConfigParams));
}
private void validateOAuthConfig(
Map<String, String> config, Map<String, String> invalidConfigParams) {
String clientId = config.getOrDefault(KafkaConnectorConfigParams.SNOWFLAKE_OAUTH_CLIENT_ID, "");
if (clientId.isEmpty()) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_OAUTH_CLIENT_ID,
Utils.formatString(
"{} must be non-empty when using oauth authenticator",
KafkaConnectorConfigParams.SNOWFLAKE_OAUTH_CLIENT_ID));
}
String clientSecret =
config.getOrDefault(KafkaConnectorConfigParams.SNOWFLAKE_OAUTH_CLIENT_SECRET, "");
if (clientSecret.isEmpty()) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_OAUTH_CLIENT_SECRET,
Utils.formatString(
"{} must be non-empty when using oauth authenticator",
KafkaConnectorConfigParams.SNOWFLAKE_OAUTH_CLIENT_SECRET));
}
}
private void validateCompatibilitySettings(
Map<String, String> config, Map<String, String> invalidConfigParams) {
boolean validateCompat =
Boolean.parseBoolean(
config.getOrDefault(
KafkaConnectorConfigParams.SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC,
String.valueOf(
KafkaConnectorConfigParams
.SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC_DEFAULT)));
if (!validateCompat) {
return;
}
String optOutHint =
" To skip this check, set "
+ KafkaConnectorConfigParams.SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC
+ "=false.";
// snowflake.validation must be client_side
String validation =
config.getOrDefault(
KafkaConnectorConfigParams.SNOWFLAKE_VALIDATION,
KafkaConnectorConfigParams.SNOWFLAKE_VALIDATION_DEFAULT);
if (!"client_side".equals(validation)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_VALIDATION,
KafkaConnectorConfigParams.SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC
+ " is enabled but "
+ KafkaConnectorConfigParams.SNOWFLAKE_VALIDATION
+ " is set to '"
+ validation
+ "'. For KC v3 compatibility, set "
+ KafkaConnectorConfigParams.SNOWFLAKE_VALIDATION
+ "=client_side."
+ optOutHint);
}
// snowflake.compatibility.enable.column.identifier.normalization must be true
String columnNormalization =
config.getOrDefault(
KafkaConnectorConfigParams
.SNOWFLAKE_COMPATIBILITY_ENABLE_COLUMN_IDENTIFIER_NORMALIZATION,
String.valueOf(
KafkaConnectorConfigParams
.SNOWFLAKE_COMPATIBILITY_ENABLE_COLUMN_IDENTIFIER_NORMALIZATION_DEFAULT));
if (!"true".equalsIgnoreCase(columnNormalization)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_COMPATIBILITY_ENABLE_COLUMN_IDENTIFIER_NORMALIZATION,
KafkaConnectorConfigParams.SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC
+ " is enabled but "
+ KafkaConnectorConfigParams
.SNOWFLAKE_COMPATIBILITY_ENABLE_COLUMN_IDENTIFIER_NORMALIZATION
+ " is set to '"
+ columnNormalization
+ "'. For KC v3 compatibility, set "
+ KafkaConnectorConfigParams
.SNOWFLAKE_COMPATIBILITY_ENABLE_COLUMN_IDENTIFIER_NORMALIZATION
+ "=true."
+ optOutHint);
}
// snowflake.compatibility.enable.autogenerated.table.name.sanitization must be true
String tableSanitization =
config.getOrDefault(
KafkaConnectorConfigParams
.SNOWFLAKE_COMPATIBILITY_ENABLE_AUTOGENERATED_TABLE_NAME_SANITIZATION,
String.valueOf(
KafkaConnectorConfigParams
.SNOWFLAKE_COMPATIBILITY_ENABLE_AUTOGENERATED_TABLE_NAME_SANITIZATION_DEFAULT));
if (!"true".equalsIgnoreCase(tableSanitization)) {
invalidConfigParams.put(
KafkaConnectorConfigParams
.SNOWFLAKE_COMPATIBILITY_ENABLE_AUTOGENERATED_TABLE_NAME_SANITIZATION,
KafkaConnectorConfigParams.SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC
+ " is enabled but "
+ KafkaConnectorConfigParams
.SNOWFLAKE_COMPATIBILITY_ENABLE_AUTOGENERATED_TABLE_NAME_SANITIZATION
+ " is set to '"
+ tableSanitization
+ "'. For KC v3 compatibility, set "
+ KafkaConnectorConfigParams
.SNOWFLAKE_COMPATIBILITY_ENABLE_AUTOGENERATED_TABLE_NAME_SANITIZATION
+ "=true."
+ optOutHint);
}
// snowflake.enable.schematization must be explicitly set (any value)
if (!config.containsKey(KafkaConnectorConfigParams.SNOWFLAKE_ENABLE_SCHEMATIZATION)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_ENABLE_SCHEMATIZATION,
KafkaConnectorConfigParams.SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC
+ " is enabled but "
+ KafkaConnectorConfigParams.SNOWFLAKE_ENABLE_SCHEMATIZATION
+ " is not explicitly set. The default changed from false (KC v3) to true (KC v4)."
+ " Please set "
+ KafkaConnectorConfigParams.SNOWFLAKE_ENABLE_SCHEMATIZATION
+ " explicitly to confirm your intended behavior."
+ optOutHint);
}
// snowflake.streaming.classic.offset.migration must be explicitly set
if (!config.containsKey(KafkaConnectorConfigParams.SNOWFLAKE_SSV1_OFFSET_MIGRATION)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_SSV1_OFFSET_MIGRATION,
KafkaConnectorConfigParams.SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC
+ " is enabled but "
+ KafkaConnectorConfigParams.SNOWFLAKE_SSV1_OFFSET_MIGRATION
+ " is not explicitly set. If migrating from KC v3, set it to 'strict' or"
+ " 'best_effort' so that committed offsets from the previous connector version are"
+ " carried over. If migrating from file-based Snowpipe, set it to 'skip'."
+ optOutHint);
}
// snowflake.streaming.classic.offset.migration.include.connector.name is only relevant
// when offset migration is active (strict or best_effort), not when skipped.
String offsetMigration =
config.getOrDefault(
KafkaConnectorConfigParams.SNOWFLAKE_SSV1_OFFSET_MIGRATION,
KafkaConnectorConfigParams.SNOWFLAKE_SSV1_OFFSET_MIGRATION_DEFAULT);
boolean offsetMigrationActive =
"strict".equalsIgnoreCase(offsetMigration)
|| "best_effort".equalsIgnoreCase(offsetMigration);
if (offsetMigrationActive
&& !config.containsKey(
KafkaConnectorConfigParams.SNOWFLAKE_SSV1_OFFSET_MIGRATION_INCLUDE_CONNECTOR_NAME)) {
invalidConfigParams.put(
KafkaConnectorConfigParams.SNOWFLAKE_SSV1_OFFSET_MIGRATION_INCLUDE_CONNECTOR_NAME,
KafkaConnectorConfigParams.SNOWFLAKE_STREAMING_VALIDATE_COMPATIBILITY_WITH_CLASSIC
+ " is enabled but "
+ KafkaConnectorConfigParams.SNOWFLAKE_SSV1_OFFSET_MIGRATION_INCLUDE_CONNECTOR_NAME
+ " is not explicitly set. Whether the SSv1 channel name included the connector"
+ " name depends on the KC v3 configuration that was used. Please set "
+ KafkaConnectorConfigParams.SNOWFLAKE_SSV1_OFFSET_MIGRATION_INCLUDE_CONNECTOR_NAME
+ " explicitly to match how the previous connector was configured."
+ optOutHint);
}
}
private void validateCacheConfig(
Map<String, String> config, Map<String, String> invalidConfigParams) {
// Validate table exists cache boolean flag
if (config.containsKey(CACHE_TABLE_EXISTS)) {
String value = config.get(CACHE_TABLE_EXISTS);
if (!isValidBooleanString(value)) {
invalidConfigParams.put(
CACHE_TABLE_EXISTS,
Utils.formatString(
"{} must be either 'true' or 'false', got: {}", CACHE_TABLE_EXISTS, value));
}
}
// Validate table exists cache expiration
if (config.containsKey(CACHE_TABLE_EXISTS_EXPIRE_MS)) {
try {
long value = Long.parseLong(config.get(CACHE_TABLE_EXISTS_EXPIRE_MS));
if (value <= 0) {
invalidConfigParams.put(
CACHE_TABLE_EXISTS_EXPIRE_MS,
Utils.formatString(
"{} must be a positive number, got: {}", CACHE_TABLE_EXISTS_EXPIRE_MS, value));
}
} catch (NumberFormatException e) {
invalidConfigParams.put(
CACHE_TABLE_EXISTS_EXPIRE_MS,
Utils.formatString(
"{} must be a valid long number, got: {}",
CACHE_TABLE_EXISTS_EXPIRE_MS,
config.get(CACHE_TABLE_EXISTS_EXPIRE_MS)));
}
}
// Validate pipe exists cache boolean flag
if (config.containsKey(CACHE_PIPE_EXISTS)) {
String value = config.get(CACHE_PIPE_EXISTS);
if (!isValidBooleanString(value)) {
invalidConfigParams.put(
CACHE_PIPE_EXISTS,
Utils.formatString(
"{} must be either 'true' or 'false', got: {}", CACHE_PIPE_EXISTS, value));
}
}
// Validate pipe exists cache expiration
if (config.containsKey(CACHE_PIPE_EXISTS_EXPIRE_MS)) {
try {
long value = Long.parseLong(config.get(CACHE_PIPE_EXISTS_EXPIRE_MS));
if (value <= 0) {
invalidConfigParams.put(
CACHE_PIPE_EXISTS_EXPIRE_MS,
Utils.formatString(
"{} must be a positive number, got: {}", CACHE_PIPE_EXISTS_EXPIRE_MS, value));
}
} catch (NumberFormatException e) {
invalidConfigParams.put(
CACHE_PIPE_EXISTS_EXPIRE_MS,
Utils.formatString(
"{} must be a valid long number, got: {}",
CACHE_PIPE_EXISTS_EXPIRE_MS,
config.get(CACHE_PIPE_EXISTS_EXPIRE_MS)));
}
}
}
private static boolean isValidBooleanString(String value) {
return "true".equalsIgnoreCase(value) || "false".equalsIgnoreCase(value);
}
private void handleInvalidParameters(ImmutableMap<String, String> invalidConfigParams) {
// log all invalid params and throw exception
if (!invalidConfigParams.isEmpty()) {
String invalidParamsMessage = "";
for (String invalidKey : invalidConfigParams.keySet()) {
String invalidValue = invalidConfigParams.get(invalidKey);
String errorMessage =
Utils.formatString(
"Config value '{}' is invalid. Error message: '{}'", invalidKey, invalidValue);
invalidParamsMessage += errorMessage + "\n";
}
LOGGER.error("Invalid config: " + invalidParamsMessage);
throw SnowflakeErrors.ERROR_0001.getException(invalidParamsMessage);
}
}
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/SemanticVersion.java
================================================
package com.snowflake.kafka.connector;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/** Represents a parsed semantic version. */
public class SemanticVersion implements Comparable<SemanticVersion> {
private final int major;
private final int minor;
private final int patch;
private final boolean isReleaseCandidate;
private final String originalVersion;
public SemanticVersion(String version) {
this.originalVersion = version;
// Pattern to match versions like "3.1.0" or "4.0.0-rc" or "4.0.0-RC1"
Pattern pattern = Pattern.compile("(\\d+)\\.(\\d+)\\.(\\d+)(?:-[rR][cC]\\d*)?");
Matcher matcher = pattern.matcher(version);
if (!matcher.find()) {
throw new IllegalArgumentException("Invalid version format: " + version);
}
this.major = Integer.parseInt(matcher.group(1));
this.minor = Integer.parseInt(matcher.group(2));
this.patch = Integer.parseInt(matcher.group(3));
this.isReleaseCandidate = version.toLowerCase().contains("-rc");
}
public String originalVersion() {
return originalVersion;
}
public boolean isReleaseCandidate() {
return isReleaseCandidate;
}
public int major() {
return major;
}
public int minor() {
return minor;
}
public int patch() {
return patch;
}
@Override
public int compareTo(SemanticVersion other) {
if (this.major != other.major) {
return Integer.compare(this.major, other.major);
}
if (this.minor != other.minor) {
return Integer.compare(this.minor, other.minor);
}
return Integer.compare(this.patch, other.patch);
}
@Override
public boolean equals(Object obj) {
if (!(obj instanceof SemanticVersion)) {
return false;
}
SemanticVersion other = (SemanticVersion) obj;
return this.major == other.major && this.minor == other.minor && this.patch == other.patch;
}
@Override
public int hashCode() {
return Objects.hash(major, minor, patch);
}
@Override
public String toString() {
return originalVersion;
}
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/SnowflakeSinkTask.java
================================================
/*
* Copyright (c) 2019 Snowflake Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.snowflake.kafka.connector;
import com.google.common.annotations.VisibleForTesting;
import com.snowflake.kafka.connector.config.SinkTaskConfig;
import com.snowflake.kafka.connector.dlq.KafkaRecordErrorReporter;
import com.snowflake.kafka.connector.internal.KCLogger;
import com.snowflake.kafka.connector.internal.SnowflakeConnectionService;
import com.snowflake.kafka.connector.internal.SnowflakeConnectionServiceFactory;
import com.snowflake.kafka.connector.internal.SnowflakeErrors;
import com.snowflake.kafka.connector.internal.SnowflakeKafkaConnectorException;
import com.snowflake.kafka.connector.internal.SnowflakeSinkService;
import com.snowflake.kafka.connector.internal.metrics.MetricsJmxReporter;
import com.snowflake.kafka.connector.internal.metrics.SnowflakeSinkTaskMetrics;
import com.snowflake.kafka.connector.internal.metrics.TaskMetrics;
import com.snowflake.kafka.connector.internal.streaming.SnowflakeSinkServiceV2;
import com.snowflake.kafka.connector.internal.streaming.telemetry.PeriodicTelemetryReporter;
import com.snowflake.kafka.connector.internal.streaming.v2.client.StreamingClientPools;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeoutException;
import java.util.function.Supplier;
import org.apache.kafka.clients.consumer.OffsetAndMetadata;
import org.apache.kafka.common.TopicPartition;
import org.apache.kafka.connect.errors.ConnectException;
import org.apache.kafka.connect.errors.RetriableException;
import org.apache.kafka.connect.sink.ErrantRecordReporter;
import org.apache.kafka.connect.sink.SinkRecord;
import org.apache.kafka.connect.sink.SinkTask;
/**
* SnowflakeSinkTask implements SinkTask for Kafka Connect framework.
*
* <p>Expects configuration from SnowflakeStreamingSinkConnector
*
* <p>Creates sink service instance, takes records loaded from those Kafka partitions and ingests to
* Snowflake via Sink service
*/
public class SnowflakeSinkTask extends SinkTask {
private static final long WAIT_TIME = 5 * 1000; // 5 sec
private static final int REPEAT_TIME = 12; // 60 sec
// the dynamic logger is intended to be attached per task instance. the instance id will be set
// during task start, however if it is not set, it falls back to the static logger
private static final KCLogger STATIC_LOGGER =
new KCLogger(SnowflakeSinkTask.class.getName() + "_STATIC");
private KCLogger DYNAMIC_LOGGER;
private volatile SnowflakeSinkService sink = null;
// snowflake JDBC connection provides methods to interact with user's
// snowflake
// account and execute queries
private SnowflakeConnectionService conn = null;
// tracks number of tasks the config wants to create
private String taskConfigId = "-1";
private long taskStartTime;
private final SnowflakeSinkTaskAuthorizationExceptionTracker authorizationExceptionTracker =
new SnowflakeSinkTaskAuthorizationExceptionTracker();
// Stores channel error exception detected in preCommit to fail on next put() call
private volatile SnowflakeKafkaConnectorException channelErrorToFailOn = null;
// Periodic telemetry reporter for channel status
private PeriodicTelemetryReporter telemetryReporter = null;
// Task-level JMX metrics (lifecycle, throughput, duration)
private TaskMetrics taskMetrics = TaskMetrics.noop();
/** default constructor, invoked by kafka connect framework */
public SnowflakeSinkTask() {
DYNAMIC_LOGGER = new KCLogger(this.getClass().getName());
}
@VisibleForTesting
public SnowflakeSinkTask(
SnowflakeSinkService service, SnowflakeConnectionService connectionService) {
DYNAMIC_LOGGER = new KCLogger(this.getClass().getName());
this.sink = service;
this.conn = connectionService;
}
private SnowflakeConnectionService getConnection() {
try {
waitFor(() -> conn != null);
} catch (Exception e) {
throw SnowflakeErrors.ERROR_5013.getException();
}
return conn;
}
/**
* Return an instance of SnowflakeConnection if it was set previously by calling Start(). Else,
* return an empty
*
* @return Optional of SnowflakeConnectionService
*/
public Optional<SnowflakeConnectionService> getSnowflakeConnection() {
return Optional.ofNullable(getConnection());
}
protected SnowflakeSinkService getSink() {
try {
waitFor(() -> sink != null && !sink.isClosed());
} catch (Exception e) {
throw SnowflakeErrors.ERROR_5014.getException();
}
return sink;
}
/**
* start method handles configuration parsing and one-time setup of the task. loads configuration
*
* @param parsedConfig - has the configuration settings
*/
@Override
public void start(final Map<String, String> parsedConfig) {
this.DYNAMIC_LOGGER.info("starting task...");
final long startNanos = System.nanoTime();
// Parse raw config once into typed structure; validates required fields and applies defaults
final SinkTaskConfig config = SinkTaskConfig.from(parsedConfig);
// get task id and start time
this.taskStartTime = System.currentTimeMillis();
this.taskConfigId = config.getTaskId();
this.authorizationExceptionTracker.updateStateOnTaskStart(parsedConfig);
// enable jvm proxy
Utils.enableJVMProxy(parsedConfig);
KafkaRecordErrorReporter kafkaRecordErrorReporter = createKafkaRecordErrorReporter();
conn =
SnowflakeConnectionServiceFactory.builder()
.setProperties(config)
.setTaskID(this.taskConfigId)
.build();
if (this.sink != null) {
this.sink.closeAll();
}
String connectorName = config.getConnectorName();
Optional<MetricsJmxReporter> metricsJmxReporter =
config.isJmxEnabled()
? Optional.of(
new MetricsJmxReporter(new com.codahale.metrics.MetricRegistry(), connectorName))
: Optional.empty();
// Initialize task-level metrics (real JMX or noop depending on config)
this.taskMetrics =
metricsJmxReporter
.<TaskMetrics>map(
reporter ->
new SnowflakeSinkTaskMetrics(
connectorName,
this.taskConfigId,
reporter,
() ->
(int)
StreamingClientPools.getClientCountForTask(
connectorName, this.taskConfigId)))
.orElse(TaskMetrics.noop());
this.taskMetrics.recordStartDuration(System.nanoTime() - startNanos);
this.sink =
new SnowflakeSinkServiceV2(
conn,
config,
kafkaRecordErrorReporter,
this.context,
metricsJmxReporter,
this.taskMetrics);
// Initialize and start periodic telemetry reporter for channel status
this.telemetryReporter =
new PeriodicTelemetryReporter(
conn.getTelemetryClient(), sink::getPartitionChannels, config);
this.telemetryReporter.start();
DYNAMIC_LOGGER.info(
"task started, execution time: {} milliseconds",
this.taskConfigId,
getDurationFromStartMs(this.taskStartTime));
}
/**
* stop method is invoked only once outstanding calls to other methods have completed. e.g. after
* current put, and a final preCommit has completed.
*
* <p>Note that calling this method does not perform synchronous cleanup in Snowpipe based
* implementation
*/
@Override
public void stop() {
this.DYNAMIC_LOGGER.info("stopping task {}", this.taskConfigId);
// Stop telemetry reporter first
if (this.telemetryReporter != null) {
this.telemetryReporter.stop();
}
this.taskMetrics.unregister();
if (this.sink != null) {
this.sink.stop();
}
this.DYNAMIC_LOGGER.info(
"task stopped, total task runtime: {} milliseconds",
getDurationFromStartMs(this.taskStartTime));
}
/**
* init ingestion task in Sink service
*
* @param partitions - The list of all partitions that are now assigned to the task
*/
@Override
public void open(final Collection<TopicPartition> partitions) {
long startTime = System.currentTimeMillis();
try (TaskMetrics.TimingContext ignored = taskMetrics.timeOpen()) {
this.sink.startPartitions(partitions);
taskMetrics.incOpenCount();
taskMetrics.setAssignedPartitions(partitions.size());
}
this.DYNAMIC_LOGGER.info(
"task opened with {} partitions, execution time: {} milliseconds",
partitions.size(),
getDurationFromStartMs(startTime));
}
/**
* Closes sink service
*
* <p>Closes all running task because the parameter of open function contains all partition info
* but not only the new partition
*
* @param partitions - The list of all partitions that were assigned to the task
*/
@Override
public void close(final Collection<TopicPartition> partitions) {
long startTime = System.currentTimeMillis();
try (TaskMetrics.TimingContext ignored = taskMetrics.timeClose()) {
this.DYNAMIC_LOGGER.info(
"closing task {} with {} partitions", this.taskConfigId, partitions.size());
if (this.sink != null) {
this.sink.close(partitions);
}
taskMetrics.incCloseCount();
taskMetrics.setAssignedPartitions(0);
}
this.DYNAMIC_LOGGER.info(
"task closed, execution time: {} milliseconds",
this.taskConfigId,
getDurationFromStartMs(startTime));
}
/**
* ingest records to Snowflake
*
* @param records - collection of records from kafka topic/partitions for this connector
*/
@Override
public void put(final Collection<SinkRecord> records) {
this.authorizationExceptionTracker.throwExceptionIfAuthorizationFailed();
// Check for channel errors detected in preCommit and fail the task
if (this.channelErrorToFailOn != null) {
SnowflakeKafkaConnectorException error = this.channelErrorToFailOn;
this.channelErrorToFailOn = null; // Clear so we don't throw again on restart
throw new ConnectException(error.getMessage(), error);
}
final long recordSize = records.size();
DYNAMIC_LOGGER.debug("Calling PUT with {} records", recordSize);
final long startTime = System.currentTimeMillis();
try (TaskMetrics.TimingContext ignored = taskMetrics.timePut()) {
getSink().insert(records);
taskMetrics.markPutRecords(recordSize);
}
logWarningForPutAndPrecommit(
startTime, Utils.formatString("Executed PUT with {} records", recordSize), false);
}
/**
* Sync committed offsets
*
* @param offsets - the current map of offsets as of the last call to put
* @return an empty map if Connect-managed offset commit is not desired, otherwise a map of
* offsets by topic-partition that are safe to commit. If we return the same offsets that was
* passed in, Kafka Connect assumes that all offsets that are already passed to put() are safe
* to commit.
* @throws RetriableException when meet any issue during processing
*/
@Override
public Map<TopicPartition, OffsetAndMetadata> preCommit(
Map<TopicPartition, OffsetAndMetadata> offsets) throws RetriableException {
DYNAMIC_LOGGER.info("Precommit started for {} partitions", offsets.size());
if (DYNAMIC_LOGGER.isDebugEnabled()) {
DYNAMIC_LOGGER.debug(
"Precommit partitions and offsets: {}", Arrays.toString(offsets.entrySet().toArray()));
}
long startTime = System.currentTimeMillis();
try (TaskMetrics.TimingContext ignored = taskMetrics.timePreCommit()) {
// return an empty map means that offset commitment is not desired
if (sink == null || sink.isClosed()) {
this.DYNAMIC_LOGGER.warn(
"sink not initialized or closed before preCommit", this.taskConfigId);
return new HashMap<>();
} else if (sink.getPartitionCount() == 0) {
this.DYNAMIC_LOGGER.warn("no partition is assigned", this.taskConfigId);
return new HashMap<>();
}
Map<TopicPartition, OffsetAndMetadata> committedOffsets = new HashMap<>();
try {
Map<TopicPartition, Long> batchOffsets = sink.getCommittedOffsets(offsets.keySet());
batchOffsets.forEach(
(topicPartition, offset) ->
committedOffsets.put(topicPartition, new OffsetAndMetadata(offset)));
} catch (SnowflakeKafkaConnectorException e) {
// It's OK to just log the error since preCommit can retry.
this.authorizationExceptionTracker.reportPrecommitException(e);
this.DYNAMIC_LOGGER.error("PreCommit error: {} ", e.getMessage());
// Channel error count exceeded - store to fail on next put() call
if (e.checkErrorCode(SnowflakeErrors.ERROR_5030)) {
this.channelErrorToFailOn = e;
}
} catch (Exception e) {
this.authorizationExceptionTracker.reportPrecommitException(e);
this.DYNAMIC_LOGGER.error("PreCommit error: {} ", e.getMessage());
}
logWarningForPutAndPrecommit(
startTime,
Utils.formatString(
"Executed PRECOMMIT on all {} partitions, safe to commit {} partitions",
offsets.size(),
committedOffsets.size()),
true);
return committedOffsets;
}
}
/**
* @return connector version
*/
@Override
public String version() {
return Utils.VERSION;
}
/**
* wait for specific status
*
* @param func status checker
*/
private static void waitFor(Supplier<Boolean> func)
throws InterruptedException, TimeoutException {
for (int i = 0; i < REPEAT_TIME; i++) {
if (func.get()) {
return;
}
Thread.sleep(WAIT_TIME);
}
throw new TimeoutException();
}
private static long getDurationFromStartMs(long startTime) {
final long currTime = System.currentTimeMillis();
return currTime - startTime;
}
void logWarningForPutAndPrecommit(long startTime, String logContent, boolean isPrecommit) {
final long executionTimeMs = getDurationFromStartMs(startTime);
String logExecutionContent =
Utils.formatString("{}, executionTime: {} ms", logContent, executionTimeMs);
if (executionTimeMs > 300000) {
// This won't be frequently printed. It is vary rare to have execution greater than 300
// seconds.
// But having this warning helps customer to debug their Kafka Connect config.
this.DYNAMIC_LOGGER.warn(
"{}. Expected call to be under {} ms. If there is CommitFailedException in the log or"
+ " there is duplicated records, refer to this link for solution: "
+ "https://docs.snowflake.com/en/user-guide/kafka-connector-ts.html#resolving-specific-issues",
logExecutionContent,
executionTimeMs);
} else {
if (isPrecommit) {
this.DYNAMIC_LOGGER.info(logExecutionContent);
} else {
this.DYNAMIC_LOGGER.debug(logExecutionContent);
}
}
}
/* Used to report a record back to DLQ if error tolerance is specified */
private KafkaRecordErrorReporter createKafkaRecordErrorReporter() {
KafkaRecordErrorReporter result = noOpKafkaRecordErrorReporter();
if (context != null) {
try {
ErrantRecordReporter errantRecordReporter = context.errantRecordReporter();
if (errantRecordReporter != null) {
result =
(record, error) -> {
try {
// Blocking this until record is delivered to DLQ
DYNAMIC_LOGGER.debug(
"Sending Sink Record to DLQ with recordOffset:{}, partition:{}",
record.kafkaOffset(),
record.kafkaPartition());
errantRecordReporter.report(record, error).get();
} catch (InterruptedException | ExecutionException e) {
final String errMsg = "ERROR reporting records to ErrantRecordReporter";
this.DYNAMIC_LOGGER.error(errMsg, e);
throw new ConnectException(errMsg, e);
}
};
} else {
this.DYNAMIC_LOGGER.info("Errant record reporter is not configured.");
}
} catch (NoClassDefFoundError | NoSuchMethodError e) {
// Will occur in Connect runtimes earlier than 2.6
this.DYNAMIC_LOGGER.info(
"Kafka versions prior to 2.6 do not support the errant record reporter.");
}
} else {
DYNAMIC_LOGGER.warn("SinkTaskContext is not set");
}
return result;
}
/** Blocks until all partition channels have finished initialization. */
@VisibleForTesting
public void awaitInitialization() {
this.getSink().awaitInitialization();
}
/**
* For versions older than 2.6
*
* @see <a
* href="https://javadoc.io/doc/org.apache.kafka/connect-api/2.6.0/org/apache/kafka/connect/sink/ErrantRecordReporter.html">
* link </a>
*/
@VisibleForTesting
static KafkaRecordErrorReporter noOpKafkaRecordErrorReporter() {
return (record, e) -> {
STATIC_LOGGER.warn(
"DLQ Kafka Record Error Reporter is not set, requires Kafka Version to be >= 2.6");
};
}
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/SnowflakeSinkTaskAuthorizationExceptionTracker.java
================================================
package com.snowflake.kafka.connector;
import static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams.ENABLE_TASK_FAIL_ON_AUTHORIZATION_ERRORS;
import static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams.ENABLE_TASK_FAIL_ON_AUTHORIZATION_ERRORS_DEFAULT;
import static com.snowflake.kafka.connector.internal.SnowflakeErrors.ERROR_1005;
import java.util.Map;
/**
* When the user rotates Snowflake key that is stored in an external file the Connector hangs and
* does not mark its tasks as failed. To fix this corner case we need to track the authorization
* exception thrown during preCommit() and stop tasks during put().
*
* <p>Note that exceptions thrown during preCommit() are swallowed by Kafka Connect and will not
* cause task failure.
*/
public class SnowflakeSinkTaskAuthorizationExceptionTracker {
private static final String AUTHORIZATION_EXCEPTION_MESSAGE = "Authorization failed after retry";
private boolean authorizationTaskFailureEnabled;
private boolean authorizationErrorReported;
public SnowflakeSinkTaskAuthorizationExceptionTracker() {
this.authorizationTaskFailureEnabled = true;
this.authorizationErrorReported = false;
}
public void updateStateOnTaskStart(Map<String, String> taskConfig) {
authorizationTaskFailureEnabled =
Boolean.parseBoolean(
taskConfig.getOrDefault(
ENABLE_TASK_FAIL_ON_AUTHORIZATION_ERRORS,
Boolean.toString(ENABLE_TASK_FAIL_ON_AUTHORIZATION_ERRORS_DEFAULT)));
}
/**
* Check if the thrown exception is related to authorization
*
* @param ex - any exception that occurred during preCommit
*/
public void reportPrecommitException(Exception ex) {
if (ex.getMessage().contains(AUTHORIZATION_EXCEPTION_MESSAGE)) {
authorizationErrorReported = true;
}
}
/** Throw exception if authorization has failed before */
public void throwExceptionIfAuthorizationFailed() {
if (authorizationTaskFailureEnabled && authorizationErrorReported) {
throw ERROR_1005.getException();
}
}
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/SnowflakeStreamingSinkConnector.java
================================================
/*
* Copyright (c) 2019 Snowflake Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.snowflake.kafka.connector;
import com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams;
import com.snowflake.kafka.connector.config.ConnectorConfigDefinition;
import com.snowflake.kafka.connector.internal.KCLogger;
import com.snowflake.kafka.connector.internal.SnowflakeConnectionService;
import com.snowflake.kafka.connector.internal.SnowflakeConnectionServiceFactory;
import com.snowflake.kafka.connector.internal.SnowflakeErrors;
import com.snowflake.kafka.connector.internal.SnowflakeKafkaConnectorException;
import com.snowflake.kafka.connector.internal.streaming.DefaultStreamingConfigValidator;
import com.snowflake.kafka.connector.internal.telemetry.SnowflakeTelemetryService;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import org.apache.kafka.common.config.Config;
import org.apache.kafka.common.config.ConfigDef;
import org.apache.kafka.connect.connector.Task;
import org.apache.kafka.connect.sink.SinkConnector;
/**
* SnowflakeStreamingSinkConnector implements SinkConnector for Kafka Connect framework.
*
* <p>Expected configuration: including topic names, partition numbers, snowflake connection info
* and credentials info
*
* <p>Creates snowflake internal stages, snowflake tables provides configuration to SinkTasks
* running on Kafka Connect Workers.
*/
public class SnowflakeStreamingSinkConnector extends SinkConnector {
// create logger without correlationId for now
private static final KCLogger LOGGER =
new KCLogger(SnowflakeStreamingSinkConnector.class.getName());
private Map<String, String> config; // connector configuration, provided by
// user through kafka connect framework
// SnowflakeJDBCWrapper provides methods to interact with user's snowflake
// account and executes queries
private SnowflakeConnectionService conn;
// Snowflake Telemetry provides methods to report usage statistics
private SnowflakeTelemetryService telemetryClient;
private long connectorStartTime;
// Kafka Connect starts sink tasks without waiting for setup in
// SnowflakeStreamingSinkConnector to finish.
// This causes race conditions for: config validation, tables and stages
// creation, etc.
// Using setupComplete to synchronize
private boolean setupComplete;
private final ConnectorConfigValidator connectorConfigValidator =
new DefaultConnectorConfigValidator(new DefaultStreamingConfigValidator());
/** No-Arg constructor. Required by Kafka Connect framework */
public SnowflakeStreamingSinkConnector() {
setupComplete = false;
}
/**
* start method will only be called on a clean connector, i.e. it has either just been
* instantiated and initialized or stop () has been invoked. loads configuration and validates.
*
* <p>Creates snowflake internal stages and snowflake tables
*
* @param parsedConfig has the configuration settings
*/
@Override
public void start(final Map<String, String> parsedConfig) {
LOGGER.info("SnowflakeStreamingSinkConnector:starting...");
Utils.checkConnectorVersion();
setupComplete = false;
connectorStartTime = System.currentTimeMillis();
config = new HashMap<>(parsedConfig);
ConnectorConfigTools.setDefaultValues(config);
// modify invalid connector name
Utils.convertAppName(config);
connectorConfigValidator.validateConfig(config);
// enable mdc logging if needed
KCLogger.toggleGlobalMdcLoggingContext(
Boolean.parseBoolean(
config.getOrDefault(
KafkaConnectorConfigParams.ENABLE_MDC_LOGGING_CONFIG,
KafkaConnectorConfigParams.ENABLE_MDC_LOGGING_DEFAULT)));
// enable proxy
Utils.enableJVMProxy(config);
// create a persisted connection, and validate snowflake connection
// config as a side effect
conn = SnowflakeConnectionServiceFactory.builder().setProperties(config).build();
telemetryClient = conn.getTelemetryClient();
telemetryClient.reportKafkaConnectStart(connectorStartTime, this.config);
setupComplete = true;
LOGGER.info("SnowflakeStreamingSinkConnector:started");
}
/**
* Stop method will be called to stop a connector, cleans up snowflake internal stages, after
* making sure that there are no pending files to ingest.
*
* <p>Cleans up pipes, after making sure there are no pending files to ingest.
*
* <p>Also ensures that there are no leaked stages, no leaked staged files, and no leaked pipes
*/
@Override
public void stop() {
LOGGER.info("SnowflakeStreamingSinkConnector connector stopping...");
setupComplete = false;
if (telemetryClient != null) {
telemetryClient.reportKafkaConnectStop(connectorStartTime);
}
}
/**
* @return Sink task class
*/
@Override
public Class<? extends Task> taskClass() {
return SnowflakeSinkTask.class;
}
/**
* taskConfigs method returns a set of configurations for SinkTasks based on the current
* configuration, producing at most 'maxTasks' configurations
*
* @param maxTasks maximum number of SinkTasks for this instance of
* SnowflakeStreamingSinkConnector
* @return a list containing 'maxTasks' copies of the configuration
*/
@Override
public List<Map<String, String>> taskConfigs(final int maxTasks) {
LOGGER.info("taskConfigs called with maxTasks: {}", maxTasks);
// wait for setup to complete
int counter = 0;
while (counter < 120) // poll for 120*5 seconds (10 mins) maximum
{
if (setupComplete) {
break;
} else {
counter++;
try {
LOGGER.info("Sleeping 5000ms to allow setup to " + "complete.");
Thread.sleep(5000);
} catch (InterruptedException ex) {
LOGGER.warn("Waiting for setup to complete got " + "interrupted");
}
}
}
if (!setupComplete) {
throw SnowflakeErrors.ERROR_5007.getException(telemetryClient);
}
List<Map<String, String>> taskConfigs = new ArrayList<>(maxTasks);
for (int i = 0; i < maxTasks; i++) {
Map<String, String> conf = new HashMap<>(config);
conf.put(Utils.TASK_ID, i + "");
taskConfigs.add(conf);
}
return taskConfigs;
}
/**
* @return ConfigDef with original configuration properties
*/
@Override
public ConfigDef config() {
return ConnectorConfigDefinition.getConfig();
}
@Override
public Config validate(Map<String, String> connectorConfigs) {
LOGGER.debug("Validating connector Config: Start");
// cross-fields validation here
Config result = super.validate(connectorConfigs);
// Validate ensure that url, user, db, schema, private key exist in config and is not empty
// and there is no single field validation error
if (!Utils.isSingleFieldValid(result)) {
return result;
}
// Verify proxy config is valid
Map<String, String> invalidProxyParams = Utils.validateProxySettings(connectorConfigs);
for (String invalidKey : invalidProxyParams.keySet()) {
Utils.updateConfigErrorMessage(result, invalidKey, invalidProxyParams.get(invalidKey));
}
// If private key or private key passphrase is
// provided through a config provider, skip validation
if (isUsingConfigProviderForPrivateKey(connectorConfigs)) {
return result;
}
// We don't validate name, since it is not included in the return value
// so just put a test connector here
connectorConfigs.put(KafkaConnectorConfigParams.NAME, "TEST_CONNECTOR");
SnowflakeConnectionService testConnection;
try {
testConnection =
SnowflakeConnectionServiceFactory.builder().setProperties(connectorConfigs).build();
} catch (SnowflakeKafkaConnectorException e) {
LOGGER.error(
"Validate: Error connecting to snowflake:{}, errorCode:{}", e.getMessage(), e.getCode());
// Since url, user, db, schema, exist in config and is not empty,
// the exceptions here would be invalid URL, and cannot connect, and no private key
switch (e.getCode()) {
case "1001":
// Could be caused by invalid url, invalid user name, invalid password.
Utils.updateConfigErrorMessage(
result,
KafkaConnectorConfigParams.SNOWFLAKE_URL_NAME,
": Cannot connect to Snowflake");
Utils.updateConfigErrorMessage(
result,
KafkaConnectorConfigParams.SNOWFLAKE_PRIVATE_KEY,
": Cannot connect to Snowflake");
Utils.updateConfigErrorMessage(
result,
KafkaConnectorConfigParams.SNOWFLAKE_USER_NAME,
": Cannot connect to Snowflake");
break;
case "0007":
Utils.updateConfigErrorMessage(
result,
KafkaConnectorConfigParams.SNOWFLAKE_URL_NAME,
" is not a valid snowflake url");
break;
case "0018":
Utils.updateConfigErrorMessage(
result, KafkaConnectorConfigParams.SNOWFLAKE_PRIVATE_KEY_PASSPHRASE, " is not valid");
Utils.updateConfigErrorMessage(
result, KafkaConnectorConfigParams.SNOWFLAKE_PRIVATE_KEY, " is not valid");
break;
case "0013":
Utils.updateConfigErrorMessage(
result, KafkaConnectorConfigParams.SNOWFLAKE_PRIVATE_KEY, " must be non-empty");
break;
case "0002":
Utils.updateConfigErrorMessage(
result,
KafkaConnectorConfigParams.SNOWFLAKE_PRIVATE_KEY,
" must be a valid PEM RSA private key");
break;
default:
throw e; // Shouldn't reach here, so crash.
}
return result;
}
try {
testConnection.databaseExists(
connectorConfigs.get(KafkaConnectorConfigParams.SNOWFLAKE_DATABASE_NAME));
} catch (SnowflakeKafkaConnectorException e) {
LOGGER.error("Validate Error msg:{}, errorCode:{}", e.getMessage(), e.getCode());
if (e.getCode().equals("2001")) {
Utils.updateConfigErrorMessage(
result, KafkaConnectorConfigParams.SNOWFLAKE_DATABASE_NAME, " database does not exist");
} else {
throw e;
}
return result;
}
try {
testConnection.schemaExists(
connectorConfigs.get(KafkaConnectorConfigParams.SNOWFLAKE_SCHEMA_NAME));
} catch (SnowflakeKafkaConnectorException e) {
LOGGER.error("Validate Error msg:{}, errorCode:{}", e.getMessage(), e.getCode());
if (e.getCode().equals("2001")) {
Utils.updateConfigErrorMessage(
result, KafkaConnectorConfigParams.SNOWFLAKE_SCHEMA_NAME, " schema does not exist");
} else {
throw e;
}
return result;
}
LOGGER.info("Validated config with no error");
return result;
}
private static boolean isUsingConfigProviderForPrivateKey(Map<String, String> connectorConfigs) {
Pattern configProviderPrefix = Pattern.compile("[$][{][a-zA-Z]+:");
return configProviderPrefix
.matcher(
connectorConfigs.getOrDefault(KafkaConnectorConfigParams.SNOWFLAKE_PRIVATE_KEY, ""))
.find()
|| configProviderPrefix
.matcher(
connectorConfigs.getOrDefault(
KafkaConnectorConfigParams.SNOWFLAKE_PRIVATE_KEY_PASSPHRASE, ""))
.find();
}
/**
* @return connector version
*/
@Override
public String version() {
return Utils.VERSION;
}
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/TopicToTableParser.java
================================================
package com.snowflake.kafka.connector;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
public class TopicToTableParser {
private final String input;
private int index;
TopicToTableParser(String input) {
this.input = input;
}
public static Map<String, String> parse(String input) {
List<Entry> entries = new TopicToTableParser(input).parseEntries();
Map<String, String> result = new LinkedHashMap<>();
for (Entry entry : entries) {
String newTopic = entry.getTopic();
if (result.containsKey(newTopic)) {
throw new IllegalArgumentException("Duplicate topic: " + newTopic);
}
// Check that regexes don't overlap.
for (String topic : result.keySet()) {
if (topic.matches(newTopic) || newTopic.matches(topic)) {
throw new IllegalArgumentException(
"Topic regexes cannot overlap. Overlapping regexes: " + topic + ", " + newTopic);
}
}
result.put(newTopic, entry.getTable());
}
return result;
}
public List<Entry> parseEntries() {
List<Entry> entries = new ArrayList<>();
while (true) {
skipWhitespace();
if (isAtEnd()) {
return entries;
}
String topic = parseToken(false);
skipWhitespace();
expect(':');
skipWhitespace();
String table = parseToken(true);
entries.add(new Entry(topic, table));
skipWhitespace();
if (isAtEnd()) {
return entries;
}
expect(',');
}
}
private String parseToken(boolean uppercaseIfUnquoted) {
if (isAtEnd()) {
throw error("Expected token, found end of input");
}
if (input.charAt(index) == '"') {
return parseQuotedToken();
}
if (uppercaseIfUnquoted) {
return parseUnquotedToken().toUpperCase(Locale.ROOT);
} else {
return parseUnquotedToken();
}
}
private String parseQuotedToken() {
index++; // opening quote
int textStart = index;
while (!isAtEnd() && input.charAt(index) != '"') {
index++;
}
if (isAtEnd()) {
throw error("Unterminated quoted token");
}
if (index == textStart) {
throw error("Empty quoted token");
}
String text = input.substring(textStart, index);
index++; // closing quote
return text;
}
private String parseUnquotedToken() {
int start = index;
while (!isAtEnd()) {
char character = input.charAt(index);
if (Character.isWhitespace(character)
|| character == ':'
|| character == ','
|| character == '"') {
break;
}
index++;
}
if (index == start) {
throw error("Expected token");
}
return input.substring(start, index);
}
private void skipWhitespace() {
while (!isAtEnd() && Character.isWhitespace(input.charAt(index))) {
index++;
}
}
private void expect(char expectedCharacter) {
if (isAtEnd() || input.charAt(index) != expectedCharacter) {
throw error("Expected '" + expectedCharacter + "'");
}
index++;
}
private boolean isAtEnd() {
return index >= input.length();
}
private IllegalArgumentException error(String message) {
StringBuilder sb = new StringBuilder();
sb.append(message);
sb.append(" at position ");
sb.append(index);
sb.append(": \"");
sb.append(input);
sb.append("\". Format: <topic-1>:<table-1>,<topic-2>:\"<table-2>\",...");
return new IllegalArgumentException(sb.toString());
}
public static final class Entry {
private final String topic;
private final String table;
private Entry(String topic, String table) {
this.topic = topic;
this.table = table;
}
public String getTopic() {
return topic;
}
public String getTable() {
return table;
}
}
}
================================================
FILE: src/main/java/com/snowflake/kafka/connector/Utils.java
================================================
/*
* Copyright (c) 2024 Snowflake Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package com.snowflake.kafka.connector;
import com.google.common.collect.ImmutableMap;
import com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams;
import com.snowflake.kafka.connector.internal.KCLogger;
import com.snowflake.kafka.connector.internal.SnowflakeErrors;
import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.Authenticator;
import java.net.PasswordAuthentication;
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.kafka.common.config.Config;
import org.apache.kafka.common.config.ConfigValue;
/** Various arbitrary helper functions */
public class Utils {
// Connector version, change every release
public static final String VERSION = "4.1.0";
// task id
public static final String TASK_ID = "task_id";
public static final String JDK_HTTP_AUTH_TUNNELING = "jdk.http.auth.tunneling.disabledSchemes";
// mvn repo
private static final String MVN_REPO =
"https://repo1.maven.org/maven2/com/snowflake/snowflake-kafka-connector/";
public static final String TABLE_COLUMN_CONTENT = "RECORD_CONTENT";
public static final String TABLE_COLUMN_METADATA = "RECORD_METADATA";
private static final KCLogger LOGGER = new KCLogger(Utils.class.getName());
/**
* Check the connector version from Maven repo, report if any update version is available.
*
* <p>A URl connection timeout is added in case Maven repo is not reachable in a proxy'd
* environment. Returning false from this method doesn't have any side effects to start the
* connector.
*
* <p>Version upgrade logic:
*
* <ul>
* <li>Suggest only version that is newer than current version. If many new versions available
* suggest the most recent one.
* <li>Never suggest RC (release candidate) versions
* </ul>
*/
public static boolean checkConnectorVersion() {
return checkConnectorVersion(VERSION, fetchAvailableVersionsFromMaven());
}
/**
* Check connector version with provided current version and available versions.
*
* @param currentVersionString current version string
* @param availableVersions list of available version strings from Maven
*/
static boolean checkConnectorVersion(
String currentVersionString, List<String> availableVersions) {
LOGGER.info("Current Snowflake Kafka Connector Version: {}", currentVersionString);
try {
SemanticVersion currentVersion = new SemanticVersion(currentVersionString);
String recommendedVersion = findRecommendedVersion(currentVersion, availableVersions);
if (recommendedVersion != null) {
LOGGER.warn(
"Connector update is available, please upgrade Snowflake Kafka Connector ({} -> {})."
+ " Please check release notes for breaking changes and upgrade procedures before"
+ " installing.",
currentVersionString,
recommendedVersion);
}
return true;
} catch (Exception e) {
LOGGER.warn("can't verify latest connector version\n{}", e.getMessage());
}
return false;
}
/**
* Fetch available versions from Maven repository.
*
* @return list of available version strings
*/
static List<String> fetchAvailableVersionsFromMaven() {
List<String> versions = new ArrayList<>();
try {
URLConnection urlConnection = new URL(MVN_REPO).openConnection();
urlConnection.setConnectTimeout(5000);
urlConnection.setReadTimeout(5000);
InputStream input = urlConnection.getInputStream();
BufferedReader bufferedReader = new BufferedReader(new InputStreamR
gitextract_xko0tdbw/ ├── .githooks/ │ └── pre-commit ├── .github/ │ ├── CODEOWNERS │ ├── actions/ │ │ ├── build-connector/ │ │ │ └── action.yml │ │ └── run-e2e-tests/ │ │ └── action.yml │ ├── dependabot.yaml │ ├── scripts/ │ │ ├── decrypt_secret.sh │ │ ├── parse_java_test_reports.py │ │ ├── profile.json.gpg │ │ ├── profile_azure.json.gpg │ │ ├── profile_gcs.json.gpg │ │ └── squid.conf │ └── workflows/ │ ├── IntegrationTest.yml │ ├── build-apache-kafka-images.yml │ ├── end-to-end-legacy.yml │ ├── end-to-end-stress.yml │ ├── end-to-end.yaml │ ├── formatting.yml │ └── semgrep.yml ├── .gitignore ├── .java-version ├── LICENSE ├── README.md ├── deploy.sh ├── format.sh ├── pom.xml ├── pom_confluent.xml ├── profile.json.enc ├── profile.json.example ├── scripts/ │ └── process_licenses.py ├── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── com/ │ │ │ └── snowflake/ │ │ │ ├── ingest/ │ │ │ │ └── streaming/ │ │ │ │ └── internal/ │ │ │ │ └── TimestampWrapper.java │ │ │ └── kafka/ │ │ │ └── connector/ │ │ │ ├── ConnectorConfigTools.java │ │ │ ├── ConnectorConfigValidator.java │ │ │ ├── Constants.java │ │ │ ├── DefaultConnectorConfigValidator.java │ │ │ ├── SemanticVersion.java │ │ │ ├── SnowflakeSinkTask.java │ │ │ ├── SnowflakeSinkTaskAuthorizationExceptionTracker.java │ │ │ ├── SnowflakeStreamingSinkConnector.java │ │ │ ├── TopicToTableParser.java │ │ │ ├── Utils.java │ │ │ ├── config/ │ │ │ │ ├── AuthenticatorType.java │ │ │ │ ├── CommaSeparatedKeyValueValidator.java │ │ │ │ ├── ConnectorConfigDefinition.java │ │ │ │ ├── SinkTaskConfig.java │ │ │ │ ├── SnowflakeValidation.java │ │ │ │ └── TopicToTableValidator.java │ │ │ ├── dlq/ │ │ │ │ └── KafkaRecordErrorReporter.java │ │ │ ├── internal/ │ │ │ │ ├── CachingConfig.java │ │ │ │ ├── CachingSnowflakeConnectionService.java │ │ │ │ ├── DescribeTableRow.java │ │ │ │ ├── InternalUtils.java │ │ │ │ ├── JdbcProperties.java │ │ │ │ ├── JdbcPropertyKeys.java │ │ │ │ ├── KCLogger.java │ │ │ │ ├── PrivateKeyTool.java │ │ │ │ ├── SnowflakeConnectionService.java │ │ │ │ ├── SnowflakeConnectionServiceFactory.java │ │ │ │ ├── SnowflakeErrors.java │ │ │ │ ├── SnowflakeKafkaConnectorException.java │ │ │ │ ├── SnowflakeSinkService.java │ │ │ │ ├── SnowflakeURL.java │ │ │ │ ├── StandardSnowflakeConnectionService.java │ │ │ │ ├── URL.java │ │ │ │ ├── metrics/ │ │ │ │ │ ├── MetricsJmxReporter.java │ │ │ │ │ ├── MetricsUtil.java │ │ │ │ │ ├── NoopTaskMetrics.java │ │ │ │ │ ├── SnowflakeSinkTaskMetrics.java │ │ │ │ │ └── TaskMetrics.java │ │ │ │ ├── schemaevolution/ │ │ │ │ │ ├── ColumnInfos.java │ │ │ │ │ ├── ColumnTypeMapper.java │ │ │ │ │ ├── SchemaEvolutionTargetItems.java │ │ │ │ │ ├── SnowflakeColumnTypeMapper.java │ │ │ │ │ ├── SnowflakeSchemaEvolutionService.java │ │ │ │ │ ├── TableSchema.java │ │ │ │ │ ├── TableSchemaResolver.java │ │ │ │ │ └── ValidationResultMapper.java │ │ │ │ ├── streaming/ │ │ │ │ │ ├── DefaultStreamingConfigValidator.java │ │ │ │ │ ├── IngestionMethodConfig.java │ │ │ │ │ ├── LatestCommitedOffsetTokenExecutor.java │ │ │ │ │ ├── OpenChannelRetryPolicy.java │ │ │ │ │ ├── SnowflakeSinkServiceV2.java │ │ │ │ │ ├── StreamingClientProperties.java │ │ │ │ │ ├── StreamingConfigValidator.java │ │ │ │ │ ├── StreamingErrorHandler.java │ │ │ │ │ ├── TopicPartitionChannelInsertionException.java │ │ │ │ │ ├── channel/ │ │ │ │ │ │ └── TopicPartitionChannel.java │ │ │ │ │ ├── telemetry/ │ │ │ │ │ │ ├── PeriodicTelemetryReporter.java │ │ │ │ │ │ ├── SnowflakeTelemetryChannelCreation.java │ │ │ │ │ │ ├── SnowflakeTelemetryChannelStatus.java │ │ │ │ │ │ └── SnowflakeTelemetrySsv1Migration.java │ │ │ │ │ └── v2/ │ │ │ │ │ ├── AppendRowWithFallbackPolicy.java │ │ │ │ │ ├── BackpressureException.java │ │ │ │ │ ├── ClientRecreationException.java │ │ │ │ │ ├── ClientRecreator.java │ │ │ │ │ ├── PipeNameProvider.java │ │ │ │ │ ├── SnowpipeStreamingPartitionChannel.java │ │ │ │ │ ├── WaitForLastOffsetCommittedPolicy.java │ │ │ │ │ ├── channel/ │ │ │ │ │ │ └── PartitionOffsetTracker.java │ │ │ │ │ ├── client/ │ │ │ │ │ │ ├── StreamingClientFactory.java │ │ │ │ │ │ ├── StreamingClientPool.java │ │ │ │ │ │ ├── StreamingClientPools.java │ │ │ │ │ │ └── StreamingClientSupplier.java │ │ │ │ │ ├── migration/ │ │ │ │ │ │ ├── Ssv1MigrationMode.java │ │ │ │ │ │ └── Ssv1MigrationResponse.java │ │ │ │ │ └── service/ │ │ │ │ │ ├── BatchOffsetFetcher.java │ │ │ │ │ ├── PartitionChannelManager.java │ │ │ │ │ └── ThreadPools.java │ │ │ │ ├── telemetry/ │ │ │ │ │ ├── SnowflakeTelemetryBasicInfo.java │ │ │ │ │ ├── SnowflakeTelemetryService.java │ │ │ │ │ ├── SnowflakeTelemetryServiceFactory.java │ │ │ │ │ └── TelemetryConstants.java │ │ │ │ └── validation/ │ │ │ │ ├── BinaryStringUtils.java │ │ │ │ ├── ByteArraySerializer.java │ │ │ │ ├── ColumnLogicalType.java │ │ │ │ ├── ColumnPhysicalType.java │ │ │ │ ├── ColumnSchema.java │ │ │ │ ├── DataValidationUtil.java │ │ │ │ ├── DuplicateDetector.java │ │ │ │ ├── DuplicateKeyValidatedObject.java │ │ │ │ ├── DuplicateKeyValidatingSerializer.java │ │ │ │ ├── ErrorCode.java │ │ │ │ ├── Power10Util.java │ │ │ │ ├── RowValidator.java │ │ │ │ ├── SFExceptionValidation.java │ │ │ │ ├── SqlIdentifierNormalizer.java │ │ │ │ ├── TimestampWrapper.java │ │ │ │ ├── Utils.java │ │ │ │ ├── ValidationResult.java │ │ │ │ └── ZonedDateTimeSerializer.java │ │ │ ├── records/ │ │ │ │ ├── KafkaRecordConverter.java │ │ │ │ ├── SnowflakeMetadataConfig.java │ │ │ │ └── SnowflakeSinkRecord.java │ │ │ └── streaming/ │ │ │ └── iceberg/ │ │ │ └── IcebergDDLTypes.java │ │ └── resources/ │ │ └── com/ │ │ └── snowflake/ │ │ └── kafka/ │ │ └── connector/ │ │ ├── ingest_error_messages.properties │ │ └── internal/ │ │ └── validation/ │ │ └── ingest_error_messages.properties │ └── test/ │ ├── java/ │ │ └── com/ │ │ └── snowflake/ │ │ └── kafka/ │ │ └── connector/ │ │ ├── CachingConfigValidatorTest.java │ │ ├── ConnectClusterBaseIT.java │ │ ├── ConnectorConfigValidatorLogsTest.java │ │ ├── ConnectorConfigValidatorTest.java │ │ ├── ConnectorIT.java │ │ ├── InjectQueryRunner.java │ │ ├── InjectQueryRunnerExtension.java │ │ ├── InjectSnowflakeDataSource.java │ │ ├── InjectSnowflakeDataSourceExtension.java │ │ ├── LegacySchemaToggleIT.java │ │ ├── SchemaEvolutionAvroSrIT.java │ │ ├── SchemaEvolutionBase.java │ │ ├── SchemaEvolutionJsonIT.java │ │ ├── SinkTaskIT.java │ │ ├── SinkTaskProxyIT.java │ │ ├── SmtIT.java │ │ ├── SnowflakeSinkTaskAuthorizationExceptionTrackerTest.java │ │ ├── SnowflakeSinkTaskForStreamingIT.java │ │ ├── TopicToTableParserTest.java │ │ ├── UtilsTest.java │ │ ├── builder/ │ │ │ └── SinkRecordBuilder.java │ │ ├── config/ │ │ │ ├── ClientValidationConfigTest.java │ │ │ ├── SinkTaskConfigTest.java │ │ │ ├── SinkTaskConfigTestBuilder.java │ │ │ └── SnowflakeSinkConnectorConfigBuilder.java │ │ ├── dlq/ │ │ │ └── InMemoryKafkaRecordErrorReporter.java │ │ ├── internal/ │ │ │ ├── CachingSnowflakeConnectionServiceStatsTest.java │ │ │ ├── CachingSnowflakeConnectionServiceTest.java │ │ │ ├── ConnectionServiceIT.java │ │ │ ├── EmbeddedProxyServer.java │ │ │ ├── InternalUtilsTest.java │ │ │ ├── JdbcPropertiesTest.java │ │ │ ├── KCLoggerTest.java │ │ │ ├── NonEncryptedKeyTestSnowflakeConnection.java │ │ │ ├── ResetProxyConfigExec.java │ │ │ ├── SchematizationTestUtils.java │ │ │ ├── SnowflakeConnectionServiceCacheTest.java │ │ │ ├── SnowflakeDataSourceFactory.java │ │ │ ├── SnowflakeURLTest.java │ │ │ ├── StandardSnowflakeConnectionServiceDdlTest.java │ │ │ ├── TestUtils.java │ │ │ ├── TombstoneRecordIngestionIT.java │ │ │ ├── metrics/ │ │ │ │ ├── MetricsJmxReporterTest.java │ │ │ │ └── SnowflakeSinkTaskMetricsTest.java │ │ │ ├── schemaevolution/ │ │ │ │ ├── ColumnInfosTest.java │ │ │ │ ├── SchemaEvolutionTargetItemsTest.java │ │ │ │ ├── SnowflakeColumnTypeMapperTest.java │ │ │ │ ├── SnowflakeSchemaEvolutionServiceTest.java │ │ │ │ ├── TableSchemaResolverTest.java │ │ │ │ └── ValidationResultMapperTest.java │ │ │ ├── streaming/ │ │ │ │ ├── BatchOffsetFetcherTest.java │ │ │ │ ├── ChannelStatusCheckIT.java │ │ │ │ ├── CloseTopicPartitionChannelIT.java │ │ │ │ ├── DefaultStreamingConfigValidatorTest.java │ │ │ │ ├── FakeIngestClientSupplier.java │ │ │ │ ├── FakeSnowflakeStreamingIngestChannel.java │ │ │ │ ├── FakeSnowflakeStreamingIngestClient.java │ │ │ │ ├── InMemorySinkTaskContext.java │ │ │ │ ├── OpenChannelRetryPolicyTest.java │ │ │ │ ├── SnowflakeSinkServiceV2AvroSchematizationIT.java │ │ │ │ ├── SnowflakeSinkServiceV2BaseIT.java │ │ │ │ ├── SnowflakeSinkServiceV2IT.java │ │ │ │ ├── SnowflakeSinkServiceV2SchematizationIT.java │ │ │ │ ├── SnowflakeSinkServiceV2Test.java │ │ │ │ ├── SnowflakeSinkServiceV2ValidationLoggingTest.java │ │ │ │ ├── StreamingClientPropertiesTest.java │ │ │ │ ├── StreamingErrorHandlerIT.java │ │ │ │ ├── StreamingManualModeIT.java │ │ │ │ ├── StreamingSinkServiceBuilder.java │ │ │ │ ├── telemetry/ │ │ │ │ │ └── PeriodicTelemetryReporterTest.java │ │ │ │ └── v2/ │ │ │ │ ├── AppendRowWithFallbackPolicyTest.java │ │ │ │ ├── BackpressureExceptionTest.java │ │ │ │ ├── ClientRecreationExceptionTest.java │ │ │ │ ├── SnowpipeStreamingPartitionChannelTest.java │ │ │ │ ├── StreamingClientManagerIT.java │ │ │ │ ├── client/ │ │ │ │ │ ├── StreamingClientPoolTest.java │ │ │ │ │ └── StreamingClientPoolsTest.java │ │ │ │ └── service/ │ │ │ │ └── PartitionChannelManagerTest.java │ │ │ ├── telemetry/ │ │ │ │ ├── SnowflakeTelemetryChannelStatusTest.java │ │ │ │ └── SnowflakeTelemetryServiceTest.java │ │ │ └── validation/ │ │ │ ├── DataValidationUtilTest.java │ │ │ ├── RowValidatorTest.java │ │ │ └── SqlIdentifierNormalizerTest.java │ │ ├── mock/ │ │ │ └── MockResultSetForSizeTest.java │ │ ├── records/ │ │ │ ├── ConverterTest.java │ │ │ └── SnowflakeSinkRecordTest.java │ │ └── streaming/ │ │ └── iceberg/ │ │ ├── BaseIcebergIT.java │ │ ├── IcebergIngestionIT.java │ │ ├── IcebergIngestionIntoVariantIT.java │ │ ├── IcebergIngestionNoSchemaEvolutionIT.java │ │ ├── IcebergVersion.java │ │ └── sql/ │ │ ├── ComplexJsonRecord.java │ │ ├── MetadataRecord.java │ │ ├── PrimitiveJsonRecord.java │ │ └── RecordWithMetadata.java │ └── resources/ │ ├── com/ │ │ └── snowflake/ │ │ └── kafka/ │ │ └── connector/ │ │ ├── complexJsonPayload.json │ │ ├── complexJsonWithSchema.json │ │ └── records/ │ │ ├── test.avro │ │ ├── test_key.avro │ │ └── test_multi.avro │ ├── log4j.properties │ └── squid.conf ├── test/ │ ├── .gitignore │ ├── E2E_TEST_PLAN.md │ ├── README.md │ ├── __init__.py │ ├── apache_properties/ │ │ ├── connect-distributed.properties │ │ ├── file-secrets.txt │ │ ├── kraft-server.properties │ │ ├── schema-registry.properties │ │ ├── server.properties │ │ └── zookeeper.properties │ ├── build_image.sh │ ├── build_runtime_jar.sh │ ├── conftest.py │ ├── connect-log4j.properties │ ├── docker/ │ │ ├── .gitignore │ │ ├── Dockerfile.apache-kafka │ │ ├── Dockerfile.builder │ │ ├── Dockerfile.test-runner │ │ ├── docker-compose.amd64.yml │ │ ├── docker-compose.apache.yml │ │ ├── docker-compose.base.yml │ │ ├── docker-compose.confluent-kraft.yml │ │ ├── docker-compose.confluent.yml │ │ ├── docker-compose.profile-apache.yml │ │ ├── docker-compose.profile-confluent.yml │ │ └── scripts/ │ │ └── start-apache-kafka.sh │ ├── download_v3_jar.sh │ ├── lib/ │ │ ├── __init__.py │ │ ├── config.py │ │ ├── config_migration.py │ │ ├── crypto.py │ │ ├── driver.py │ │ ├── fixtures/ │ │ │ ├── __init__.py │ │ │ ├── connector.py │ │ │ ├── function.py │ │ │ ├── session.py │ │ │ └── table.py │ │ ├── matchers.py │ │ └── utils.py │ ├── pyproject.toml │ ├── rest_request_template/ │ │ ├── datagen_connector.json │ │ ├── datatype_ingestion.json │ │ ├── iceberg_avro_aws.json │ │ ├── iceberg_json_aws.json │ │ ├── iceberg_schema_evolution_avro_aws.json │ │ ├── iceberg_schema_evolution_json_aws.json │ │ ├── nullable_values_after_smt.json │ │ ├── snowpipe_streaming_legacy_avro_sr.json │ │ ├── snowpipe_streaming_legacy_byte_array_converter.json │ │ ├── snowpipe_streaming_legacy_string_converter.json │ │ ├── snowpipe_streaming_legacy_string_json.json │ │ ├── snowpipe_streaming_schema_evolution.json │ │ ├── snowpipe_streaming_schema_mapping_dlq.json │ │ ├── snowpipe_streaming_string_json_dlq.json │ │ ├── test_kc_delete_create.json │ │ ├── test_kc_delete_create_chaos.json │ │ ├── test_kc_delete_resume.json │ │ ├── test_kc_delete_resume_chaos.json │ │ ├── test_kc_pause_create.json │ │ ├── test_kc_pause_create_chaos.json │ │ ├── test_kc_pause_resume.json │ │ ├── test_kc_pause_resume_chaos.json │ │ ├── test_kc_recreate.json │ │ ├── test_kc_recreate_chaos.json │ │ ├── test_kc_resilience.json │ │ ├── test_kc_restart.json │ │ ├── test_snowpipe_streaming_string_json_ignore_tombstone.json │ │ ├── travis_correct_auto_table_creation.json │ │ ├── travis_correct_auto_table_creation_topic2table.json │ │ ├── travis_correct_avro_avro.json │ │ ├── travis_correct_avrosr_avrosr.json │ │ ├── travis_correct_confluent_protobuf_protobuf.json │ │ ├── travis_correct_json_json.json │ │ ├── travis_correct_multiple_topic_to_one_table_snowpipe_streaming.json │ │ ├── travis_correct_native_complex_smt.json │ │ ├── travis_correct_native_string_json_without_schema.json │ │ ├── travis_correct_native_string_protobuf.json │ │ ├── travis_correct_schema_mapping.json │ │ ├── travis_correct_schema_not_supported_converter.json │ │ ├── travis_correct_snowpipe_streaming_string_avro_sr.json │ │ ├── travis_correct_snowpipe_streaming_string_json.json │ │ ├── travis_correct_string_avro.json │ │ ├── travis_correct_string_avrosr.json │ │ ├── travis_correct_string_json.json │ │ └── travis_correct_string_proxy.json │ ├── run_tests.sh │ ├── scripts/ │ │ ├── analyze_metrics.sh │ │ ├── profile_connect.sh │ │ └── scrape_metrics.sh │ ├── test_data/ │ │ ├── .gitignore │ │ ├── protobuf/ │ │ │ └── pom.xml │ │ ├── sensor.proto │ │ └── twitter.avro │ └── tests/ │ ├── __init__.py │ ├── compatibility/ │ │ ├── __init__.py │ │ ├── conftest.py │ │ ├── test_compatibility_case_sensitivity.py │ │ ├── test_migration.py │ │ ├── test_schematization_disabled.py │ │ ├── test_type_compatibility.py │ │ ├── test_type_compatibility_avro.py │ │ └── test_unsupported_types.py │ ├── high_performance/ │ │ └── test_case_sensitivity.py │ ├── iceberg/ │ │ ├── __init__.py │ │ ├── test_iceberg_avro.py │ │ ├── test_iceberg_json.py │ │ ├── test_iceberg_se_avro.py │ │ └── test_iceberg_se_json.py │ ├── pressure/ │ │ ├── test_perf_backlog_drain.py │ │ ├── test_pressure_init.py │ │ └── test_pressure_restart.py │ ├── schema_evolution/ │ │ ├── __init__.py │ │ ├── test_se_auto_table_creation_avro_sr.py │ │ ├── test_se_auto_table_creation_json.py │ │ ├── test_se_avro_sr.py │ │ ├── test_se_json_ignore_tombstone.py │ │ ├── test_se_multi_topic_replace_table.py │ │ ├── test_se_nonnullable_json.py │ │ ├── test_se_nullable_values_after_smt.py │ │ ├── test_se_random_row_count.py │ │ └── test_se_replace_table.py │ ├── test_auto_table_creation.py │ ├── test_auto_table_creation_topic2table.py │ ├── test_avrosr_avrosr.py │ ├── test_channel_invalidation.py │ ├── test_channel_invalidation_recovery.py │ ├── test_column_identifier_normalization.py │ ├── test_confluent_protobuf_protobuf.py │ ├── test_default_pipe_features.py │ ├── test_error_table.py │ ├── test_json_json.py │ ├── test_kc_delete_create.py │ ├── test_kc_delete_create_chaos.py │ ├── test_kc_delete_resume.py │ ├── test_kc_delete_resume_chaos.py │ ├── test_kc_pause_create.py │ ├── test_kc_pause_create_chaos.py │ ├── test_kc_pause_resume.py │ ├── test_kc_pause_resume_chaos.py │ ├── test_kc_recreate.py │ ├── test_kc_recreate_chaos.py │ ├── test_kc_restart.py │ ├── test_multiple_topic_to_one_table_snowpipe_streaming.py │ ├── test_native_complex_smt.py │ ├── test_native_string_json_without_schema.py │ ├── test_native_string_protobuf.py │ ├── test_nullable_values_after_smt.py │ ├── test_schema_evolution_streaming.py │ ├── test_schema_mapping.py │ ├── test_schema_not_supported_converter.py │ ├── test_snowpipe_streaming_legacy_avro_sr.py │ ├── test_snowpipe_streaming_legacy_byte_array_converter.py │ ├── test_snowpipe_streaming_legacy_string_converter.py │ ├── test_snowpipe_streaming_legacy_string_json.py │ ├── test_snowpipe_streaming_schema_mapping_dlq.py │ ├── test_snowpipe_streaming_string_avro_sr.py │ ├── test_snowpipe_streaming_string_json.py │ ├── test_snowpipe_streaming_string_json_dlq.py │ ├── test_snowpipe_streaming_string_json_ignore_tombstone.py │ ├── test_string_avrosr.py │ └── test_string_json.py └── upload_jar.sh
Showing preview only (232K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (2720 symbols across 275 files)
FILE: .github/scripts/parse_java_test_reports.py
function _classname_to_path (line 15) | def _classname_to_path(classname: str, connector_root: Path):
function _line_in_test_class (line 25) | def _line_in_test_class(stack_trace: str, classname: str):
function parse_suite (line 33) | def parse_suite(path: Path) -> list[tuple[str, str, str, str, str]]:
function _first_line_for_annotation (line 53) | def _first_line_for_annotation(exc_type: str, message: str, stack_trace:...
function _emit_error_annotation (line 64) | def _emit_error_annotation(
function main (line 90) | def main() -> None:
FILE: scripts/process_licenses.py
function parse_cmdline_args (line 102) | def parse_cmdline_args():
function main (line 122) | def main():
FILE: src/main/java/com/snowflake/ingest/streaming/internal/TimestampWrapper.java
class TimestampWrapper (line 14) | public class TimestampWrapper {
method TimestampWrapper (line 24) | public TimestampWrapper(OffsetDateTime offsetDateTime, int scale) {
method toBinary (line 39) | public BigInteger toBinary(boolean includeTimezone) {
FILE: src/main/java/com/snowflake/kafka/connector/ConnectorConfigTools.java
class ConnectorConfigTools (line 25) | public class ConnectorConfigTools {
method ensureValid (line 36) | @Override
method setDefaultValues (line 45) | public static void setDefaultValues(Map<String, String> config) {
method getProperty (line 91) | public static String getProperty(final Map<String, String> config, fin...
type BehaviorOnNullValues (line 100) | public enum BehaviorOnNullValues {
method ensureValid (line 115) | @Override
method toString (line 124) | @Override
method names (line 131) | public static String[] names() {
method toString (line 142) | @Override
type ErrorTolerance (line 149) | public enum ErrorTolerance {
method ensureValid (line 166) | @Override
method toString (line 174) | @Override
method names (line 183) | public static String[] names() {
method toString (line 194) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/ConnectorConfigValidator.java
type ConnectorConfigValidator (line 5) | public interface ConnectorConfigValidator {
method validateConfig (line 12) | void validateConfig(Map<String, String> config);
FILE: src/main/java/com/snowflake/kafka/connector/Constants.java
class Constants (line 3) | public final class Constants {
class KafkaConnectorConfigParams (line 6) | public static final class KafkaConnectorConfigParams {
FILE: src/main/java/com/snowflake/kafka/connector/DefaultConnectorConfigValidator.java
class DefaultConnectorConfigValidator (line 24) | public class DefaultConnectorConfigValidator implements ConnectorConfigV...
method DefaultConnectorConfigValidator (line 31) | public DefaultConnectorConfigValidator(StreamingConfigValidator stream...
method validateConfig (line 35) | public void validateConfig(Map<String, String> config) {
method validateOAuthConfig (line 161) | private void validateOAuthConfig(
method validateCompatibilitySettings (line 183) | private void validateCompatibilitySettings(
method validateCacheConfig (line 321) | private void validateCacheConfig(
method isValidBooleanString (line 386) | private static boolean isValidBooleanString(String value) {
method handleInvalidParameters (line 390) | private void handleInvalidParameters(ImmutableMap<String, String> inva...
FILE: src/main/java/com/snowflake/kafka/connector/SemanticVersion.java
class SemanticVersion (line 8) | public class SemanticVersion implements Comparable<SemanticVersion> {
method SemanticVersion (line 15) | public SemanticVersion(String version) {
method originalVersion (line 29) | public String originalVersion() {
method isReleaseCandidate (line 33) | public boolean isReleaseCandidate() {
method major (line 37) | public int major() {
method minor (line 41) | public int minor() {
method patch (line 45) | public int patch() {
method compareTo (line 49) | @Override
method equals (line 60) | @Override
method hashCode (line 69) | @Override
method toString (line 74) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/SnowflakeSinkTask.java
class SnowflakeSinkTask (line 58) | public class SnowflakeSinkTask extends SinkTask {
method SnowflakeSinkTask (line 93) | public SnowflakeSinkTask() {
method SnowflakeSinkTask (line 97) | @VisibleForTesting
method getConnection (line 105) | private SnowflakeConnectionService getConnection() {
method getSnowflakeConnection (line 120) | public Optional<SnowflakeConnectionService> getSnowflakeConnection() {
method getSink (line 124) | protected SnowflakeSinkService getSink() {
method start (line 138) | @Override
method stop (line 219) | @Override
method open (line 244) | @Override
method close (line 266) | @Override
method put (line 290) | @Override
method preCommit (line 324) | @Override
method version (line 379) | @Override
method waitFor (line 389) | private static void waitFor(Supplier<Boolean> func)
method getDurationFromStartMs (line 400) | private static long getDurationFromStartMs(long startTime) {
method logWarningForPutAndPrecommit (line 405) | void logWarningForPutAndPrecommit(long startTime, String logContent, b...
method createKafkaRecordErrorReporter (line 430) | private KafkaRecordErrorReporter createKafkaRecordErrorReporter() {
method awaitInitialization (line 466) | @VisibleForTesting
method noOpKafkaRecordErrorReporter (line 478) | @VisibleForTesting
FILE: src/main/java/com/snowflake/kafka/connector/SnowflakeSinkTaskAuthorizationExceptionTracker.java
class SnowflakeSinkTaskAuthorizationExceptionTracker (line 17) | public class SnowflakeSinkTaskAuthorizationExceptionTracker {
method SnowflakeSinkTaskAuthorizationExceptionTracker (line 24) | public SnowflakeSinkTaskAuthorizationExceptionTracker() {
method updateStateOnTaskStart (line 29) | public void updateStateOnTaskStart(Map<String, String> taskConfig) {
method reportPrecommitException (line 42) | public void reportPrecommitException(Exception ex) {
method throwExceptionIfAuthorizationFailed (line 49) | public void throwExceptionIfAuthorizationFailed() {
FILE: src/main/java/com/snowflake/kafka/connector/SnowflakeStreamingSinkConnector.java
class SnowflakeStreamingSinkConnector (line 47) | public class SnowflakeStreamingSinkConnector extends SinkConnector {
method SnowflakeStreamingSinkConnector (line 74) | public SnowflakeStreamingSinkConnector() {
method start (line 86) | @Override
method stop (line 134) | @Override
method taskClass (line 147) | @Override
method taskConfigs (line 160) | @Override
method config (line 195) | @Override
method validate (line 200) | @Override
method isUsingConfigProviderForPrivateKey (line 313) | private static boolean isUsingConfigProviderForPrivateKey(Map<String, ...
method version (line 330) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/TopicToTableParser.java
class TopicToTableParser (line 9) | public class TopicToTableParser {
method TopicToTableParser (line 13) | TopicToTableParser(String input) {
method parse (line 17) | public static Map<String, String> parse(String input) {
method parseEntries (line 39) | public List<Entry> parseEntries() {
method parseToken (line 63) | private String parseToken(boolean uppercaseIfUnquoted) {
method parseQuotedToken (line 78) | private String parseQuotedToken() {
method parseUnquotedToken (line 98) | private String parseUnquotedToken() {
method skipWhitespace (line 118) | private void skipWhitespace() {
method expect (line 124) | private void expect(char expectedCharacter) {
method isAtEnd (line 131) | private boolean isAtEnd() {
method error (line 135) | private IllegalArgumentException error(String message) {
class Entry (line 146) | public static final class Entry {
method Entry (line 150) | private Entry(String topic, String table) {
method getTopic (line 155) | public String getTopic() {
method getTable (line 159) | public String getTable() {
FILE: src/main/java/com/snowflake/kafka/connector/Utils.java
class Utils (line 42) | public class Utils {
method checkConnectorVersion (line 76) | public static boolean checkConnectorVersion() {
method checkConnectorVersion (line 86) | static boolean checkConnectorVersion(
method fetchAvailableVersionsFromMaven (line 113) | static List<String> fetchAvailableVersionsFromMaven() {
method findRecommendedVersion (line 145) | static String findRecommendedVersion(
method validateProxySettings (line 180) | public static ImmutableMap<String, String> validateProxySettings(Map<S...
method enableJVMProxy (line 220) | public static void enableJVMProxy(Map<String, String> config) {
method isValidSnowflakeObjectIdentifier (line 279) | static boolean isValidSnowflakeObjectIdentifier(String objName) {
method isValidSnowflakeApplicationName (line 289) | public static boolean isValidSnowflakeApplicationName(String appName) {
method convertAppName (line 298) | public static void convertAppName(Map<String, String> config) {
method getTableName (line 315) | public static String getTableName(
method generateValidNameFromMap (line 328) | private static String generateValidNameFromMap(
method parseCommaSeparatedKeyValuePairs (line 396) | public static Map<String, String> parseCommaSeparatedKeyValuePairs(Str...
method isSingleFieldValid (line 420) | public static boolean isSingleFieldValid(Config result) {
method validateConfigToMap (line 443) | public static Map<String, ConfigValue> validateConfigToMap(final Confi...
method updateConfigErrorMessage (line 451) | public static void updateConfigErrorMessage(Config result, String key,...
method formatLogMessage (line 477) | public static String formatLogMessage(String format, Object... vars) {
method formatString (line 481) | public static String formatString(String format, Object... vars) {
FILE: src/main/java/com/snowflake/kafka/connector/config/AuthenticatorType.java
type AuthenticatorType (line 10) | public enum AuthenticatorType {
method toConfigValue (line 18) | public String toConfigValue() {
method fromConfig (line 28) | public static AuthenticatorType fromConfig(String value) {
FILE: src/main/java/com/snowflake/kafka/connector/config/CommaSeparatedKeyValueValidator.java
class CommaSeparatedKeyValueValidator (line 11) | class CommaSeparatedKeyValueValidator implements ConfigDef.Validator {
method CommaSeparatedKeyValueValidator (line 12) | public CommaSeparatedKeyValueValidator() {}
method ensureValid (line 14) | public void ensureValid(String name, Object value) {
method isValidCommaSeparatedKeyValueString (line 22) | private boolean isValidCommaSeparatedKeyValueString(String input) {
method toString (line 42) | public String toString() {
FILE: src/main/java/com/snowflake/kafka/connector/config/ConnectorConfigDefinition.java
class ConnectorConfigDefinition (line 13) | public class ConnectorConfigDefinition {
method getConfig (line 27) | public static ConfigDef getConfig() {
FILE: src/main/java/com/snowflake/kafka/connector/config/SinkTaskConfig.java
class SinkTaskConfig (line 25) | @AutoValue
method getConnectorName (line 28) | public abstract String getConnectorName();
method getTaskId (line 30) | public abstract String getTaskId();
method getTopicToTableMap (line 33) | public abstract Map<String, String> getTopicToTableMap();
method getBehaviorOnNullValues (line 35) | public abstract ConnectorConfigTools.BehaviorOnNullValues getBehaviorO...
method isJmxEnabled (line 37) | public abstract boolean isJmxEnabled();
method isTolerateErrors (line 39) | public abstract boolean isTolerateErrors();
method isErrorsLogEnable (line 41) | public abstract boolean isErrorsLogEnable();
method getDlqTopicName (line 43) | @Nullable
method isEnableSanitization (line 46) | public abstract boolean isEnableSanitization();
method isEnableSchematization (line 48) | public abstract boolean isEnableSchematization();
method isEnableColumnIdentifierNormalization (line 50) | public abstract boolean isEnableColumnIdentifierNormalization();
method getValidation (line 52) | public abstract SnowflakeValidation getValidation();
method getOpenChannelIoThreads (line 54) | public abstract int getOpenChannelIoThreads();
method getStreamingClientProviderOverrideMap (line 56) | @Nullable
method getCachingConfig (line 59) | public abstract CachingConfig getCachingConfig();
method getMetadataConfig (line 61) | public abstract SnowflakeMetadataConfig getMetadataConfig();
method getSnowflakeUrl (line 63) | @Nullable
method getSnowflakeUser (line 66) | @Nullable
method getSnowflakeRole (line 69) | @Nullable
method getSnowflakePrivateKey (line 72) | @Nullable
method getSnowflakePrivateKeyPassphrase (line 75) | @Nullable
method getAuthenticator (line 78) | public abstract AuthenticatorType getAuthenticator();
method getOauthClientId (line 80) | @Nullable
method getOauthClientSecret (line 83) | @Nullable
method getOauthRefreshToken (line 86) | @Nullable
method getOauthTokenEndpoint (line 89) | @Nullable
method getSnowflakeDatabase (line 92) | @Nullable
method getSnowflakeSchema (line 95) | @Nullable
method getProxyHost (line 98) | @Nullable
method getProxyPort (line 101) | @Nullable
method getNonProxyHosts (line 104) | @Nullable
method getProxyUsername (line 107) | @Nullable
method getProxyPassword (line 110) | @Nullable
method getJdbcMap (line 113) | @Nullable
method getSsv1MigrationMode (line 116) | public abstract Ssv1MigrationMode getSsv1MigrationMode();
method isSsv1MigrationIncludeConnectorName (line 118) | public abstract boolean isSsv1MigrationIncludeConnectorName();
method from (line 121) | public static SinkTaskConfig from(Map<String, String> raw) {
method from (line 136) | public static SinkTaskConfig from(Map<String, String> raw, boolean ski...
method builderFrom (line 140) | @VisibleForTesting
method builderFrom (line 145) | @VisibleForTesting
method passwordOrNull (line 339) | private static Password passwordOrNull(String value) {
method builder (line 344) | public static Builder builder() {
class Builder (line 351) | @AutoValue.Builder
method connectorName (line 353) | public abstract Builder connectorName(String connectorName);
method taskId (line 355) | public abstract Builder taskId(String taskId);
method topicToTableMap (line 357) | public abstract Builder topicToTableMap(Map<String, String> topicToT...
method behaviorOnNullValues (line 359) | public abstract Builder behaviorOnNullValues(
method jmxEnabled (line 362) | public abstract Builder jmxEnabled(boolean jmxEnabled);
method tolerateErrors (line 364) | public abstract Builder tolerateErrors(boolean tolerateErrors);
method errorsLogEnable (line 366) | public abstract Builder errorsLogEnable(boolean errorsLogEnable);
method dlqTopicName (line 368) | public abstract Builder dlqTopicName(String dlqTopicName);
method enableSanitization (line 370) | public abstract Builder enableSanitization(boolean enableSanitization);
method enableSchematization (line 372) | public abstract Builder enableSchematization(boolean enableSchematiz...
method enableColumnIdentifierNormalization (line 374) | public abstract Builder enableColumnIdentifierNormalization(
method validation (line 377) | public abstract Builder validation(SnowflakeValidation validation);
method openChannelIoThreads (line 379) | public abstract Builder openChannelIoThreads(int openChannelIoThreads);
method streamingClientProviderOverrideMap (line 381) | public abstract Builder streamingClientProviderOverrideMap(
method cachingConfig (line 384) | public abstract Builder cachingConfig(CachingConfig cachingConfig);
method metadataConfig (line 386) | public abstract Builder metadataConfig(SnowflakeMetadataConfig metad...
method snowflakeUrl (line 388) | public abstract Builder snowflakeUrl(String snowflakeUrl);
method snowflakeUser (line 390) | public abstract Builder snowflakeUser(String snowflakeUser);
method snowflakeRole (line 392) | public abstract Builder snowflakeRole(String snowflakeRole);
method snowflakePrivateKey (line 394) | public abstract Builder snowflakePrivateKey(Password snowflakePrivat...
method snowflakePrivateKeyPassphrase (line 396) | public abstract Builder snowflakePrivateKeyPassphrase(Password snowf...
method authenticator (line 398) | public abstract Builder authenticator(AuthenticatorType authenticator);
method oauthClientId (line 400) | public abstract Builder oauthClientId(String oauthClientId);
method oauthClientSecret (line 402) | public abstract Builder oauthClientSecret(Password oauthClientSecret);
method oauthRefreshToken (line 404) | public abstract Builder oauthRefreshToken(Password oauthRefreshToken);
method oauthTokenEndpoint (line 406) | public abstract Builder oauthTokenEndpoint(String oauthTokenEndpoint);
method snowflakeDatabase (line 408) | public abstract Builder snowflakeDatabase(String snowflakeDatabase);
method snowflakeSchema (line 410) | public abstract Builder snowflakeSchema(String snowflakeSchema);
method proxyHost (line 412) | public abstract Builder proxyHost(String proxyHost);
method proxyPort (line 414) | public abstract Builder proxyPort(String proxyPort);
method nonProxyHosts (line 416) | public abstract Builder nonProxyHosts(String nonProxyHosts);
method proxyUsername (line 418) | public abstract Builder proxyUsername(String proxyUsername);
method proxyPassword (line 420) | public abstract Builder proxyPassword(String proxyPassword);
method jdbcMap (line 422) | public abstract Builder jdbcMap(String jdbcMap);
method ssv1MigrationMode (line 424) | public abstract Builder ssv1MigrationMode(Ssv1MigrationMode ssv1Migr...
method ssv1MigrationIncludeConnectorName (line 426) | public abstract Builder ssv1MigrationIncludeConnectorName(
method build (line 429) | public abstract SinkTaskConfig build();
FILE: src/main/java/com/snowflake/kafka/connector/config/SnowflakeValidation.java
type SnowflakeValidation (line 9) | public enum SnowflakeValidation {
method fromConfig (line 24) | public static SnowflakeValidation fromConfig(String value) {
FILE: src/main/java/com/snowflake/kafka/connector/config/TopicToTableValidator.java
class TopicToTableValidator (line 7) | class TopicToTableValidator implements ConfigDef.Validator {
method TopicToTableValidator (line 8) | public TopicToTableValidator() {}
method ensureValid (line 10) | public void ensureValid(String name, Object value) {
method toString (line 22) | public String toString() {
FILE: src/main/java/com/snowflake/kafka/connector/dlq/KafkaRecordErrorReporter.java
type KafkaRecordErrorReporter (line 15) | public interface KafkaRecordErrorReporter {
method reportError (line 16) | void reportError(SinkRecord record, Exception e);
FILE: src/main/java/com/snowflake/kafka/connector/internal/CachingConfig.java
class CachingConfig (line 12) | public final class CachingConfig {
method CachingConfig (line 18) | private CachingConfig(
method isTableExistsCacheEnabled (line 29) | public boolean isTableExistsCacheEnabled() {
method getTableExistsCacheExpireMs (line 33) | public long getTableExistsCacheExpireMs() {
method isPipeExistsCacheEnabled (line 37) | public boolean isPipeExistsCacheEnabled() {
method getPipeExistsCacheExpireMs (line 41) | public long getPipeExistsCacheExpireMs() {
method fromConfig (line 45) | public static CachingConfig fromConfig(final Map<String, String> confi...
method toString (line 85) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/CachingSnowflakeConnectionService.java
class CachingSnowflakeConnectionService (line 23) | public class CachingSnowflakeConnectionService implements SnowflakeConne...
method CachingSnowflakeConnectionService (line 45) | public CachingSnowflakeConnectionService(
method tableExist (line 78) | @Override
method pipeExist (line 93) | @Override
method logCacheStatistics (line 109) | public void logCacheStatistics() {
method createTableWithOnlyMetadataColumn (line 161) | @Override
method isTableCompatible (line 168) | @Override
method databaseExists (line 173) | @Override
method schemaExists (line 178) | @Override
method getTelemetryClient (line 183) | @Override
method close (line 188) | @Override
method isClosed (line 195) | @Override
method getConnectorName (line 200) | @Override
method getConnection (line 205) | @Override
method describeTable (line 210) | @Override
method executeQueryWithParameters (line 215) | @Override
method appendColumnsToTable (line 223) | @Override
method alterNonNullableColumns (line 228) | @Override
method shouldEvolveSchema (line 233) | @Override
method isIcebergTable (line 238) | @Override
method hasErrorLoggingEnabled (line 243) | @Override
method migrateSsv1ChannelOffset (line 258) | @Override
method logStatsIfNeeded (line 264) | private void logStatsIfNeeded() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/DescribeTableRow.java
class DescribeTableRow (line 6) | public class DescribeTableRow {
method DescribeTableRow (line 15) | public DescribeTableRow(
method DescribeTableRow (line 31) | public DescribeTableRow(String column, String type, String comment, St...
method getColumn (line 35) | public String getColumn() {
method getType (line 39) | public String getType() {
method getComment (line 43) | public String getComment() {
method getNullable (line 47) | public String getNullable() {
method getDefaultValue (line 51) | public String getDefaultValue() {
method getAutoincrement (line 55) | public String getAutoincrement() {
method hasDefault (line 60) | public boolean hasDefault() {
method isAutoincrement (line 65) | public boolean isAutoincrement() {
method equals (line 69) | @Override
method hashCode (line 77) | @Override
method toString (line 82) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/InternalUtils.java
class InternalUtils (line 16) | public class InternalUtils {
method resultSize (line 43) | static int resultSize(ResultSet resultSet) throws SQLException {
method assertNotEmpty (line 51) | static void assertNotEmpty(String name, Object value) {
method timestampToDate (line 72) | static String timestampToDate(long time) {
method makeJdbcDriverProperties (line 85) | static Properties makeJdbcDriverProperties(SinkTaskConfig config, Snow...
method putIfNotBlank (line 127) | private static void putIfNotBlank(Properties properties, String key, S...
method generateProxyParametersIfRequired (line 140) | protected static Properties generateProxyParametersIfRequired(SinkTask...
method parseJdbcPropertiesMap (line 163) | protected static Properties parseJdbcPropertiesMap(SinkTaskConfig conf...
type backoffFunction (line 173) | public interface backoffFunction {
method apply (line 174) | Object apply() throws Exception;
FILE: src/main/java/com/snowflake/kafka/connector/internal/JdbcProperties.java
class JdbcProperties (line 6) | public class JdbcProperties {
method JdbcProperties (line 14) | private JdbcProperties(Properties combinedProperties, Properties proxy...
method getProperties (line 19) | public Properties getProperties() {
method getProxyProperties (line 23) | public Properties getProxyProperties() {
method create (line 36) | static JdbcProperties create(
method detectOverrides (line 50) | private static void detectOverrides(Properties proxyAndConnection, Pro...
method mergeProperties (line 59) | private static Properties mergeProperties(
method setEmptyIfNull (line 68) | private static Properties setEmptyIfNull(Properties properties) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/JdbcPropertyKeys.java
class JdbcPropertyKeys (line 8) | public final class JdbcPropertyKeys {
method JdbcPropertyKeys (line 10) | private JdbcPropertyKeys() {}
FILE: src/main/java/com/snowflake/kafka/connector/internal/KCLogger.java
class KCLogger (line 9) | public class KCLogger {
method toggleGlobalMdcLoggingContext (line 21) | public static void toggleGlobalMdcLoggingContext(boolean shouldPrepend...
method KCLogger (line 34) | public KCLogger(String name) {
method info (line 44) | public void info(String format, Object... vars) {
method isInfoEnabled (line 50) | public boolean isInfoEnabled() {
method trace (line 60) | public void trace(String format, Object... vars) {
method debug (line 72) | public void debug(String format, Object... vars) {
method warn (line 84) | public void warn(String format, Object... vars) {
method error (line 96) | public void error(String format, Object... vars) {
method error (line 102) | public void error(String s, Throwable throwable) {
method isDebugEnabled (line 108) | public boolean isDebugEnabled() {
method isTraceEnabled (line 112) | public boolean isTraceEnabled() {
method getFormattedLogMessage (line 116) | private String getFormattedLogMessage(String format, Object... vars) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/PrivateKeyTool.java
class PrivateKeyTool (line 19) | public final class PrivateKeyTool {
method parsePrivateKey (line 23) | public static PrivateKey parsePrivateKey(String privateKeyStr, String ...
method parseNonEncryptedPrivateKey (line 31) | private static PrivateKey parseNonEncryptedPrivateKey(String key) {
method parseEncryptedPrivateKey (line 52) | private static PrivateKey parseEncryptedPrivateKey(String key, String ...
FILE: src/main/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionService.java
type SnowflakeConnectionService (line 11) | public interface SnowflakeConnectionService {
method tableExist (line 18) | boolean tableExist(String tableName);
method pipeExist (line 26) | boolean pipeExist(String pipeName);
method isTableCompatible (line 34) | boolean isTableCompatible(String tableName);
method databaseExists (line 41) | void databaseExists(String databaseName);
method schemaExists (line 48) | void schemaExists(String schemaName);
method getTelemetryClient (line 53) | SnowflakeTelemetryService getTelemetryClient();
method close (line 56) | void close();
method isClosed (line 61) | boolean isClosed();
method getConnectorName (line 66) | String getConnectorName();
method getConnection (line 71) | Connection getConnection();
method createTableWithOnlyMetadataColumn (line 82) | void createTableWithOnlyMetadataColumn(String tableName);
method describeTable (line 91) | Optional<List<DescribeTableRow>> describeTable(String tableName);
method executeQueryWithParameters (line 99) | void executeQueryWithParameters(String query, String... parameters);
method appendColumnsToTable (line 107) | void appendColumnsToTable(String tableName, Map<String, ColumnInfos> c...
method alterNonNullableColumns (line 115) | void alterNonNullableColumns(String tableName, List<String> columnNames);
method shouldEvolveSchema (line 125) | boolean shouldEvolveSchema(String tableName, String role);
method isIcebergTable (line 133) | boolean isIcebergTable(String tableName);
method hasErrorLoggingEnabled (line 141) | boolean hasErrorLoggingEnabled(String tableName);
method migrateSsv1ChannelOffset (line 157) | Ssv1MigrationResponse migrateSsv1ChannelOffset(
FILE: src/main/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionServiceFactory.java
class SnowflakeConnectionServiceFactory (line 7) | public class SnowflakeConnectionServiceFactory {
method builder (line 8) | public static SnowflakeConnectionServiceBuilder builder() {
class SnowflakeConnectionServiceBuilder (line 12) | public static class SnowflakeConnectionServiceBuilder {
method getProperties (line 21) | public Properties getProperties() {
method setTaskID (line 25) | public SnowflakeConnectionServiceBuilder setTaskID(String taskID) {
method setProperties (line 30) | public SnowflakeConnectionServiceBuilder setProperties(Map<String, S...
method setProperties (line 34) | public SnowflakeConnectionServiceBuilder setProperties(SinkTaskConfi...
method build (line 51) | public SnowflakeConnectionService build() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/SnowflakeErrors.java
type SnowflakeErrors (line 24) | public enum SnowflakeErrors {
method SnowflakeErrors (line 181) | SnowflakeErrors(String code, String name, String detail) {
method getException (line 187) | public SnowflakeKafkaConnectorException getException() {
method getException (line 191) | public SnowflakeKafkaConnectorException getException(String msg) {
method getException (line 195) | public SnowflakeKafkaConnectorException getException(Exception e) {
method getException (line 199) | public SnowflakeKafkaConnectorException getException(
method getException (line 209) | public SnowflakeKafkaConnectorException getException(SnowflakeTelemetr...
method getException (line 223) | public SnowflakeKafkaConnectorException getException(
method getCode (line 240) | public String getCode() {
method getDetail (line 244) | public String getDetail() {
method toString (line 248) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/SnowflakeKafkaConnectorException.java
class SnowflakeKafkaConnectorException (line 3) | public class SnowflakeKafkaConnectorException extends RuntimeException {
method SnowflakeKafkaConnectorException (line 6) | public SnowflakeKafkaConnectorException(String msg, String code) {
method getCode (line 11) | public String getCode() {
method checkErrorCode (line 15) | public boolean checkErrorCode(SnowflakeErrors error) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/SnowflakeSinkService.java
type SnowflakeSinkService (line 13) | public interface SnowflakeSinkService {
method startPartition (line 19) | void startPartition(TopicPartition topicPartition);
method startPartitions (line 27) | void startPartitions(Collection<TopicPartition> partitions);
method insert (line 34) | void insert(final Collection<SinkRecord> records);
method insert (line 43) | boolean insert(final SinkRecord record);
method getOffset (line 51) | long getOffset(TopicPartition topicPartition);
method getCommittedOffsets (line 62) | Map<TopicPartition, Long> getCommittedOffsets(Collection<TopicPartitio...
method getPartitionCount (line 69) | int getPartitionCount();
method closeAll (line 72) | void closeAll();
method close (line 79) | void close(Collection<TopicPartition> partitions);
method stop (line 87) | void stop();
method isClosed (line 94) | boolean isClosed();
method getPartitionChannels (line 96) | Map<String, TopicPartitionChannel> getPartitionChannels();
method awaitInitialization (line 99) | default void awaitInitialization() {}
method getMetricRegistry (line 102) | @VisibleForTesting
FILE: src/main/java/com/snowflake/kafka/connector/internal/SnowflakeURL.java
class SnowflakeURL (line 24) | public class SnowflakeURL implements URL {
method SnowflakeURL (line 57) | public SnowflakeURL(String urlStr) {
method getJdbcUrl (line 84) | String getJdbcUrl() {
method getAccount (line 88) | public String getAccount() {
method sslEnabled (line 92) | public boolean sslEnabled() {
method getScheme (line 96) | public String getScheme() {
method getFullUrl (line 104) | String getFullUrl() {
method getUrlWithoutPort (line 108) | public String getUrlWithoutPort() {
method getPort (line 112) | int getPort() {
method toString (line 116) | @Override
method hostWithPort (line 121) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/StandardSnowflakeConnectionService.java
class StandardSnowflakeConnectionService (line 27) | public class StandardSnowflakeConnectionService implements SnowflakeConn...
method StandardSnowflakeConnectionService (line 41) | StandardSnowflakeConnectionService(
method createTableWithOnlyMetadataColumn (line 65) | @Override
method tableExist (line 99) | @Override
method pipeExist (line 104) | @Override
method isTableCompatible (line 132) | @Override
method databaseExists (line 184) | @Override
method schemaExists (line 200) | @Override
method getTelemetryClient (line 217) | @Override
method close (line 222) | @Override
method isClosed (line 233) | @Override
method getConnectorName (line 242) | @Override
method checkConnection (line 248) | private void checkConnection() {
method pipeDefinition (line 265) | private String pipeDefinition(String tableName, String stageName) {
method getConnection (line 274) | @Override
method describeTable (line 279) | @Override
method shouldEvolveSchema (line 324) | @Override
method isIcebergTable (line 397) | @Override
method hasErrorLoggingEnabled (line 415) | @Override
method executeQueryWithParameters (line 448) | @Override
method appendColumnsToTable (line 462) | @Override
method migrateSsv1ChannelOffset (line 502) | @Override
method alterNonNullableColumns (line 550) | @Override
method quoteIdentifier (line 599) | private static String quoteIdentifier(String name) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/URL.java
type URL (line 3) | public interface URL {
method hostWithPort (line 4) | String hostWithPort();
method getScheme (line 6) | String getScheme();
FILE: src/main/java/com/snowflake/kafka/connector/internal/metrics/MetricsJmxReporter.java
class MetricsJmxReporter (line 25) | public class MetricsJmxReporter {
method MetricsJmxReporter (line 37) | public MetricsJmxReporter(MetricRegistry metricRegistry, final String ...
method getMetricRegistry (line 42) | public MetricRegistry getMetricRegistry() {
method start (line 50) | public void start() {
method getObjectName (line 64) | @VisibleForTesting
method removeMetricsFromRegistry (line 93) | public void removeMetricsFromRegistry(final String prefixFilter) {
method removeMetric (line 109) | public boolean removeMetric(final String exactName) {
method createJMXReporter (line 124) | private JmxReporter createJMXReporter(final String connectorName) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/metrics/MetricsUtil.java
class MetricsUtil (line 6) | public class MetricsUtil {
method channelMetricPrefix (line 29) | public static String channelMetricPrefix(final String channelName) {
method channelMetricName (line 45) | public static String channelMetricName(
method taskMetricPrefix (line 54) | public static String taskMetricPrefix(final String taskPrefix) {
method taskMetricName (line 69) | public static String taskMetricName(
FILE: src/main/java/com/snowflake/kafka/connector/internal/metrics/NoopTaskMetrics.java
type NoopTaskMetrics (line 4) | enum NoopTaskMetrics implements TaskMetrics {
method timePut (line 7) | @Override
method timePreCommit (line 12) | @Override
method timeOpen (line 17) | @Override
method timeClose (line 22) | @Override
method timeSdkClientCreate (line 27) | @Override
method timeChannelOpen (line 32) | @Override
method timeOffsetFetch (line 37) | @Override
method recordStartDuration (line 42) | @Override
method incOpenCount (line 45) | @Override
method incCloseCount (line 48) | @Override
method incChannelOpenCount (line 51) | @Override
method incPreCommitPartitionsSkipped (line 54) | @Override
method incBackpressureRewindCount (line 57) | @Override
method markPutRecords (line 60) | @Override
method setAssignedPartitions (line 63) | @Override
method unregister (line 66) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/metrics/SnowflakeSinkTaskMetrics.java
class SnowflakeSinkTaskMetrics (line 25) | public class SnowflakeSinkTaskMetrics implements TaskMetrics {
method SnowflakeSinkTaskMetrics (line 86) | public SnowflakeSinkTaskMetrics(
method SnowflakeSinkTaskMetrics (line 91) | public SnowflakeSinkTaskMetrics(
method timePut (line 162) | @Override
method timePreCommit (line 167) | @Override
method timeOpen (line 172) | @Override
method timeClose (line 177) | @Override
method timeSdkClientCreate (line 182) | @Override
method timeChannelOpen (line 187) | @Override
method timeOffsetFetch (line 192) | @Override
method recordStartDuration (line 197) | @Override
method incOpenCount (line 204) | @Override
method incCloseCount (line 209) | @Override
method incChannelOpenCount (line 214) | @Override
method incPreCommitPartitionsSkipped (line 219) | @Override
method incBackpressureRewindCount (line 224) | @Override
method markPutRecords (line 231) | @Override
method setAssignedPartitions (line 238) | @Override
method unregister (line 245) | @Override
method putDuration (line 253) | Timer putDuration() {
method preCommitDuration (line 257) | Timer preCommitDuration() {
method openDuration (line 261) | Timer openDuration() {
method closeDuration (line 265) | Timer closeDuration() {
method startDuration (line 269) | Timer startDuration() {
method channelOpenDuration (line 273) | Timer channelOpenDuration() {
method sdkClientCreateDuration (line 277) | Timer sdkClientCreateDuration() {
method preCommitOffsetFetchDuration (line 281) | Timer preCommitOffsetFetchDuration() {
method putRecords (line 285) | Meter putRecords() {
method preCommitPartitionsSkipped (line 289) | Counter preCommitPartitionsSkipped() {
method openCount (line 293) | Counter openCount() {
method closeCount (line 297) | Counter closeCount() {
method channelOpenCount (line 301) | Counter channelOpenCount() {
method backpressureRewindCount (line 305) | Counter backpressureRewindCount() {
method getAssignedPartitions (line 309) | int getAssignedPartitions() {
method wrap (line 315) | private static TimingContext wrap(Timer timer) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/metrics/TaskMetrics.java
type TaskMetrics (line 10) | public interface TaskMetrics {
method timePut (line 14) | TimingContext timePut();
method timePreCommit (line 16) | TimingContext timePreCommit();
method timeOpen (line 18) | TimingContext timeOpen();
method timeClose (line 20) | TimingContext timeClose();
method timeSdkClientCreate (line 22) | TimingContext timeSdkClientCreate();
method timeChannelOpen (line 24) | TimingContext timeChannelOpen();
method timeOffsetFetch (line 26) | TimingContext timeOffsetFetch();
method recordStartDuration (line 28) | void recordStartDuration(long nanos);
method incOpenCount (line 32) | void incOpenCount();
method incCloseCount (line 34) | void incCloseCount();
method incChannelOpenCount (line 36) | void incChannelOpenCount();
method incPreCommitPartitionsSkipped (line 38) | void incPreCommitPartitionsSkipped();
method incBackpressureRewindCount (line 40) | void incBackpressureRewindCount();
method markPutRecords (line 44) | void markPutRecords(long count);
method setAssignedPartitions (line 48) | void setAssignedPartitions(int count);
method unregister (line 52) | void unregister();
type TimingContext (line 56) | @FunctionalInterface
method close (line 60) | @Override
method noop (line 66) | static TaskMetrics noop() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/ColumnInfos.java
class ColumnInfos (line 11) | public class ColumnInfos {
method ColumnInfos (line 15) | public ColumnInfos(String columnType, String comments) {
method ColumnInfos (line 20) | public ColumnInfos(String columnType) {
method getColumnType (line 25) | public String getColumnType() {
method getComments (line 29) | public String getComments() {
method getDdlComments (line 33) | public String getDdlComments() {
method equals (line 39) | @Override
method hashCode (line 47) | @Override
method toString (line 52) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/ColumnTypeMapper.java
class ColumnTypeMapper (line 11) | public abstract class ColumnTypeMapper {
method mapToColumnType (line 13) | public String mapToColumnType(Schema.Type kafkaType) {
method mapToColumnType (line 17) | public abstract String mapToColumnType(Schema.Type kafkaType, String s...
method mapJsonNodeTypeToKafkaType (line 25) | public abstract Schema.Type mapJsonNodeTypeToKafkaType(JsonNode value);
FILE: src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/SchemaEvolutionTargetItems.java
class SchemaEvolutionTargetItems (line 17) | public class SchemaEvolutionTargetItems {
method SchemaEvolutionTargetItems (line 23) | public SchemaEvolutionTargetItems(
method hasDataForSchemaEvolution (line 33) | public boolean hasDataForSchemaEvolution() {
method SchemaEvolutionTargetItems (line 37) | public SchemaEvolutionTargetItems(String tableName, Set<String> column...
method getTableName (line 41) | public String getTableName() {
method getColumnsToDropNonNullability (line 45) | @Nonnull
method getColumnsToAdd (line 50) | @Nonnull
method equals (line 55) | @Override
method hashCode (line 65) | @Override
method toString (line 70) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/SnowflakeColumnTypeMapper.java
class SnowflakeColumnTypeMapper (line 28) | public class SnowflakeColumnTypeMapper extends ColumnTypeMapper {
method mapToColumnType (line 32) | @Override
method mapJsonNodeTypeToKafkaType (line 77) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/SnowflakeSchemaEvolutionService.java
class SnowflakeSchemaEvolutionService (line 18) | public class SnowflakeSchemaEvolutionService {
method SnowflakeSchemaEvolutionService (line 26) | public SnowflakeSchemaEvolutionService(SnowflakeConnectionService conn) {
method SnowflakeSchemaEvolutionService (line 30) | SnowflakeSchemaEvolutionService(
method evolveSchemaIfNeeded (line 45) | public void evolveSchemaIfNeeded(
FILE: src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/TableSchema.java
class TableSchema (line 12) | public class TableSchema {
method TableSchema (line 15) | public TableSchema(Map<String, ColumnInfos> columnInfos) {
method getColumnInfos (line 19) | public Map<String, ColumnInfos> getColumnInfos() {
method equals (line 23) | @Override
method hashCode (line 31) | @Override
method toString (line 36) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/TableSchemaResolver.java
class TableSchemaResolver (line 29) | public class TableSchemaResolver {
method TableSchemaResolver (line 36) | public TableSchemaResolver(ColumnTypeMapper columnTypeMapper) {
method TableSchemaResolver (line 40) | public TableSchemaResolver() {
method resolveTableSchemaFromSnowflakeRecord (line 53) | public TableSchema resolveTableSchemaFromSnowflakeRecord(
method hasSchema (line 68) | private boolean hasSchema(SnowflakeSinkRecord record) {
method getTableSchemaFromRecordSchema (line 76) | private TableSchema getTableSchemaFromRecordSchema(
method getTableSchemaFromJson (line 110) | private TableSchema getTableSchemaFromJson(
method getFullSchemaMapFromRecord (line 134) | private Map<String, ColumnInfos> getFullSchemaMapFromRecord(SnowflakeS...
method inferDataTypeFromJsonObject (line 157) | private String inferDataTypeFromJsonObject(JsonNode value) {
class ColumnValuePair (line 169) | private static class ColumnValuePair {
method from (line 173) | public static ColumnValuePair from(Map.Entry<String, JsonNode> field) {
method ColumnValuePair (line 177) | private ColumnValuePair(String columnName, JsonNode jsonNode) {
method getColumnName (line 182) | public String getColumnName() {
method getJsonNode (line 186) | public JsonNode getJsonNode() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/ValidationResultMapper.java
class ValidationResultMapper (line 18) | public class ValidationResultMapper {
method mapToSchemaEvolutionItems (line 27) | public static SchemaEvolutionTargetItems mapToSchemaEvolutionItems(
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/DefaultStreamingConfigValidator.java
class DefaultStreamingConfigValidator (line 18) | public class DefaultStreamingConfigValidator implements StreamingConfigV...
method validate (line 23) | @Override
method validateRole (line 57) | private static Optional<Map.Entry<String, String>> validateRole(Map<St...
method ensureValidLong (line 69) | private static void ensureValidLong(
method validateSchematizationConfig (line 87) | private static Map<String, String> validateSchematizationConfig(Map<St...
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/IngestionMethodConfig.java
type IngestionMethodConfig (line 10) | public enum IngestionMethodConfig {
method toString (line 15) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/LatestCommitedOffsetTokenExecutor.java
class LatestCommitedOffsetTokenExecutor (line 16) | public class LatestCommitedOffsetTokenExecutor {
method getExecutor (line 24) | public static FailsafeExecutor<Long> getExecutor(
method createRetryPolicy (line 43) | private static RetryPolicy<Long> createRetryPolicy(
method createFallback (line 59) | private static Fallback<Long> createFallback(
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/OpenChannelRetryPolicy.java
class OpenChannelRetryPolicy (line 18) | class OpenChannelRetryPolicy {
method executeWithRetry (line 47) | static SnowflakeStreamingIngestChannel executeWithRetry(
method isRetryableError (line 68) | private static boolean isRetryableError(Throwable e) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2.java
class SnowflakeSinkServiceV2 (line 56) | public class SnowflakeSinkServiceV2 implements SnowflakeSinkService {
method SnowflakeSinkServiceV2 (line 81) | public SnowflakeSinkServiceV2(
method SnowflakeSinkServiceV2 (line 112) | SnowflakeSinkServiceV2(
method logValidationConfiguration (line 157) | private void logValidationConfiguration() {
method startPartition (line 251) | @Override
method startPartitions (line 262) | @Override
method createTableIfNotExists (line 296) | private void createTableIfNotExists(final String tableName) {
method currentlyInitializing (line 305) | private Set<TopicPartition> currentlyInitializing(Collection<TopicPart...
method insert (line 322) | @Override
method insert (line 404) | @Override
method shouldSkipNullValue (line 431) | private boolean shouldSkipNullValue(SinkRecord record) {
method getOffset (line 446) | @Override
method getCommittedOffsets (line 452) | @Override
method getPartitionCount (line 475) | @Override
method closeAll (line 480) | @Override
method close (line 497) | @Override
method stop (line 502) | @Override
method isClosed (line 521) | @Override
method getPartitionChannels (line 526) | @Override
method getMetricRegistry (line 531) | @Override
method awaitInitialization (line 540) | @Override
method getChannelManager (line 545) | @VisibleForTesting
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProperties.java
class StreamingClientProperties (line 40) | public class StreamingClientProperties {
method StreamingClientProperties (line 50) | private StreamingClientProperties(
method from (line 60) | public static StreamingClientProperties from(SinkTaskConfig config) {
method equals (line 104) | @Override
method hashCode (line 117) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingConfigValidator.java
type StreamingConfigValidator (line 8) | public interface StreamingConfigValidator {
method validate (line 14) | ImmutableMap<String, String> validate(final Map<String, String> inputC...
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingErrorHandler.java
class StreamingErrorHandler (line 15) | public class StreamingErrorHandler {
method StreamingErrorHandler (line 25) | public StreamingErrorHandler(
method isLogErrors (line 36) | public boolean isLogErrors() {
method handleError (line 40) | public void handleError(Exception error, SinkRecord originalRecordForR...
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelInsertionException.java
class TopicPartitionChannelInsertionException (line 15) | public class TopicPartitionChannelInsertionException extends RuntimeExce...
method TopicPartitionChannelInsertionException (line 16) | public TopicPartitionChannelInsertionException(String msg, Throwable t) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/channel/TopicPartitionChannel.java
type TopicPartitionChannel (line 10) | public interface TopicPartitionChannel {
method insertRecord (line 29) | boolean insertRecord(SinkRecord kafkaSinkRecord, boolean isFirstRowPer...
method closeChannelAsync (line 35) | CompletableFuture<Void> closeChannelAsync();
method isInitializing (line 38) | default boolean isInitializing() {
method awaitInitialization (line 43) | default void awaitInitialization() {}
method isChannelClosed (line 46) | boolean isChannelClosed();
method getChannelNameFormatV1 (line 49) | String getChannelNameFormatV1();
method getChannelName (line 52) | String getChannelName();
method setLatestConsumerGroupOffset (line 54) | void setLatestConsumerGroupOffset(long consumerOffset);
method processChannelStatus (line 71) | long processChannelStatus(ChannelStatus status, boolean tolerateErrors);
method getPipeName (line 74) | String getPipeName();
method waitForLastProcessedRecordCommitted (line 76) | default CompletableFuture<Void> waitForLastProcessedRecordCommitted() {
method getSnowflakeTelemetryChannelStatus (line 80) | @VisibleForTesting
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/telemetry/PeriodicTelemetryReporter.java
class PeriodicTelemetryReporter (line 19) | public final class PeriodicTelemetryReporter {
method PeriodicTelemetryReporter (line 34) | public PeriodicTelemetryReporter(
method PeriodicTelemetryReporter (line 46) | @VisibleForTesting
method createExecutor (line 61) | private ScheduledExecutorService createExecutor() {
method start (line 72) | public void start() {
method stop (line 88) | public void stop() {
method reportChannelStatusTelemetry (line 109) | private void reportChannelStatusTelemetry() {
method reportChannelTelemetry (line 131) | private void reportChannelTelemetry(String channelKey, TopicPartitionC...
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/telemetry/SnowflakeTelemetryChannelCreation.java
class SnowflakeTelemetryChannelCreation (line 32) | public class SnowflakeTelemetryChannelCreation extends SnowflakeTelemetr...
method SnowflakeTelemetryChannelCreation (line 37) | public SnowflakeTelemetryChannelCreation(
method dumpTo (line 44) | @Override
method isEmpty (line 52) | @Override
method setReuseTable (line 58) | public void setReuseTable(boolean reuseTable) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/telemetry/SnowflakeTelemetryChannelStatus.java
class SnowflakeTelemetryChannelStatus (line 42) | public class SnowflakeTelemetryChannelStatus extends SnowflakeTelemetryB...
method SnowflakeTelemetryChannelStatus (line 103) | public SnowflakeTelemetryChannelStatus(
method isEmpty (line 126) | @Override
method dumpTo (line 134) | @Override
method registerChannelJMXMetrics (line 171) | private void registerChannelJMXMetrics(MetricsJmxReporter reporter) {
method tryUnregisterChannelJMXMetrics (line 217) | public void tryUnregisterChannelJMXMetrics() {
method incRecoveryCount (line 229) | public void incRecoveryCount() {
method incValidationFailureCount (line 234) | public void incValidationFailureCount() {
method incErrorToleratedCount (line 239) | public void incErrorToleratedCount() {
method setValidationDisabled (line 244) | public void setValidationDisabled() {
method incBackpressureRetryCount (line 249) | public void incBackpressureRetryCount() {
method incAppendRowFallbackCount (line 254) | public void incAppendRowFallbackCount() {
method incSchemaEvolutionFailureCount (line 259) | public void incSchemaEvolutionFailureCount() {
method updateFromChannelStatus (line 264) | public void updateFromChannelStatus(ChannelStatus status) {
method putIfNotNull (line 281) | private static void putIfNotNull(ObjectNode msg, String key, String va...
method getOffsetPersistedInSnowflake (line 287) | @VisibleForTesting
method getProcessedOffset (line 292) | @VisibleForTesting
method getLatestConsumerOffset (line 297) | @VisibleForTesting
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/telemetry/SnowflakeTelemetrySsv1Migration.java
class SnowflakeTelemetrySsv1Migration (line 21) | public class SnowflakeTelemetrySsv1Migration extends SnowflakeTelemetryB...
method SnowflakeTelemetrySsv1Migration (line 27) | public SnowflakeTelemetrySsv1Migration(
method dumpTo (line 40) | @Override
method deriveOutcome (line 53) | private String deriveOutcome() {
method isEmpty (line 63) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/AppendRowWithFallbackPolicy.java
class AppendRowWithFallbackPolicy (line 19) | class AppendRowWithFallbackPolicy {
method withDelay (line 35) | private static void withDelay(CheckedRunnable action, String channelNa...
method executeWithFallback (line 75) | static boolean executeWithFallback(
type FallbackSupplierWithException (line 133) | @FunctionalInterface
method execute (line 141) | void execute(Throwable exception) throws Exception;
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/BackpressureException.java
class BackpressureException (line 25) | public class BackpressureException extends RuntimeException {
method BackpressureException (line 41) | public BackpressureException(SFException cause) {
method isRetryableError (line 58) | public static boolean isRetryableError(Throwable e) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/ClientRecreationException.java
class ClientRecreationException (line 24) | public class ClientRecreationException extends RuntimeException {
method ClientRecreationException (line 40) | public ClientRecreationException(SFException cause) {
method wrap (line 58) | public static ClientRecreationException wrap(Throwable e) {
method isClientInvalidError (line 74) | public static boolean isClientInvalidError(Throwable e) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/ClientRecreator.java
type ClientRecreator (line 12) | @FunctionalInterface
method recreate (line 22) | SnowflakeStreamingIngestClient recreate(SnowflakeStreamingIngestClient...
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/PipeNameProvider.java
class PipeNameProvider (line 6) | public final class PipeNameProvider {
method buildDefaultPipeName (line 7) | public static String buildDefaultPipeName(String table) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/SnowpipeStreamingPartitionChannel.java
class SnowpipeStreamingPartitionChannel (line 55) | public class SnowpipeStreamingPartitionChannel implements TopicPartition...
method SnowpipeStreamingPartitionChannel (line 111) | public SnowpipeStreamingPartitionChannel(
method insertRecord (line 166) | @Override
method transformAndSend (line 174) | private boolean transformAndSend(SinkRecord kafkaSinkRecord) {
method waitForLastProcessedRecordCommitted (line 235) | @Override
method insertRowWithFallback (line 275) | private boolean insertRowWithFallback(Map<String, Object> row, long of...
method closeChannelWithoutFlushing (line 307) | private static void closeChannelWithoutFlushing(SnowflakeStreamingInge...
method reopenChannel (line 330) | private void reopenChannel(final String reason) {
method parseOrMigrateOffsetToken (line 393) | private long parseOrMigrateOffsetToken(OpenChannelResult openChannelRe...
method parseOffsetToken (line 466) | @VisibleForTesting
method fetchLatestCommittedOffsetFromSnowflake (line 492) | private long fetchLatestCommittedOffsetFromSnowflake() {
method fetchLatestOffsetFromChannel (line 496) | private static long fetchLatestOffsetFromChannel(SnowflakeStreamingIng...
method initializeValidation (line 503) | private void initializeValidation() {
method refreshTableSchema (line 551) | private void refreshTableSchema() {
method handleValidationError (line 555) | private void handleValidationError(
method handleStructuralError (line 576) | private void handleStructuralError(
method openChannelForTable (line 654) | private OpenChannelResult openChannelForTable(final String channelName) {
method closeChannelAsync (line 686) | @Override
method tryRecoverFromCloseChannelError (line 723) | private void tryRecoverFromCloseChannelError(RuntimeException e) {
method isInitializing (line 746) | @Override
method awaitInitialization (line 751) | @Override
method isChannelClosed (line 756) | @Override
method getChannelNameFormatV1 (line 768) | @Override
method getChannelName (line 773) | @Override
method getChannel (line 786) | @VisibleForTesting
method getSnowflakeTelemetryChannelStatus (line 798) | @Override
method setLatestConsumerGroupOffset (line 804) | @Override
method processChannelStatus (line 809) | @Override
method getPipeName (line 829) | @Override
method logChannelStatus (line 834) | private void logChannelStatus(final ChannelStatus status) {
method handleChannelErrors (line 860) | private void handleChannelErrors(final ChannelStatus status, final boo...
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/WaitForLastOffsetCommittedPolicy.java
class WaitForLastOffsetCommittedPolicy (line 13) | class WaitForLastOffsetCommittedPolicy {
method getPolicy (line 18) | static void getPolicy(CheckedSupplier<Object> action) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/channel/PartitionOffsetTracker.java
class PartitionOffsetTracker (line 28) | public class PartitionOffsetTracker {
method PartitionOffsetTracker (line 57) | public PartitionOffsetTracker(
method initializeFromSnowflake (line 65) | public void initializeFromSnowflake(long committedOffset) {
method shouldProcess (line 81) | public boolean shouldProcess(long kafkaOffset, boolean isFirstRowInBat...
method recordProcessed (line 119) | public void recordProcessed(long kafkaOffset) {
method recordAppended (line 125) | public void recordAppended(long kafkaOffset) {
method resetAfterRecovery (line 141) | public void resetAfterRecovery(long offsetRecoveredFromSnowflake) {
method setLatestConsumerGroupOffset (line 164) | public void setLatestConsumerGroupOffset(long consumerOffset) {
method updatePersistedOffset (line 183) | public void updatePersistedOffset(long offset) {
method getPersistedOffset (line 187) | public long getPersistedOffset() {
method getProcessedOffset (line 191) | public long getProcessedOffset() {
method getLastAppendRowsOffset (line 195) | public long getLastAppendRowsOffset() {
method persistedOffsetRef (line 200) | public AtomicLong persistedOffsetRef() {
method processedOffsetRef (line 204) | public AtomicLong processedOffsetRef() {
method consumerGroupOffsetRef (line 208) | public AtomicLong consumerGroupOffsetRef() {
method resetKafkaOffset (line 212) | private void resetKafkaOffset(long committedOffset) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientFactory.java
class StreamingClientFactory (line 10) | public class StreamingClientFactory {
method setStreamingClientSupplier (line 19) | public static void setStreamingClientSupplier(final StreamingClientSup...
method resetStreamingClientSupplier (line 24) | public static void resetStreamingClientSupplier() {
method createClient (line 28) | static SnowflakeStreamingIngestClient createClient(
method clientName (line 41) | private static String clientName(final StreamingClientProperties strea...
class StreamingClientSupplierImpl (line 45) | static final class StreamingClientSupplierImpl implements StreamingCli...
method get (line 46) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientPool.java
class StreamingClientPool (line 31) | public class StreamingClientPool {
class RefCountedClient (line 44) | static class RefCountedClient {
method RefCountedClient (line 48) | RefCountedClient(
method addTask (line 68) | void addTask(String taskId) {
method hasTask (line 72) | boolean hasTask(String taskId) {
method removeTask (line 77) | boolean removeTask(String taskId) {
method taskCount (line 81) | int taskCount() {
method copyTasksFrom (line 86) | void copyTasksFrom(RefCountedClient other) {
method close (line 90) | void close(String pipeName, String connectorName) {
method StreamingClientPool (line 99) | StreamingClientPool(final String connectorName) {
method getClientAsync (line 110) | CompletableFuture<SnowflakeStreamingIngestClient> getClientAsync(
method getClientCountForTask (line 151) | long getClientCountForTask(final String taskId) {
method closeTaskClients (line 155) | void closeTaskClients(final String taskId) {
method recreateClient (line 188) | SnowflakeStreamingIngestClient recreateClient(
method createReplacement (line 284) | private RefCountedClient createReplacement(
method joinAndEvictOnFailure (line 305) | private SnowflakeStreamingIngestClient joinAndEvictOnFailure(
method isEmpty (line 319) | boolean isEmpty() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientPools.java
class StreamingClientPools (line 29) | public class StreamingClientPools {
method StreamingClientPools (line 35) | private StreamingClientPools() {}
method getClient (line 52) | public static SnowflakeStreamingIngestClient getClient(
method getClientAsync (line 77) | public static CompletableFuture<SnowflakeStreamingIngestClient> getCli...
method getPool (line 99) | private static StreamingClientPool getPool(final String connectorName) {
method getClientCountForTask (line 103) | public static long getClientCountForTask(final String connectorName, f...
method recreateClient (line 127) | public static SnowflakeStreamingIngestClient recreateClient(
method recreateClientRetryPolicy (line 185) | private static RetryPolicy<SnowflakeStreamingIngestClient> recreateCli...
method closeTaskClients (line 220) | public static void closeTaskClients(final String connectorName, final ...
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientSupplier.java
type StreamingClientSupplier (line 6) | public interface StreamingClientSupplier {
method get (line 7) | SnowflakeStreamingIngestClient get(
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/migration/Ssv1MigrationMode.java
type Ssv1MigrationMode (line 14) | public enum Ssv1MigrationMode {
method fromConfig (line 36) | public static Ssv1MigrationMode fromConfig(String value) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/migration/Ssv1MigrationResponse.java
class Ssv1MigrationResponse (line 18) | @JsonIgnoreProperties(ignoreUnknown = true)
method channelNotFound (line 29) | @VisibleForTesting
method channelFoundNoOffset (line 37) | @VisibleForTesting
method migrated (line 45) | @VisibleForTesting
method isSsv1ChannelFound (line 53) | public boolean isSsv1ChannelFound() {
method getMigratedOffset (line 57) | @Nullable
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/service/BatchOffsetFetcher.java
class BatchOffsetFetcher (line 35) | public class BatchOffsetFetcher {
method BatchOffsetFetcher (line 47) | public BatchOffsetFetcher(
method getCommittedOffsets (line 71) | public Map<TopicPartition, Long> getCommittedOffsets(
method fetchOffsetsAsync (line 102) | private CompletableFuture<Void> fetchOffsetsAsync(
method getCommittedOffsetsForPipe (line 125) | private Map<TopicPartition, Long> getCommittedOffsetsForPipe(
class PartitionsByTopic (line 163) | public static class PartitionsByTopic {
method PartitionsByTopic (line 170) | PartitionsByTopic(
method groupByTopic (line 177) | public static PartitionsByTopic groupByTopic(
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/service/PartitionChannelManager.java
class PartitionChannelManager (line 36) | public class PartitionChannelManager {
type PartitionChannelBuilder (line 44) | @FunctionalInterface
method build (line 46) | TopicPartitionChannel build(
method PartitionChannelManager (line 64) | public PartitionChannelManager(
method PartitionChannelManager (line 83) | @VisibleForTesting
method makeChannelName (line 98) | @VisibleForTesting
method getChannelName (line 105) | private String getChannelName(TopicPartition topicPartition) {
method getTableName (line 110) | private String getTableName(TopicPartition topicPartition) {
method startPartitions (line 122) | public void startPartitions(
method buildChannel (line 152) | private TopicPartitionChannel buildChannel(
method warmUpStreamingClients (line 230) | private void warmUpStreamingClients(Map<String, String> tableToPipeMap...
method waitForAllChannelsToCommitData (line 261) | public void waitForAllChannelsToCommitData() {
method closeAll (line 279) | public void closeAll() {
method close (line 312) | public void close(Collection<TopicPartition> partitions) {
method getChannel (line 340) | public Optional<TopicPartitionChannel> getChannel(String channelName) {
method getChannel (line 345) | public Optional<TopicPartitionChannel> getChannel(TopicPartition topic...
method getPartitionChannels (line 352) | public Map<String, TopicPartitionChannel> getPartitionChannels() {
method awaitAllPartitions (line 357) | @VisibleForTesting
FILE: src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/service/ThreadPools.java
class ThreadPools (line 28) | public class ThreadPools {
method ThreadPools (line 33) | private ThreadPools() {}
class ConnectorThreadPool (line 36) | private static class ConnectorThreadPool {
method ConnectorThreadPool (line 41) | ConnectorThreadPool(String connectorName, int openChannelIoThreads) {
method getIoExecutor (line 59) | public static ExecutorService getIoExecutor(final String connectorName) {
method getOpenChannelIoExecutor (line 71) | public static ExecutorService getOpenChannelIoExecutor(final String co...
method registerTask (line 84) | public static void registerTask(final String connectorName, final Sink...
method closeForTask (line 100) | public static void closeForTask(final String connectorName) {
class DaemonThreadFactory (line 119) | private static final class DaemonThreadFactory implements ThreadFactory {
method DaemonThreadFactory (line 124) | DaemonThreadFactory(String prefix) {
method newThread (line 129) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryBasicInfo.java
class SnowflakeTelemetryBasicInfo (line 9) | public abstract class SnowflakeTelemetryBasicInfo {
method SnowflakeTelemetryBasicInfo (line 20) | public SnowflakeTelemetryBasicInfo(
method dumpTo (line 34) | public abstract void dumpTo(ObjectNode msg);
method isEmpty (line 41) | public abstract boolean isEmpty();
FILE: src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryService.java
class SnowflakeTelemetryService (line 18) | public class SnowflakeTelemetryService {
method SnowflakeTelemetryService (line 51) | public SnowflakeTelemetryService(Connection conn) {
method SnowflakeTelemetryService (line 55) | public SnowflakeTelemetryService(Telemetry telemetry) {
method setAppName (line 59) | public void setAppName(String name) {
method setTaskID (line 63) | public void setTaskID(String taskID) {
method reportKafkaConnectStart (line 67) | public void reportKafkaConnectStart(
method reportKafkaConnectStop (line 83) | public void reportKafkaConnectStop(final long startTime) {
method reportKafkaConnectFatalError (line 92) | public void reportKafkaConnectFatalError(final String errorDetail) {
method reportKafkaConnectFatalError (line 101) | public void reportKafkaConnectFatalError(
method reportKafkaPartitionUsage (line 129) | public void reportKafkaPartitionUsage(
method reportKafkaPartitionStart (line 144) | public void reportKafkaPartitionStart(final SnowflakeTelemetryBasicInf...
method reportSsv1Migration (line 153) | public void reportSsv1Migration(final SnowflakeTelemetryBasicInfo migr...
method getObjectNode (line 174) | ObjectNode getObjectNode() {
method send (line 201) | private void send(TelemetryType type, JsonNode data) {
method getAppName (line 216) | private String getAppName() {
method getTaskID (line 224) | private String getTaskID() {
method addUserConnectorPropertiesToDataNode (line 248) | private void addUserConnectorPropertiesToDataNode(
type TelemetryType (line 258) | public enum TelemetryType {
method TelemetryType (line 268) | TelemetryType(String name) {
method toString (line 272) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryServiceFactory.java
class SnowflakeTelemetryServiceFactory (line 9) | public final class SnowflakeTelemetryServiceFactory {
method SnowflakeTelemetryServiceFactory (line 11) | private SnowflakeTelemetryServiceFactory() {}
method builder (line 13) | public static SnowflakeTelemetryServiceBuilder builder(Connection conn) {
class SnowflakeTelemetryServiceBuilder (line 18) | public static final class SnowflakeTelemetryServiceBuilder {
method SnowflakeTelemetryServiceBuilder (line 24) | SnowflakeTelemetryServiceBuilder(Connection conn) {
method setAppName (line 32) | public SnowflakeTelemetryServiceBuilder setAppName(String name) {
method setTaskID (line 41) | public SnowflakeTelemetryServiceBuilder setTaskID(String taskID) {
method build (line 46) | public SnowflakeTelemetryService build() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/telemetry/TelemetryConstants.java
class TelemetryConstants (line 7) | public final class TelemetryConstants {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/BinaryStringUtils.java
class BinaryStringUtils (line 14) | public class BinaryStringUtils {
method unicodeCharactersCount (line 16) | public static int unicodeCharactersCount(String s) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/ByteArraySerializer.java
class ByteArraySerializer (line 22) | public class ByteArraySerializer extends JsonSerializer<byte[]> {
method serialize (line 23) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/ColumnLogicalType.java
type ColumnLogicalType (line 15) | public enum ColumnLogicalType {
method ColumnLogicalType (line 48) | ColumnLogicalType() {
method ColumnLogicalType (line 53) | ColumnLogicalType(int ordinal) {
method ColumnLogicalType (line 57) | ColumnLogicalType(int ordinal, boolean object) {
method getOrdinal (line 67) | public int getOrdinal() {
method isObject (line 72) | public boolean isObject() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/ColumnPhysicalType.java
type ColumnPhysicalType (line 15) | public enum ColumnPhysicalType {
method ColumnPhysicalType (line 33) | ColumnPhysicalType() {
method ColumnPhysicalType (line 38) | ColumnPhysicalType(int ordinal) {
method getOrdinal (line 47) | public int getOrdinal() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/ColumnSchema.java
class ColumnSchema (line 16) | public class ColumnSchema {
method ColumnSchema (line 40) | public ColumnSchema(
method ColumnSchema (line 66) | public ColumnSchema(
method fromDescribeTableRow (line 104) | public static ColumnSchema fromDescribeTableRow(ResultSet rs) throws S...
method fromDescribeTableFields (line 135) | public static ColumnSchema fromDescribeTableFields(String name, String...
method fromDescribeTableFields (line 154) | public static ColumnSchema fromDescribeTableFields(
class TypeInfo (line 173) | private static class TypeInfo {
method parseTypeString (line 183) | private static TypeInfo parseTypeString(String typeStr) {
method getName (line 424) | public String getName() {
method getLogicalType (line 428) | public ColumnLogicalType getLogicalType() {
method getPhysicalType (line 432) | public ColumnPhysicalType getPhysicalType() {
method isNullable (line 436) | public boolean isNullable() {
method getPrecision (line 440) | public Integer getPrecision() {
method getScale (line 444) | public Integer getScale() {
method getLength (line 448) | public Integer getLength() {
method getByteLength (line 452) | public Integer getByteLength() {
method getCollation (line 456) | public String getCollation() {
method hasDefault (line 460) | public boolean hasDefault() {
method isAutoincrement (line 464) | public boolean isAutoincrement() {
method isServerFilled (line 469) | public boolean isServerFilled() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/DataValidationUtil.java
class DataValidationUtil (line 54) | class DataValidationUtil {
method makePower10Table (line 111) | private static BigDecimal[] makePower10Table() {
method validateAndParseSemiStructuredAsJsonTree (line 126) | private static JsonNode validateAndParseSemiStructuredAsJsonTree(
method validateAndParseSemiStructured (line 163) | private static String validateAndParseSemiStructured(
method validateAndParseVariant (line 254) | static String validateAndParseVariant(String columnName, Object input,...
method validateAndParseVariantAsObject (line 285) | static Object validateAndParseVariantAsObject(
method validateAndParseVariantNew (line 320) | static String validateAndParseVariantNew(String columnName, Object inp...
method isAllowedSemiStructuredType (line 365) | static boolean isAllowedSemiStructuredType(Object o) {
method validateAndParseArray (line 451) | static String validateAndParseArray(String columnName, Object input, l...
method validateAndParseArrayAsList (line 483) | @SuppressWarnings("unchecked")
method validateAndParseArrayNew (line 520) | static String validateAndParseArrayNew(String columnName, Object input...
method validateAndParseObject (line 555) | static String validateAndParseObject(String columnName, Object input, ...
method validateAndParseObjectNew (line 585) | static String validateAndParseObjectNew(String columnName, Object inpu...
method inputToOffsetDateTime (line 608) | private static OffsetDateTime inputToOffsetDateTime(
method catchParsingError (line 697) | private static <T> T catchParsingError(Supplier<T> op) {
method validateAndParseTimestamp (line 728) | static TimestampWrapper validateAndParseTimestamp(
method validateAndFormatTimestamp (line 779) | static String validateAndFormatTimestamp(
method validateAndParseString (line 823) | static String validateAndParseString(
method validateAndParseBigDecimal (line 880) | static BigDecimal validateAndParseBigDecimal(
method validateAndParseDate (line 931) | static int validateAndParseDate(String columnName, Object input, long ...
method validateAndParseBinary (line 961) | static byte[] validateAndParseBinary(
method validateAndParseTime (line 1009) | static BigInteger validateAndParseTime(
method parseInstantGuessScale (line 1074) | private static Instant parseInstantGuessScale(String input) {
method validateAndParseReal (line 1109) | static double validateAndParseReal(String columnName, Object input, lo...
method validateAndParseBoolean (line 1137) | static int validateAndParseBoolean(String columnName, Object input, lo...
method checkValueInRange (line 1154) | static void checkValueInRange(
method checkFixedLengthByteArray (line 1174) | static void checkFixedLengthByteArray(
method convertStringToBoolean (line 1188) | private static boolean convertStringToBoolean(
method typeNotAllowedException (line 1215) | private static SFExceptionValidation typeNotAllowedException(
method valueFormatNotAllowedException (line 1243) | static SFExceptionValidation valueFormatNotAllowedException(
method verifyValidUtf8 (line 1256) | private static void verifyValidUtf8(
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/DuplicateDetector.java
class DuplicateDetector (line 20) | public class DuplicateDetector<T> {
method isDuplicate (line 25) | public boolean isDuplicate(T key) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/DuplicateKeyValidatedObject.java
class DuplicateKeyValidatedObject (line 17) | public class DuplicateKeyValidatedObject {
method DuplicateKeyValidatedObject (line 20) | public DuplicateKeyValidatedObject(Object object) {
method getObject (line 24) | public Object getObject() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/DuplicateKeyValidatingSerializer.java
class DuplicateKeyValidatingSerializer (line 26) | public class DuplicateKeyValidatingSerializer extends JsonSerializer<Dup...
method serialize (line 27) | @Override
method sanitizeAndWrite (line 34) | private void sanitizeAndWrite(Object object, JsonGenerator gen, Serial...
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/ErrorCode.java
type ErrorCode (line 15) | public enum ErrorCode {
method ErrorCode (line 34) | ErrorCode(String messageCode) {
method getMessageCode (line 38) | public String getMessageCode() {
method toString (line 42) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/Power10Util.java
class Power10Util (line 10) | public final class Power10Util {
method Power10Util (line 12) | private Power10Util() {}
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/RowValidator.java
class RowValidator (line 33) | public class RowValidator {
method RowValidator (line 49) | public RowValidator(Map<String, ColumnSchema> columnSchemaMap) {
method validateRow (line 70) | public ValidationResult validateRow(Map<String, Object> row) {
method validateAndNormalizeColumnValue (line 140) | private Object validateAndNormalizeColumnValue(ColumnSchema col, Objec...
method validateAndNormalizeTimestamp (line 263) | private Object validateAndNormalizeTimestamp(
method detectExtraColumns (line 281) | private Set<String> detectExtraColumns(Set<String> unquotedRowCols) {
method detectMissingNotNullColumns (line 292) | private Set<String> detectMissingNotNullColumns(Set<String> unquotedRo...
method detectNullValuesInNotNullColumns (line 306) | private Set<String> detectNullValuesInNotNullColumns(Map<String, Objec...
method validateSchema (line 334) | public static void validateSchema(Map<String, ColumnSchema> schema) th...
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/SFExceptionValidation.java
class SFExceptionValidation (line 20) | public class SFExceptionValidation extends RuntimeException {
method getErrorMessage (line 29) | private static String getErrorMessage(final ErrorCode errorCode, final...
method SFExceptionValidation (line 41) | public SFExceptionValidation(Throwable cause, ErrorCode errorCode, Obj...
method SFExceptionValidation (line 55) | public SFExceptionValidation(ErrorCode errorCode, Object... params) {
method getVendorCode (line 59) | public String getVendorCode() {
method getParams (line 63) | public Object[] getParams() {
method getCause (line 67) | public Throwable getCause() {
method isErrorCode (line 77) | public boolean isErrorCode(ErrorCode errorCode) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/SqlIdentifierNormalizer.java
class SqlIdentifierNormalizer (line 32) | public class SqlIdentifierNormalizer {
method normalizeSqlIdentifier (line 54) | public static String normalizeSqlIdentifier(String sqlIdentifier) {
method normalizeSqlIdentifierInternal (line 67) | private static String normalizeSqlIdentifierInternal(String sqlIdentif...
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/TimestampWrapper.java
class TimestampWrapper (line 22) | public class TimestampWrapper {
method TimestampWrapper (line 49) | public TimestampWrapper(OffsetDateTime offsetDateTime, int scale) {
method toBinary (line 67) | public BigInteger toBinary(boolean includeTimezone) {
method getEpochSecond (line 84) | public long getEpochSecond() {
method getFraction (line 89) | public int getFraction() {
method getTimezoneOffsetSeconds (line 94) | public int getTimezoneOffsetSeconds() {
method getTimeZoneIndex (line 102) | public int getTimeZoneIndex() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/Utils.java
class Utils (line 15) | class Utils {
method stripTrailingNulls (line 22) | public static String stripTrailingNulls(String key) {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/ValidationResult.java
class ValidationResult (line 14) | public class ValidationResult {
method ValidationResult (line 24) | private ValidationResult(
method valid (line 47) | public static ValidationResult valid() {
method typeError (line 60) | public static ValidationResult typeError(String columnName, String err...
method structuralError (line 73) | public static ValidationResult structuralError(
method isValid (line 88) | public boolean isValid() {
method hasTypeError (line 92) | public boolean hasTypeError() {
method hasStructuralError (line 96) | public boolean hasStructuralError() {
method getValueError (line 100) | public String getValueError() {
method getColumnName (line 104) | public String getColumnName() {
method getExtraColNames (line 108) | public Set<String> getExtraColNames() {
method getMissingNotNullColNames (line 112) | public Set<String> getMissingNotNullColNames() {
method getNullValueForNotNullColNames (line 116) | public Set<String> getNullValueForNotNullColNames() {
method needsSchemaEvolution (line 133) | public boolean needsSchemaEvolution() {
method hasUnresolvableError (line 148) | public boolean hasUnresolvableError() {
method getErrorType (line 153) | public String getErrorType() {
FILE: src/main/java/com/snowflake/kafka/connector/internal/validation/ZonedDateTimeSerializer.java
class ZonedDateTimeSerializer (line 20) | public class ZonedDateTimeSerializer extends JsonSerializer<ZonedDateTim...
method serialize (line 21) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/records/KafkaRecordConverter.java
class KafkaRecordConverter (line 29) | public final class KafkaRecordConverter {
method KafkaRecordConverter (line 44) | private KafkaRecordConverter() {}
method convertToMap (line 50) | public static Map<String, Object> convertToMap(Schema schema, Object v...
method convertHeaders (line 75) | public static Map<String, String> convertHeaders(Headers headers) {
method convertKey (line 88) | public static Object convertKey(Schema keySchema, Object key) {
method convertStructToMap (line 102) | private static Map<String, Object> convertStructToMap(Struct struct) {
method convertMapToMap (line 119) | private static Map<String, Object> convertMapToMap(Map<?, ?> map, Sche...
method convertValue (line 140) | static Object convertValue(Schema schema, Object value) {
method validateValueType (line 200) | private static void validateValueType(Schema.Type schemaType, Object v...
method getSchemaType (line 249) | private static Schema.Type getSchemaType(Schema schema, Object value) {
method convertInt32 (line 281) | private static Object convertInt32(Schema schema, Object value) {
method convertInt64 (line 294) | private static Object convertInt64(Schema schema, Object value) {
method convertBytes (line 303) | private static Object convertBytes(Schema schema, Object value) {
method toByteArray (line 322) | private static byte[] toByteArray(Object value) {
method convertArray (line 342) | private static List<Object> convertArray(Schema schema, Object value) {
method convertMapValue (line 356) | private static Object convertMapValue(Schema schema, Object value) {
method shouldUseObjectMode (line 394) | private static boolean shouldUseObjectMode(Schema schema, Map<?, ?> ma...
method handleFloatSpecialValues (line 407) | private static Object handleFloatSpecialValues(Float value) {
method handleDoubleSpecialValues (line 417) | private static Object handleDoubleSpecialValues(Double value) {
FILE: src/main/java/com/snowflake/kafka/connector/records/SnowflakeMetadataConfig.java
class SnowflakeMetadataConfig (line 16) | public class SnowflakeMetadataConfig {
method SnowflakeMetadataConfig (line 24) | public SnowflakeMetadataConfig() {
method SnowflakeMetadataConfig (line 33) | public SnowflakeMetadataConfig(Map<String, String> config) {
method shouldIncludeAllMetadata (line 45) | public boolean shouldIncludeAllMetadata() {
method getMetadataProperty (line 49) | private static boolean getMetadataProperty(Map<String, String> config,...
method toString (line 57) | @Override
FILE: src/main/java/com/snowflake/kafka/connector/records/SnowflakeSinkRecord.java
class SnowflakeSinkRecord (line 22) | public final class SnowflakeSinkRecord {
type RecordState (line 38) | public enum RecordState {
method SnowflakeSinkRecord (line 44) | private SnowflakeSinkRecord(
method from (line 57) | public static SnowflakeSinkRecord from(
method from (line 70) | public static SnowflakeSinkRecord from(
method wrapValueAsRecordContent (line 120) | private static Map<String, Object> wrapValueAsRecordContent(Schema sch...
method createTombstoneRecord (line 152) | private static SnowflakeSinkRecord createTombstoneRecord(
method createBrokenRecord (line 159) | private static SnowflakeSinkRecord createBrokenRecord(
method buildMetadataSafe (line 169) | private static Map<String, Object> buildMetadataSafe(
method buildMetadata (line 196) | private static Map<String, Object> buildMetadata(
method buildMetadataBase (line 212) | private static Map<String, Object> buildMetadataBase(
method addKeyToMetadata (line 237) | private static void addKeyToMetadata(SinkRecord record, Map<String, Ob...
method getSchema (line 255) | public Schema getSchema() {
method normalizeSchemaFieldNames (line 259) | private static Schema normalizeSchemaFieldNames(Schema schema) {
method normalizeColumnNames (line 277) | private static Map<String, Object> normalizeColumnNames(Map<String, Ob...
method getContent (line 286) | public Map<String, Object> getContent() {
method getContentWithMetadata (line 290) | public Map<String, Object> getContentWithMetadata(boolean includeMetad...
method getMetadata (line 300) | public Map<String, Object> getMetadata() {
method getState (line 304) | public RecordState getState() {
method isValid (line 308) | public boolean isValid() {
method isTombstone (line 312) | public boolean isTombstone() {
method isBroken (line 316) | public boolean isBroken() {
method getBrokenReason (line 320) | public Exception getBrokenReason() {
FILE: src/main/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergDDLTypes.java
class IcebergDDLTypes (line 3) | public class IcebergDDLTypes {
FILE: src/test/java/com/snowflake/kafka/connector/CachingConfigValidatorTest.java
class CachingConfigValidatorTest (line 19) | class CachingConfigValidatorTest {
method validCacheExpirations (line 24) | private static Stream<Arguments> validCacheExpirations() {
method validCacheEnabledDisabled (line 28) | private static Stream<Arguments> validCacheEnabledDisabled() {
method test_valid_expirations (line 38) | @ParameterizedTest(name = "[{index}] {2}")
method test_valid_enabled_disabled (line 48) | @ParameterizedTest(name = "[{index}] {2}")
method invalidConfigurationProvider (line 58) | private static Stream<Arguments> invalidConfigurationProvider() {
method testInvalidCacheConfiguration (line 81) | @ParameterizedTest(name = "[{index}] {2}")
FILE: src/test/java/com/snowflake/kafka/connector/ConnectClusterBaseIT.java
class ConnectClusterBaseIT (line 22) | @TestInstance(TestInstance.Lifecycle.PER_CLASS)
method beforeAll (line 30) | @BeforeAll
method afterAll (line 46) | @AfterAll
method getOpenedFakeIngestClient (line 54) | protected FakeSnowflakeStreamingIngestClient getOpenedFakeIngestClient...
method waitForOpenedFakeIngestClient (line 67) | protected void waitForOpenedFakeIngestClient(String connectorName) {
method defaultProperties (line 71) | protected final Map<String, String> defaultProperties(String topicName...
method waitForConnectorRunning (line 89) | protected final void waitForConnectorRunning(String connectorName) {
method waitForConnectorDoesNotExist (line 100) | protected final void waitForConnectorDoesNotExist(String connectorName) {
method waitForConnectorStopped (line 110) | protected final void waitForConnectorStopped(String connectorName) {
method getFakeSnowflakeStreamingIngestClient (line 120) | private FakeSnowflakeStreamingIngestClient getFakeSnowflakeStreamingIn...
FILE: src/test/java/com/snowflake/kafka/connector/ConnectorConfigValidatorLogsTest.java
class ConnectorConfigValidatorLogsTest (line 19) | public class ConnectorConfigValidatorLogsTest {
method testRSAPasswordOutput (line 24) | @Test
method logFileContains (line 45) | private boolean logFileContains(String str) throws IOException {
FILE: src/test/java/com/snowflake/kafka/connector/ConnectorConfigValidatorTest.java
class ConnectorConfigValidatorTest (line 46) | public class ConnectorConfigValidatorTest {
method validConfigs (line 57) | public static Stream<Arguments> validConfigs() {
method shouldValidateCorrectConfig (line 63) | @ParameterizedTest(name = "Valid config: {0}")
method testConfig (line 70) | @Test
method testConfig_ConvertedInvalidAppName (line 76) | @Test
method shouldThrowExForEmptyProperty (line 88) | @ParameterizedTest
method testCorrectProxyHost (line 107) | @Test
method testEmptyPort (line 115) | @Test
method testEmptyHost (line 124) | @Test
method testNonProxyHosts (line 133) | @Test
method testIllegalTopicMap (line 168) | @Test
method testIllegalTableName (line 177) | @Test
method testDuplicatedTopic (line 186) | @Test
method testDuplicatedTableName (line 195) | @Test
method testNameMapCovered (line 202) | @Test
method testBehaviorOnNullValuesConfig_valid_value (line 210) | @Test
method testBehaviorOnNullValuesConfig_invalid_value (line 220) | @Test
method testJMX_valid_value (line 229) | @Test
method testJMX_invalid_value (line 239) | @Test
method testIngestionTypeConfig_valid_value_snowpipe (line 248) | @Test
method testIngestionTypeConfig_valid_value_snowpipe_streaming (line 256) | @Test
method testIngestionTypeConfig_invalid_snowpipe_streaming (line 264) | @Test
method testErrorTolerance_AllowedValues (line 275) | @Test
method testErrorTolerance_DisallowedValues (line 290) | @Test
method testErrorLog_AllowedValues (line 301) | @Test
method testErrorLog_DisallowedValues (line 316) | @Test
method testValidKeyAndValueConvertersForStreamingSnowpipe (line 327) | @Test
method testUnsupportedConverter (line 346) | @Test
method testStreamingProviderOverrideConfig_validWithSnowpipeStreaming (line 358) | @Test
method testInvalidEmptyConfig (line 368) | @Test
method testMultipleInvalidConfigs (line 384) | @Test
method shouldValidateSSv2Config (line 403) | @Test
method shouldThrowExceptionWhenRoleNotDefinedForSSv2 (line 411) | @Test
method shouldPassWhenCompatValidateEnabledAndAllCompatSettingsCorrect (line 423) | @Test
method shouldPassWhenCompatValidateEnabledAndSchematizationExplicitlyTrue (line 435) | @Test
method shouldFailWhenCompatValidateEnabledAndValidationModeWrong (line 448) | @Test
method shouldFailWhenCompatValidateEnabledAndSchematizationNotSet (line 463) | @Test
method shouldFailWhenCompatValidateEnabledAndColumnNormalizationWrong (line 478) | @Test
method shouldFailWhenCompatValidateEnabledAndTableSanitizationWrong (line 496) | @Test
method shouldFailWhenCompatValidateEnabledAndMultipleSettingsWrong (line 515) | @Test
method shouldPassWhenCompatValidateEnabledAndOffsetMigrationIsSkip (line 537) | @Test
method shouldFailWhenCompatValidateEnabledAndOffsetMigrationNotSet (line 550) | @Test
method shouldPassWhenCompatValidateEnabledAndOffsetMigrationStrict (line 565) | @Test
method shouldPassWhenCompatValidateEnabledAndOffsetMigrationBestEffort (line 578) | @Test
method shouldFailWhenCompatValidateEnabledAndIncludeConnectorNameNotSet (line 591) | @Test
method shouldPassWhenCompatValidateEnabledAndSkipWithoutIncludeConnectorName (line 608) | @Test
method shouldPassWhenCompatValidateEnabledAndIncludeConnectorNameTrue (line 623) | @Test
method shouldPassWhenCompatValidateDisabled (line 637) | @Test
method shouldPassWhenCompatValidateDefaultAndAllCompatSettingsCorrect (line 648) | @Test
method shouldFailWhenCompatValidateDefaultAndNoCompatSettings (line 659) | @Test
method testOAuthAuthenticator (line 680) | @Test
method testOAuthWithoutRefreshToken_clientCredentialsGrant (line 694) | @Test
method testOAuthWithTokenEndpoint (line 707) | @Test
method testInvalidAuthenticator (line 722) | @Test
method testOAuthEmptyClientId (line 733) | @Test
method testOAuthEmptyClientSecret (line 746) | @Test
method testOAuthDoesNotRequirePrivateKey (line 759) | @Test
method invalidConfigRunner (line 773) | private void invalidConfigRunner(List<String> paramsToRemove) {
FILE: src/test/java/com/snowflake/kafka/connector/ConnectorIT.java
class ConnectorIT (line 33) | public class ConnectorIT {
method assertPropHasError (line 52) | private static void assertPropHasError(
method toValidateMap (line 64) | private static Map<String, ConfigValue> toValidateMap(final Map<String...
method getEmptyConfig (line 70) | static Map<String, String> getEmptyConfig() {
method getCorrectConfig (line 75) | static Map<String, String> getCorrectConfig() {
method testValidateErrorConfigImproved (line 83) | @Test
method testValidateEmptyConfig (line 150) | @Test
method testValidateCorrectConfig (line 160) | @Test
method testValidateErrorURLFormatConfig (line 166) | @Test
method testValidateErrorURLAccountConfig (line 174) | @Test
method testValidateErrorUserConfig (line 183) | @Test
method testValidateErrorPasswordConfig (line 192) | @Test
method testValidateEmptyPasswordConfig (line 200) | @Test
method testValidateNullPasswordConfig (line 208) | @Test
method testValidateFilePasswordConfig (line 216) | @Test
method testValidateConfigProviderPasswordConfig (line 224) | @Test
method testValidateFilePassphraseConfig (line 232) | @Test
method testValidateConfigProviderPassphraseConfig (line 240) | @Test
method testValidateErrorPassphraseConfig (line 248) | @Test
method testValidateErrorDatabaseConfig (line 257) | @Test
method testValidateErrorSchemaConfig (line 265) | @Test
method testErrorProxyHostConfig (line 273) | @Test
method testErrorProxyPortConfig (line 281) | @Test
method testProxyHostPortConfig (line 289) | @Test
method testErrorProxyUsernameConfig (line 297) | @Test
method testErrorProxyPasswordConfig (line 308) | @Test
method testProxyUsernamePasswordConfig (line 319) | @Test
method testConnectorComprehensive (line 329) | @Test
method testConnectorComprehensiveNegative (line 343) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/InjectQueryRunnerExtension.java
class InjectQueryRunnerExtension (line 11) | public class InjectQueryRunnerExtension implements BeforeEachCallback, P...
method beforeEach (line 13) | @Override
method injectFields (line 19) | private void injectFields(final Object testInstance, Class<?> testClas...
method getEnclosingInstanceField (line 43) | private Field getEnclosingInstanceField(final Class<?> innerClass) {
method supportsParameter (line 58) | @Override
method resolveParameter (line 65) | @Override
method getQueryRunner (line 71) | private QueryRunner getQueryRunner() {
FILE: src/test/java/com/snowflake/kafka/connector/InjectSnowflakeDataSourceExtension.java
class InjectSnowflakeDataSourceExtension (line 12) | @Order(1)
method beforeEach (line 15) | @Override
method injectFields (line 21) | private void injectFields(final Object testInstance, Class<?> testClas...
method getEnclosingInstanceField (line 45) | private Field getEnclosingInstanceField(final Class<?> innerClass) {
method supportsParameter (line 60) | @Override
method resolveParameter (line 67) | @Override
FILE: src/test/java/com/snowflake/kafka/connector/LegacySchemaToggleIT.java
class LegacySchemaToggleIT (line 18) | @ExtendWith({InjectSnowflakeDataSourceExtension.class, InjectQueryRunner...
method before (line 30) | @BeforeEach
method after (line 39) | @AfterEach
method test_legacyMode_jsonConverter_wrapsInRecordContent (line 48) | @Test
method test_legacyMode_stringConverter_wrapsInRecordContent (line 80) | @Test
method test_legacyMode_defaultSchematization_doesNotWrap (line 107) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/SchemaEvolutionAvroSrIT.java
class SchemaEvolutionAvroSrIT (line 35) | class SchemaEvolutionAvroSrIT extends SchemaEvolutionBase {
method beforeEach (line 94) | @BeforeEach
method afterEach (line 99) | @AfterEach
method testSchemaEvolutionWithMultipleTopicsAndAvroSr (line 107) | @Test
method createAvroProducer (line 128) | private KafkaProducer<String, Object> createAvroProducer() {
method createAvroSerializer (line 137) | private KafkaAvroSerializer createAvroSerializer() {
method sendRecordsToTopic0 (line 145) | private void sendRecordsToTopic0() {
method sendRecordsToTopic1 (line 154) | private void sendRecordsToTopic1() {
method createTopic0Record (line 163) | private GenericRecord createTopic0Record(final Schema schema) {
method createTopic1Record (line 182) | private GenericRecord createTopic1Record(final Schema schema) {
FILE: src/test/java/com/snowflake/kafka/connector/SchemaEvolutionBase.java
class SchemaEvolutionBase (line 17) | abstract class SchemaEvolutionBase extends ConnectClusterBaseIT {
method before (line 32) | @BeforeEach
method after (line 49) | @AfterEach
method createConnectorConfig (line 58) | Map<String, String> createConnectorConfig() {
method sendTombstoneRecords (line 76) | void sendTombstoneRecords(final String topic) {
FILE: src/test/java/com/snowflake/kafka/connector/SchemaEvolutionJsonIT.java
class SchemaEvolutionJsonIT (line 16) | class SchemaEvolutionJsonIT extends SchemaEvolutionBase {
method testSchemaEvolutionWithMultipleTopics (line 18) | @Test()
method testSchemaEvolutionIgnoreTombstone (line 40) | @Test
method removeNotNullConstraint (line 61) | @Test
method testSchemaEvolutionIgnoreTombstoneAfterSmt (line 107) | @Test
method testSchemaEvolutionDropTable (line 155) | @Test
method sendRecordsToTopic0 (line 189) | private void sendRecordsToTopic0() throws JsonProcessingException {
method sendRecordsToTopic1 (line 196) | private void sendRecordsToTopic1() throws JsonProcessingException {
method createTopic0Record (line 203) | private String createTopic0Record() throws JsonProcessingException {
method createTopic1Record (line 210) | private String createTopic1Record() throws JsonProcessingException {
method makeCommonAssertions (line 218) | private void makeCommonAssertions(final int expectedTotalRecords) thro...
method testSnowpipeStreamingSchemaEvolution (line 232) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/SinkTaskIT.java
class SinkTaskIT (line 26) | class SinkTaskIT {
method setup (line 33) | @BeforeEach
method after (line 40) | @AfterEach
method testPreCommit (line 46) | @Test
method testSinkTask (line 54) | @Test
method testSinkTaskNegative (line 97) | @Test
method testMultipleSinkTasks (line 135) | @Test
method testTopicToTableRegex (line 208) | @Test
method createSinkRecords (line 216) | private List<SinkRecord> createSinkRecords(int partition, int count) {
FILE: src/test/java/com/snowflake/kafka/connector/SinkTaskProxyIT.java
class SinkTaskProxyIT (line 26) | public class SinkTaskProxyIT {
method testCleanup (line 35) | @After
method testSinkTaskProxyConfigMock (line 40) | @Test(expected = SnowflakeKafkaConnectorException.class)
method testProxyJvmPropertiesConfiguration (line 79) | @Test
method testSinkTaskProxyConfig (line 113) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/SmtIT.java
class SmtIT (line 27) | @ExtendWith({InjectSnowflakeDataSourceExtension.class, InjectQueryRunner...
method before (line 39) | @BeforeEach
method after (line 48) | @AfterEach
method test_with_record_content_variant_added_by_smt (line 57) | @Test
method testIfSmtReturningNullsIngestDataCorrectly (line 107) | @ParameterizedTest
method testIfSmtExtractingNestedStructuresWorksCorrectly (line 147) | @Test
method smtProperties (line 170) | private Map<String, String> smtProperties(
method getTestJsonContent (line 192) | private String getTestJsonContent() throws JsonProcessingException {
FILE: src/test/java/com/snowflake/kafka/connector/SnowflakeSinkTaskAuthorizationExceptionTrackerTest.java
class SnowflakeSinkTaskAuthorizationExceptionTrackerTest (line 15) | class SnowflakeSinkTaskAuthorizationExceptionTrackerTest {
method shouldThrowExceptionOnAuthorizationError (line 17) | @Test
method shouldNotThrowExceptionWhenNoExceptionReported (line 34) | @Test
method shouldNotThrowException (line 47) | @ParameterizedTest
method noExceptionConditions (line 64) | public static Stream<Arguments> noExceptionConditions() {
FILE: src/test/java/com/snowflake/kafka/connector/SnowflakeSinkTaskForStreamingIT.java
class SnowflakeSinkTaskForStreamingIT (line 37) | public class SnowflakeSinkTaskForStreamingIT {
method beforeEach (line 43) | @BeforeEach
method afterEach (line 52) | @AfterEach
method testSinkTask (line 59) | @Test
method testSinkTaskWithMultipleOpenClose (line 96) | @Test
method testTopicToTableRegex (line 189) | @Test
method testTopicToTableRegexMain (line 196) | public static void testTopicToTableRegexMain(Map<String, String> confi...
method testTopicToTableRegexRunner (line 240) | private static void testTopicToTableRegexRunner(
method getConfig (line 280) | private Map<String, String> getConfig() {
method testSanitizationEnabledAutoGenerated (line 285) | @Test
method testSanitizationDisabledQuotedMap (line 345) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/TopicToTableParserTest.java
class TopicToTableParserTest (line 12) | public class TopicToTableParserTest {
method testParseEmptyInput (line 14) | @Test
method testParseMultipleEntries (line 20) | @Test
method testParseQuotedEntries (line 29) | @Test
method testParseEntriesPreservesOrder (line 40) | @Test
method testParseUppercasesOnlyUnquotedTableTokens (line 52) | @Test
method testParseRejectsDuplicateTopics (line 61) | @Test
method testParseRejectsOverlappingRegexes (line 67) | @Test
method testParseRejectsUnterminatedQuotedToken (line 75) | @Test
method testParseRejectsEmptyQuotedToken (line 81) | @Test
method testParseRejectsMissingColon (line 87) | @Test
method assertParseError (line 93) | private static IllegalArgumentException assertParseError(String input) {
FILE: src/test/java/com/snowflake/kafka/connector/UtilsTest.java
class UtilsTest (line 21) | public class UtilsTest {
method testObjectIdentifier (line 24) | @Test
method testVersionChecker (line 32) | @Test
method testGetTableName (line 37) | @Test
method testGetTableNameRegex (line 58) | @Test
method testConvertAppName (line 81) | @Test
method testIsValidSnowflakeApplicationName (line 104) | @Test
method testLogMessageBasic (line 113) | @Test
method testLogMessageNulls (line 126) | @Test
method testLogMessageMultiLines (line 137) | @Test
method testSemanticVersionParsing (line 165) | @Test
method testSemanticVersionComparison (line 192) | @Test
method testSemanticVersionInvalidFormat (line 225) | @Test
method testFindRecommendedVersion (line 242) | @Test
method testFindRecommendedVersionFiltersRCVersions (line 253) | @Test
method testFindRecommendedVersionNoUpgradeAvailable (line 264) | @Test
method testFindRecommendedVersionWithEmptyList (line 275) | @Test
method testFindRecommendedVersionWithInvalidVersions (line 286) | @Test
method testFindRecommendedVersionOnlyRCVersionsAvailable (line 297) | @Test
method testSanitizationToggle (line 308) | @Test
method testMapEntriesBypassSanitization (line 329) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/builder/SinkRecordBuilder.java
class SinkRecordBuilder (line 9) | public class SinkRecordBuilder {
method SinkRecordBuilder (line 21) | private SinkRecordBuilder(String topic, int partition) {
method forTopicPartition (line 26) | public static SinkRecordBuilder forTopicPartition(String topic, int pa...
method build (line 30) | public SinkRecord build() {
method withKeySchema (line 35) | public SinkRecordBuilder withKeySchema(Schema keySchema) {
method withKey (line 40) | public SinkRecordBuilder withKey(Object key) {
method withValueSchema (line 45) | public SinkRecordBuilder withValueSchema(Schema valueSchema) {
method withValue (line 50) | public SinkRecordBuilder withValue(Object value) {
method withSchemaAndValue (line 55) | public SinkRecordBuilder withSchemaAndValue(SchemaAndValue schemaAndVa...
method withOffset (line 61) | public SinkRecordBuilder withOffset(long offset) {
method withTimestamp (line 66) | public SinkRecordBuilder withTimestamp(long timestamp, TimestampType t...
FILE: src/test/java/com/snowflake/kafka/connector/config/ClientValidationConfigTest.java
class ClientValidationConfigTest (line 13) | public class ClientValidationConfigTest {
method testValidationConfigExists (line 15) | @Test
method testValidationDefaultValue (line 24) | @Test
method testValidationCanBeSetToServerSide (line 33) | @Test
method testValidationCanBeSetToClientSide (line 48) | @Test
method testValidationDefaultsToServerSide (line 63) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/config/SinkTaskConfigTest.java
class SinkTaskConfigTest (line 13) | public class SinkTaskConfigTest {
method minimalConfig (line 15) | private static Map<String, String> minimalConfig() {
method from_minimalConfig_succeeds (line 27) | @Test
method from_missingConnectorName_throws (line 47) | @Test
method from_missingTaskId_throws (line 57) | @Test
method from_emptyConnectorName_throws (line 67) | @Test
method from_overridesDefaults (line 75) | @Test
method from_topic2tableMap_parsed (line 96) | @Test
method from_nullMap_treatedAsEmptyAndThrowsForMissingRequired (line 108) | @Test
method from_defaultMigrationMode_isSkip (line 114) | @Test
method from_migrationMode_bestEffort (line 120) | @Test
method from_migrationMode_strict (line 129) | @Test
method from_migrationMode_caseInsensitive (line 138) | @Test
method from_migrationMode_invalidValue_throws (line 147) | @Test
method from_defaultIncludeConnectorName_isFalse (line 158) | @Test
method from_includeConnectorNameTrue_isParsed (line 164) | @Test
method from_oauthFields_areParsed (line 172) | @Test
method from_privateKeyFields_wrappedAsPassword (line 190) | @Test
method from_missingPrivateKey_returnsNull (line 202) | @Test
method from_defaultAuthenticator_isSnowflakeJwt (line 210) | @Test
method from_oauthWithoutOptionalFields_succeeds (line 216) | @Test
method from_skipTaskSpecificConfig_succeedsWithoutTaskId (line 229) | @Test
method from_skipTaskSpecificConfig_succeedsWithoutConnectorName (line 238) | @Test
method from_skipTaskSpecificConfig_false_throwsWithoutTaskId (line 248) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/config/SinkTaskConfigTestBuilder.java
class SinkTaskConfigTestBuilder (line 18) | public final class SinkTaskConfigTestBuilder {
method SinkTaskConfigTestBuilder (line 20) | private SinkTaskConfigTestBuilder() {}
method builder (line 26) | public static SinkTaskConfig.Builder builder() {
FILE: src/test/java/com/snowflake/kafka/connector/config/SnowflakeSinkConnectorConfigBuilder.java
class SnowflakeSinkConnectorConfigBuilder (line 17) | public class SnowflakeSinkConnectorConfigBuilder {
method SnowflakeSinkConnectorConfigBuilder (line 21) | private SnowflakeSinkConnectorConfigBuilder() {}
method streamingConfig (line 23) | public static SnowflakeSinkConnectorConfigBuilder streamingConfig() {
method commonRequiredFields (line 27) | private static SnowflakeSinkConnectorConfigBuilder commonRequiredField...
method withName (line 39) | public SnowflakeSinkConnectorConfigBuilder withName(String name) {
method withTopics (line 44) | public SnowflakeSinkConnectorConfigBuilder withTopics(String topics) {
method withUrl (line 49) | public SnowflakeSinkConnectorConfigBuilder withUrl(String url) {
method withDatabase (line 54) | public SnowflakeSinkConnectorConfigBuilder withDatabase(String databas...
method withSchema (line 59) | public SnowflakeSinkConnectorConfigBuilder withSchema(String schema) {
method withUser (line 64) | public SnowflakeSinkConnectorConfigBuilder withUser(String user) {
method withPrivateKey (line 69) | public SnowflakeSinkConnectorConfigBuilder withPrivateKey(String priva...
method withRole (line 74) | public SnowflakeSinkConnectorConfigBuilder withRole(String role) {
method withoutRole (line 79) | public SnowflakeSinkConnectorConfigBuilder withoutRole() {
method withAuthenticator (line 84) | public SnowflakeSinkConnectorConfigBuilder withAuthenticator(String au...
method withOauthClientId (line 89) | public SnowflakeSinkConnectorConfigBuilder withOauthClientId(String cl...
method withOauthClientSecret (line 94) | public SnowflakeSinkConnectorConfigBuilder withOauthClientSecret(Strin...
method withOauthRefreshToken (line 99) | public SnowflakeSinkConnectorConfigBuilder withOauthRefreshToken(Strin...
method withOauthTokenEndpoint (line 104) | public SnowflakeSinkConnectorConfigBuilder withOauthTokenEndpoint(Stri...
method withoutPrivateKey (line 109) | public SnowflakeSinkConnectorConfigBuilder withoutPrivateKey() {
method withCompatibilityValidate (line 114) | public SnowflakeSinkConnectorConfigBuilder withCompatibilityValidate(b...
method withV3CompatibilitySettings (line 124) | public SnowflakeSinkConnectorConfigBuilder withV3CompatibilitySettings...
method build (line 140) | public Map<String, String> build() {
FILE: src/test/java/com/snowflake/kafka/connector/dlq/InMemoryKafkaRecordErrorReporter.java
class InMemoryKafkaRecordErrorReporter (line 15) | public final class InMemoryKafkaRecordErrorReporter implements KafkaReco...
method reportError (line 18) | @Override
method getReportedRecords (line 23) | public List<ReportedRecord> getReportedRecords() {
class ReportedRecord (line 27) | public static final class ReportedRecord {
method ReportedRecord (line 31) | private ReportedRecord(final SinkRecord record, final Throwable e) {
method getRecord (line 36) | public SinkRecord getRecord() {
method getException (line 40) | public Throwable getException() {
method toString (line 44) | @Override
FILE: src/test/java/com/snowflake/kafka/connector/internal/CachingSnowflakeConnectionServiceStatsTest.java
class CachingSnowflakeConnectionServiceStatsTest (line 18) | class CachingSnowflakeConnectionServiceStatsTest {
method testCacheStatisticsLogging (line 20) | @Test
method testCacheStatisticsLoggingWithNoCacheEnabled (line 41) | @Test
method createCacheConfig (line 56) | private CachingConfig createCacheConfig(
FILE: src/test/java/com/snowflake/kafka/connector/internal/CachingSnowflakeConnectionServiceTest.java
class CachingSnowflakeConnectionServiceTest (line 18) | class CachingSnowflakeConnectionServiceTest {
method testTableExistCacheEnabled_MultipleCalls_DelegateCalledOnce (line 23) | @Test
method testTableExistCacheDisabled_MultipleCalls_DelegateCalledEveryTime (line 45) | @Test
method testTableExistCacheEnabled_DifferentTables_DelegateCalledForEach (line 67) | @Test
method testPipeExistCacheEnabled_MultipleCalls_DelegateCalledOnce (line 93) | @Test
method testPipeExistCacheDisabled_MultipleCalls_DelegateCalledEveryTime (line 115) | @Test
method testPipeExistCacheEnabled_DifferentPipes_DelegateCalledForEach (line 137) | @Test
method testCacheExpiration_TableExists (line 163) | @Test
method testCacheExpiration_PipeExists (line 182) | @Test
method createCacheConfig (line 201) | private CachingConfig createCacheConfig(
FILE: src/test/java/com/snowflake/kafka/connector/internal/ConnectionServiceIT.java
class ConnectionServiceIT (line 16) | class ConnectionServiceIT {
method buildNoCachingConnection (line 19) | private static SnowflakeConnectionService buildNoCachingConnection() {
method testEncryptedKey (line 29) | @Test
method testSetSSLProperties (line 37) | @Test
method createConnectionService_SnowpipeStreaming (line 64) | @Test
method afterEach (line 77) | @AfterEach
method testTableFunctions (line 83) | @Test
method testConnectionFunction (line 117) | @Test
method testRoleIsUsedInJdbcConnection (line 130) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/EmbeddedProxyServer.java
class EmbeddedProxyServer (line 39) | public class EmbeddedProxyServer extends ExternalResource {
method EmbeddedProxyServer (line 48) | public EmbeddedProxyServer(final String username, final String passwor...
method start (line 53) | public final void start() {
method acceptLoop (line 79) | private void acceptLoop() {
method handleClient (line 92) | private void handleClient(Socket client) {
method handleConnect (line 145) | private void handleConnect(String requestLine, Socket client, OutputSt...
method relay (line 193) | private static void relay(Socket from, Socket to) {
method checkAuth (line 208) | private boolean checkAuth(String proxyAuth) {
method readLine (line 216) | private static String readLine(InputStream in) throws IOException {
method stop (line 235) | public final void stop() {
method isRunning (line 261) | public final boolean isRunning() {
method getPort (line 265) | public final int getPort() {
method getUsername (line 272) | public final String getUsername() {
method getPassword (line 276) | public final String getPassword() {
method before (line 280) | @Override
method after (line 285) | @Override
FILE: src/test/java/com/snowflake/kafka/connector/internal/InternalUtilsTest.java
class InternalUtilsTest (line 21) | public class InternalUtilsTest {
method testPrivateKey (line 22) | @Test
method testTimestampToDateConversion (line 49) | @Test
method testAssertNotEmpty (line 55) | @Test
method testMakeJdbcDriverProperties (line 74) | @Test
method testMakeJdbcDriverProperties_shouldIncludeRoleName (line 132) | @Test
method testResultSize (line 157) | @Test
method parseJdbcPropertiesMapTest (line 165) | @Test
method makeJdbcDriverProperties_setsAllFields (line 182) | @Test
method makeJdbcDriverProperties_missingPrivateKey_throws (line 211) | @Test
method makeJdbcDriverProperties_noRole_omitsRoleProperty (line 233) | @Test
method makeJdbcDriverProperties_emptyStringRole_omitsRoleProperty (line 256) | @Test
method makeJdbcDriverProperties_whitespaceRole_omitsRoleProperty (line 280) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/JdbcPropertiesTest.java
class JdbcPropertiesTest (line 11) | public class JdbcPropertiesTest {
method shouldCombineProperties (line 13) | @Test
method shouldThrowWhen_jdbcMap_overridesConnection (line 35) | @Test
method shouldThrowWhen_jdbcMap_overridesProxy (line 56) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/KCLoggerTest.java
class KCLoggerTest (line 29) | public class KCLoggerTest {
method before (line 39) | @Before
method testAllLogMessages (line 45) | @Test
method testAllLogMessagesWithMDCContext (line 59) | @Test
method testLogMessagesRunner (line 76) | private void testLogMessagesRunner(String msg, String expectedMsg) {
method testLogMessagesWithFormattingRunner (line 108) | private void testLogMessagesWithFormattingRunner(
FILE: src/test/java/com/snowflake/kafka/connector/internal/NonEncryptedKeyTestSnowflakeConnection.java
class NonEncryptedKeyTestSnowflakeConnection (line 13) | public class NonEncryptedKeyTestSnowflakeConnection {
method getConnection (line 16) | public static Connection getConnection() throws Exception {
FILE: src/test/java/com/snowflake/kafka/connector/internal/ResetProxyConfigExec.java
class ResetProxyConfigExec (line 5) | public class ResetProxyConfigExec {
method main (line 6) | public static void main(String[] args) throws SnowflakeSQLException {
FILE: src/test/java/com/snowflake/kafka/connector/internal/SchematizationTestUtils.java
class SchematizationTestUtils (line 6) | public class SchematizationTestUtils {
FILE: src/test/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionServiceCacheTest.java
class SnowflakeConnectionServiceCacheTest (line 21) | class SnowflakeConnectionServiceCacheTest {
method testCacheConfigDefaults (line 23) | @Test
method testCacheConfigInvalidTableExpiration (line 34) | @Test
method testCacheConfigInvalidPipeExpiration (line 44) | @Test
method testCacheConfigInvalidNumberFormat (line 54) | @Test
method createConfigWithCache (line 68) | private Map<String, String> createConfigWithCache(
FILE: src/test/java/com/snowflake/kafka/connector/internal/SnowflakeDataSourceFactory.java
class SnowflakeDataSourceFactory (line 17) | public final class SnowflakeDataSourceFactory {
method SnowflakeDataSourceFactory (line 22) | private SnowflakeDataSourceFactory() {}
method get (line 24) | public static DataSource get() {
FILE: src/test/java/com/snowflake/kafka/connector/internal/SnowflakeURLTest.java
class SnowflakeURLTest (line 23) | public class SnowflakeURLTest {
method createFromValidURL (line 26) | @Test
method createFromInvalidURL (line 101) | @Test(expected = SnowflakeKafkaConnectorException.class)
method testRegionlessURLString (line 108) | @Test
method testRegionlessWithPrivateLinkURL (line 127) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/StandardSnowflakeConnectionServiceDdlTest.java
class StandardSnowflakeConnectionServiceDdlTest (line 23) | public class StandardSnowflakeConnectionServiceDdlTest {
method setUp (line 32) | @BeforeEach
method createServiceWithMockConnection (line 54) | private static StandardSnowflakeConnectionService createServiceWithMoc...
method captureAlterSql (line 72) | private String captureAlterSql() throws SQLException {
method testAppendColumnsToTable_singleColumn_generatesCorrectSql (line 78) | @Test
method testAppendColumnsToTable_multipleColumns_repeatsIfNotExists (line 97) | @Test
method testAppendColumnsToTable_withComment_includesDdlComment (line 114) | @Test
method testAppendColumnsToTable_nullMap_doesNothing (line 126) | @Test
method testAppendColumnsToTable_emptyMap_doesNothing (line 133) | @Test
method testAppendColumnsToTable_sqlException_throwsError2015 (line 139) | @Test
method testAlterNonNullableColumns_singleColumn_generatesCorrectSql (line 155) | @Test
method testAlterNonNullableColumns_multipleColumns_generatesCorrectSql (line 173) | @Test
method testAppendColumnsToTable_caseSensitiveColumnsQuotedInline (line 187) | @Test
method testAlterNonNullableColumns_caseSensitiveColumnsQuotedInline (line 200) | @Test
method testAppendColumnsToTable_embeddedQuotesEscaped (line 210) | @Test
method testAlterNonNullableColumns_nullList_doesNothing (line 223) | @Test
method testAlterNonNullableColumns_emptyList_doesNothing (line 229) | @Test
method testAlterNonNullableColumns_sqlException_throwsError2016 (line 235) | @Test
method testAppendColumnsToTable_icebergTable_usesAlterIcebergTable (line 248) | @Test
method testShouldEvolveSchema_icebergTable_seEnabled_returnsTrue (line 266) | @Test
method testShouldEvolveSchema_regularTable_seEnabled_returnsTrue (line 305) | @Test
method testShouldEvolveSchema_tableNotFound_returnsFalse (line 333) | @Test
method testAlterNonNullableColumns_icebergTable_usesAlterIcebergTable (line 365) | @Test
method testCreateTableWithOnlyMetadataColumn_icebergTableAlreadyExists_doesNotThrow (line 376) | @Test
method testCreateTableWithOnlyMetadataColumn_otherSqlError_throws (line 389) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/TestUtils.java
class TestUtils (line 78) | public class TestUtils {
class Profile (line 96) | @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
method getProfile (line 143) | private static Profile getProfile() {
method generatePrivateKey (line 159) | public static PrivateKey generatePrivateKey() {
method getOrCreateEphemeralSchema (line 182) | private static String getOrCreateEphemeralSchema() {
method randomAlphanumeric (line 239) | private static String randomAlphanumeric(int length) {
method transformProfileFileToConnectorConfiguration (line 248) | public static Map<String, String> transformProfileFileToConnectorConfi...
method getConnectorConfigurationForStreaming (line 286) | public static Map<String, String> getConnectorConfigurationForStreaming(
method generateAESKey (line 305) | public static String generateAESKey(PrivateKey key, char[] passwd)
method executeQuery (line 327) | static ResultSet executeQuery(String query) {
method executeQueryWithParameter (line 346) | public static void executeQueryWithParameter(String query, String para...
method executeQueryWithParameter (line 362) | public static void executeQueryWithParameter(Connection conn, String q...
method executeQueryAndCollectResult (line 383) | public static <T> T executeQueryAndCollectResult(
method executeQueryAndCollectResult (line 406) | public static <T> T executeQueryAndCollectResult(
method createTableWithMetadataColumn (line 429) | public static void createTableWithMetadataColumn(String tableName, boo...
method createTableWithMetadataColumn (line 438) | public static void createTableWithMetadataColumn(String tableName) {
method dropTable (line 447) | public static void dropTable(String tableName) {
method dropPipe (line 453) | public static void dropPipe(String pipeName) {
method showTable (line 461) | public static ResultSet showTable(String tableName) {
method randomName (line 473) | private static String randomName(String objectName) {
method randomTableName (line 482) | public static String randomTableName() {
method randomTopicName (line 486) | public static String randomTopicName() {
method getUrl (line 490) | static SnowflakeURL getUrl() {
method assertError (line 504) | public static boolean assertError(SnowflakeErrors error, Runnable func) {
method getConnectionService (line 516) | public static SnowflakeConnectionService getConnectionService() {
method getConnectionServiceWithEncryptedKey (line 522) | public static SnowflakeConnectionService getConnectionServiceWithEncry...
method resetProxyParametersInJVM (line 532) | public static void resetProxyParametersInJVM() {
method tableSize (line 554) | public static int tableSize(String tableName) throws SQLException {
type AssertFunction (line 568) | public interface AssertFunction {
method operate (line 569) | boolean operate() throws Exception;
method assertWithRetry (line 579) | public static void assertWithRetry(AssertFunction func, int intervalSe...
method assertWithRetry (line 591) | public static void assertWithRetry(AssertFunction func) throws Excepti...
method createJsonStringSinkRecords (line 596) | public static List<SinkRecord> createJsonStringSinkRecords(
method createBlankJsonSinkRecords (line 609) | public static List<SinkRecord> createBlankJsonSinkRecords(
method createNativeJsonSinkRecords (line 624) | public static List<SinkRecord> createNativeJsonSinkRecords(
method createJsonRecords (line 638) | private static List<SinkRecord> createJsonRecords(
method createBigAvroRecords (line 665) | public static List<SinkRecord> createBigAvroRecords(
method getConfig (line 730) | @Deprecated
method checkTableSchema (line 741) | public static void checkTableSchema(String tableName, Map<String, Stri...
method checkTableContentOneRow (line 771) | public static void checkTableContentOneRow(String tableName, Map<Strin...
method getTableContentOneRow (line 799) | public static Map<String, Object> getTableContentOneRow(String tableNa...
method getNumberOfRows (line 811) | public static int getNumberOfRows(String tableName) throws SQLException {
method getNumberOfColumns (line 820) | public static int getNumberOfColumns(String tableName) throws SQLExcep...
method assertTableRowCount (line 826) | public static void assertTableRowCount(String tableName, int expectedR...
method assertTableColumnCount (line 837) | public static void assertTableColumnCount(String tableName, int expect...
method assertTableHasColumn (line 848) | public static void assertTableHasColumn(String tableName, String colum...
method getTableRows (line 866) | public static List<Map<String, Object>> getTableRows(String tableName)...
method assertColumnNullable (line 886) | public static void assertColumnNullable(String tableName, String colum...
FILE: src/test/java/com/snowflake/kafka/connector/internal/TombstoneRecordIngestionIT.java
class TombstoneRecordIngestionIT (line 33) | class TombstoneRecordIngestionIT {
method beforeEach (line 40) | @BeforeEach
method afterEach (line 56) | @AfterEach
method testStreamingTombstoneBehavior (line 61) | @ParameterizedTest(name = "behavior: {0}")
method testStreamingTombstoneBehaviorWithSchematization (line 89) | @ParameterizedTest(name = "behavior: {0}")
method testIngestTombstoneRunner (line 119) | private void testIngestTombstoneRunner(
FILE: src/test/java/com/snowflake/kafka/connector/internal/metrics/MetricsJmxReporterTest.java
class MetricsJmxReporterTest (line 10) | public class MetricsJmxReporterTest {
method setUp (line 14) | @Before
method testRemoveMetricByExactName (line 20) | @Test
method testRemoveMetricNonexistentIsNoOp (line 36) | @Test
method testRemoveMetricsFromRegistryStillWorks (line 43) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/metrics/SnowflakeSinkTaskMetricsTest.java
class SnowflakeSinkTaskMetricsTest (line 16) | public class SnowflakeSinkTaskMetricsTest {
method setUp (line 25) | @Before
method tearDown (line 31) | @After
method createMetrics (line 38) | private void createMetrics() {
method createMetricsWithSdkClientCount (line 42) | private void createMetricsWithSdkClientCount(int initialCount) {
method testAllMetricsRegistered (line 49) | @Test
method testPutDurationTimer (line 116) | @Test
method testPreCommitDurationTimer (line 124) | @Test
method testLifecycleTimers (line 132) | @Test
method testChannelAndSdkTimers (line 149) | @Test
method testPutRecordsMeter (line 168) | @Test
method testPreCommitPartitionsSkipped (line 176) | @Test
method testAssignedPartitionsGauge (line 183) | @Test
method testLifecycleCounters (line 198) | @Test
method testChannelOpenCount (line 208) | @Test
method testSdkClientCountGauge (line 217) | @Test
method testSdkClientCountGaugeNotRegisteredWithoutSupplier (line 230) | @Test
method testUnregisterRemovesAllMetrics (line 239) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/ColumnInfosTest.java
class ColumnInfosTest (line 8) | class ColumnInfosTest {
method getDdlComments_withComment (line 10) | @Test
method getDdlComments_withoutComment (line 16) | @Test
method getDdlComments_withNullComment (line 23) | @Test
method getDdlComments_escapeSingleQuotes (line 30) | @Test
method constructorRejectsNullColumnType (line 36) | @Test
method equalityAndHashCode (line 42) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/SchemaEvolutionTargetItemsTest.java
class SchemaEvolutionTargetItemsTest (line 12) | class SchemaEvolutionTargetItemsTest {
method hasDataForSchemaEvolution_withColumnsToAdd (line 14) | @Test
method hasDataForSchemaEvolution_withColumnsToDropNonNull (line 22) | @Test
method hasDataForSchemaEvolution_empty (line 30) | @Test
method constructorHandlesNullSets (line 37) | @Test
method twoArgConstructorSetsColumnsToAdd (line 45) | @Test
method gettersReturnUnmodifiableSets (line 53) | @Test
method defensiveCopyPreventsExternalMutation (line 63) | @Test
method equalityAndHashCode (line 72) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/SnowflakeColumnTypeMapperTest.java
class SnowflakeColumnTypeMapperTest (line 17) | class SnowflakeColumnTypeMapperTest {
method shouldMapKafkaTypeToSnowflakeColumnType (line 21) | @ParameterizedTest(name = "should map Kafka type {0} to Snowflake colu...
method shouldMapJsonNodeTypeToKafkaType (line 28) | @ParameterizedTest()
method kafkaTypesToMap (line 34) | private static Stream<Arguments> kafkaTypesToMap() {
method jsonNodeTypesToMap (line 54) | private static Stream<Arguments> jsonNodeTypesToMap() {
FILE: src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/SnowflakeSchemaEvolutionServiceTest.java
class SnowflakeSchemaEvolutionServiceTest (line 27) | public class SnowflakeSchemaEvolutionServiceTest {
method setUp (line 34) | @BeforeEach
method toSinkRecord (line 40) | private static SnowflakeSinkRecord toSinkRecord(SinkRecord kafkaRecord) {
method testEvolveSchemaAddColumns (line 44) | @Test
method testEvolveSchemaDropNotNull (line 69) | @Test
method testEvolveSchemaNoDataSkipsExecution (line 89) | @Test
method testEvolveSchemaHandlesAddColumnFailure (line 104) | @Test
method testEvolveSchemaHandlesDropNotNullFailure (line 127) | @Test
method testEvolveSchemaAddColumnsBeforeDropNotNull (line 145) | @Test
method testEvolveSchemaWithTransformedRecordContent (line 173) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/TableSchemaResolverTest.java
class TableSchemaResolverTest (line 21) | public class TableSchemaResolverTest {
method toSinkRecord (line 27) | private static SnowflakeSinkRecord toSinkRecord(
method testGetColumnTypesWithSchema_TimestampField_JacksonCanSerialize (line 33) | @Test
method testGetColumnTypesWithoutSchema_NormalizationEnabled (line 72) | @Test
method testGetColumnTypesWithoutSchema_NormalizationDisabled (line 114) | @Test
method testGetColumnTypesWithSchema_NormalizationEnabled (line 149) | @Test
method testGetColumnTypesWithSchema_NormalizationDisabled (line 185) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/ValidationResultMapperTest.java
class ValidationResultMapperTest (line 13) | class ValidationResultMapperTest {
method mapWithExtraColumnsAndBothNotNullViolations (line 15) | @Test
method mapWithEmptyResult (line 34) | @Test
method mapWithOnlyExtraColumns (line 48) | @Test
method mapWithOnlyMissingNotNull (line 61) | @Test
method mapWithOnlyNullValueForNotNull (line 74) | @Test
method mapCombinesBothNotNullViolationTypes (line 87) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/BatchOffsetFetcherTest.java
class BatchOffsetFetcherTest (line 43) | class BatchOffsetFetcherTest {
method setUp (line 53) | @BeforeEach
method tearDown (line 71) | @AfterEach
method emptyPartitionsReturnsEmptyMap (line 77) | @Test
method groupsByPipeAndBatchesCalls (line 82) | @Test
method uninitializedPartitionsAreSkipped (line 107) | @Test
method sfExceptionForOnePipeDoesNotAffectOthers (line 121) | @Test
method connectorExceptionPropagates (line 138) | @Test
method partitionsByTopicGroupsCorrectly (line 156) | @Test
method mockChannel (line 184) | private static TopicPartitionChannel mockChannel(String pipeName) {
method channelLookup (line 192) | private Function<TopicPartition, Optional<TopicPartitionChannel>> chan...
method registerChannel (line 196) | private void registerChannel(
method registerChannelWithNoOffset (line 208) | private void registerChannelWithNoOffset(
class CountingClientSupplier (line 223) | static class CountingClientSupplier implements StreamingClientSupplier {
method setChannelOffset (line 229) | void setChannelOffset(String channelName, String pipeName, String of...
method setFailingPipe (line 235) | void setFailingPipe(String pipeName) {
method getBatchCallCount (line 239) | int getBatchCallCount() {
method get (line 243) | @Override
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/ChannelStatusCheckIT.java
class ChannelStatusCheckIT (line 33) | @TestInstance(TestInstance.Lifecycle.PER_CLASS)
method beforeAll (line 39) | @BeforeAll
method afterAll (line 54) | @AfterAll
method setUp (line 68) | @BeforeEach
method tearDown (line 77) | @AfterEach
method shouldContinueWorkingWhenNoChannelErrors (line 86) | @Test
method shouldFailConnectorWhenChannelHasErrorsAndToleranceIsNone (line 108) | @Test
method shouldContinueWorkingWhenChannelHasErrorsAndToleranceIsAll (line 139) | @Test
method shouldContinueWorkingWithPreExistingErrorsAndToleranceIsNone (line 174) | @Test
method shouldFailWhenNewErrorsOccurAfterStartupWithPreExistingErrors (line 203) | @Test
method produceMessages (line 237) | private void produceMessages(int count) throws JsonProcessingException {
method waitForConnectorToOpenChannels (line 249) | private FakeSnowflakeStreamingIngestClient waitForConnectorToOpenChann...
method waitForOpenedFakeIngestClient (line 261) | private void waitForOpenedFakeIngestClient(String connectorName) {
method getFakeSnowflakeStreamingIngestClient (line 265) | private FakeSnowflakeStreamingIngestClient getFakeSnowflakeStreamingIn...
method defaultProperties (line 278) | private Map<String, String> defaultProperties(String topicName, String...
method waitForConnectorRunning (line 292) | private void waitForConnectorRunning(String connectorName) {
method waitForConnectorStopped (line 303) | private void waitForConnectorStopped(String connectorName) {
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/CloseTopicPartitionChannelIT.java
class CloseTopicPartitionChannelIT (line 16) | class CloseTopicPartitionChannelIT extends ConnectClusterBaseIT {
method setUp (line 24) | @BeforeEach
method tearDown (line 34) | @AfterEach
method generateKafkaMessages (line 42) | private void generateKafkaMessages() throws JsonProcessingException {
method closeChannels (line 53) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/DefaultStreamingConfigValidatorTest.java
class DefaultStreamingConfigValidatorTest (line 11) | class DefaultStreamingConfigValidatorTest {
method validConfig (line 15) | private Map<String, String> validConfig() {
method testStringConverterAllowed_WhenSchematizationDisabled (line 21) | @Test
method testByteArrayConverterAllowed_WhenSchematizationDisabled (line 33) | @Test
method testStringConverterBlocked_WhenSchematizationEnabled (line 45) | @Test
method testByteArrayConverterBlocked_WhenSchematizationEnabled (line 57) | @Test
method testStringConverterBlocked_WhenSchematizationDefault (line 69) | @Test
method testJsonConverterAllowed_WhenSchematizationEnabled (line 80) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/FakeIngestClientSupplier.java
class FakeIngestClientSupplier (line 8) | public class FakeIngestClientSupplier implements StreamingClientSupplier {
method get (line 15) | @Override
method getFakeIngestClients (line 32) | public Collection<FakeSnowflakeStreamingIngestClient> getFakeIngestCli...
method setPreExistingErrorCount (line 40) | public void setPreExistingErrorCount(final long errorCount) {
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/FakeSnowflakeStreamingIngestChannel.java
class FakeSnowflakeStreamingIngestChannel (line 16) | public class FakeSnowflakeStreamingIngestChannel
method FakeSnowflakeStreamingIngestChannel (line 36) | public FakeSnowflakeStreamingIngestChannel(
method FakeSnowflakeStreamingIngestChannel (line 43) | public FakeSnowflakeStreamingIngestChannel(
method getDBName (line 55) | @Override
method getSchemaName (line 60) | @Override
method getPipeName (line 65) | @Override
method getFullyQualifiedPipeName (line 70) | @Override
method getFullyQualifiedChannelName (line 75) | @Override
method isClosed (line 80) | @Override
method getChannelName (line 85) | @Override
method close (line 90) | @Override
method close (line 95) | @Override
method appendRow (line 101) | @Override
method appendRows (line 107) | @Override
method getLatestCommittedOffsetToken (line 119) | @Override
method getChannelStatus (line 124) | @Override
method updateErrors (line 144) | public void updateErrors(
method setErrorCount (line 152) | public void setErrorCount(final long errorCount) {
method setOffsetToken (line 156) | public void setOffsetToken(final String offsetToken) {
method waitForCommit (line 160) | @Override
method waitForFlush (line 166) | @Override
method initiateFlush (line 171) | @Override
method getAppendedRowsCount (line 176) | public synchronized int getAppendedRowsCount() {
method getAppendedRows (line 180) | public synchronized List<Map<String, Object>> getAppendedRows() {
method compareTo (line 184) | @Override
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/FakeSnowflakeStreamingIngestClient.java
class FakeSnowflakeStreamingIngestClient (line 15) | public class FakeSnowflakeStreamingIngestClient implements SnowflakeStre...
method FakeSnowflakeStreamingIngestClient (line 28) | public FakeSnowflakeStreamingIngestClient(final String pipeName, final...
method setDefaultErrorCount (line 33) | public void setDefaultErrorCount(final long errorCount) {
method setInitialErrorCountForChannel (line 37) | public void setInitialErrorCountForChannel(final String channelName, f...
method getErrorCountForChannel (line 41) | public long getErrorCountForChannel(final String channelName) {
method close (line 45) | @Override
method close (line 50) | @Override
method initiateFlush (line 55) | @Override
method openChannel (line 60) | @Override
method openChannel (line 65) | @Override
method dropChannel (line 85) | @Override
method getLatestCommittedOffsetTokens (line 90) | @Override
method getChannelStatus (line 95) | @Override
method isClosed (line 107) | @Override
method waitForFlush (line 112) | @Override
method getDBName (line 117) | @Override
method getSchemaName (line 122) | @Override
method getPipeName (line 127) | @Override
method getClientName (line 132) | @Override
method getOpenedChannels (line 137) | public List<FakeSnowflakeStreamingIngestChannel> getOpenedChannels() {
method countClosedChannels (line 141) | public long countClosedChannels() {
method getAppendedRowCount (line 147) | public int getAppendedRowCount() {
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/InMemorySinkTaskContext.java
class InMemorySinkTaskContext (line 14) | public class InMemorySinkTaskContext implements SinkTaskContext {
method InMemorySinkTaskContext (line 19) | public InMemorySinkTaskContext(Set<TopicPartition> assignment) {
method configs (line 23) | public Map<String, String> configs() {
method offset (line 27) | public void offset(Map<TopicPartition, Long> offsets) {
method offset (line 31) | public void offset(TopicPartition tp, long offset) {
method offset (line 36) | public long offset(TopicPartition tp) {
method timeout (line 40) | public void timeout(long timeoutMs) {
method assignment (line 44) | public Set<TopicPartition> assignment() {
method pause (line 48) | public void pause(TopicPartition... partitions) {}
method resume (line 50) | public void resume(TopicPartition... partitions) {}
method requestCommit (line 52) | public void requestCommit() {}
method errantRecordReporter (line 54) | public ErrantRecordReporter errantRecordReporter() {
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/OpenChannelRetryPolicyTest.java
class OpenChannelRetryPolicyTest (line 16) | public class OpenChannelRetryPolicyTest {
method setUp (line 29) | @BeforeEach
method shouldReturnChannelOnFirstAttemptSuccess (line 34) | @Test
method shouldNotRetryOnNonSFException (line 47) | @Test
method shouldNotRetryOnSFExceptionWithout429 (line 65) | @Test
method shouldRetryMultipleTimesOn429Exception (line 87) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2AvroSchematizationIT.java
class SnowflakeSinkServiceV2AvroSchematizationIT (line 31) | public class SnowflakeSinkServiceV2AvroSchematizationIT {
method before (line 84) | @BeforeEach
method after (line 92) | @AfterEach
method testSchematizationWithTableCreationAndAvroInput (line 97) | @Test
method createService (line 143) | private SnowflakeSinkService createService() {
method createSinkRecord (line 155) | private SinkRecord createSinkRecord() {
method prepareAvroConverter (line 174) | private AvroConverter prepareAvroConverter() {
method prepareConfig (line 182) | private Map<String, String> prepareConfig() {
method prepareSchema (line 193) | private Schema prepareSchema() {
method prepareData (line 215) | private Struct prepareData(Schema schema) {
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2BaseIT.java
class SnowflakeSinkServiceV2BaseIT (line 6) | public abstract class SnowflakeSinkServiceV2BaseIT {
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2IT.java
class SnowflakeSinkServiceV2IT (line 43) | public class SnowflakeSinkServiceV2IT extends SnowflakeSinkServiceV2Base...
method setup (line 49) | @BeforeEach
method afterEach (line 56) | @AfterEach
method testChannelCloseIngestion (line 62) | @Test
method buildJsonConverter (line 100) | private static @NotNull Converter buildJsonConverter() {
method testRebalanceOpenCloseIngestion (line 108) | @Test
method testStreamingIngestion (line 147) | @Test
method testStreamingIngest_multipleChannelPartitions_withMetrics (line 205) | @Test
method verifyPartitionMetrics (line 297) | private void verifyPartitionMetrics(
method testStreamingIngest_multipleChannelPartitionsWithTopic2Table (line 323) | @Test
method testStreamingIngest_startPartitionsWithMultipleChannelPartitions (line 381) | @Test
method testNativeJsonInputIngestion (line 429) | @Test
method testNativeAvroInputIngestion (line 521) | @Test
method testBrokenIngestion (line 679) | @Test
method testBrokenRecordIngestionFollowedUpByValidRecord (line 744) | @Test
method testStreamingIngestionWithExactlyOnceSemanticsNoOverlappingOffsets (line 792) | @Test
method testStreamingIngestionWithExactlyOnceSemanticsOverlappingOffsets (line 845) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2SchematizationIT.java
class SnowflakeSinkServiceV2SchematizationIT (line 21) | public class SnowflakeSinkServiceV2SchematizationIT extends SnowflakeSin...
method setup (line 28) | @BeforeEach
method teardown (line 36) | @AfterEach
method snowflakeSinkTask_put_whenJsonRecordCannotBeSchematized_sendRecordToDLQ (line 43) | @Test
method createKafkaRecord (line 70) | private SinkRecord createKafkaRecord(String jsonWithSchema, long offse...
method createKafkaRecordWithoutSchema (line 89) | private SinkRecord createKafkaRecordWithoutSchema(String jsonPayload, ...
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2Test.java
class SnowflakeSinkServiceV2Test (line 45) | class SnowflakeSinkServiceV2Test {
method setUp (line 55) | @BeforeEach
method tearDown (line 75) | @AfterEach
method insertSkipsRecordsForInitializingPartitions (line 82) | @Test
method insertProcessesRecordsForReadyPartitions (line 95) | @Test
method insertHandlesMixOfInitializingAndReadyPartitions (line 108) | @Test
method insertResetsToFirstSkippedOffset (line 129) | @Test
method getCommittedOffsetsExcludesInitializingPartitions (line 147) | @Test
method getCommittedOffsetsReturnsEmptyWhenAllInitializing (line 176) | @Test
method insertProcessesRecordsAfterChannelTransitionsFromInitializingToReady (line 202) | @Test
method startPartitionsThrowsWhenValidationEnabledAndNonDefaultPipeExists (line 226) | @Test
method startPartitionsUsesDefaultPipeWhenValidationEnabledAndNoNonDefaultPipe (line 242) | @Test
method startPartitionsUsesNonDefaultPipeWhenValidationDisabled (line 262) | @Test
method insertSkipsAllPartitionsAfterBackpressure (line 284) | @Test
method insertSkipsRemainingRecordsForAllPartitionsAfterBackpressure (line 314) | @Test
method insertRewindsOnBackpressureWithInitializingPartitions (line 345) | @Test
method insertSetsCooldownAfterBackpressure (line 375) | @Test
method insertSkipsEntireBatchDuringCooldown (line 395) | @Test
method insertResumesNormallyAfterCooldownExpires (line 421) | @Test
method insertSkipsRemainingRecordsForPartitionAfterRecovery (line 439) | @Test
method insertRewindsToFirstSkippedOffsetAfterRecoveryMidPartition (line 474) | @Test
method buildService (line 498) | private SnowflakeSinkServiceV2 buildService(
method buildService (line 503) | private SnowflakeSinkServiceV2 buildService(
method mockChannel (line 527) | private static TopicPartitionChannel mockChannel(String channelName, b...
method recordFor (line 536) | private static SinkRecord recordFor(String topic, int partition, long ...
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2ValidationLoggingTest.java
class SnowflakeSinkServiceV2ValidationLoggingTest (line 27) | public class SnowflakeSinkServiceV2ValidationLoggingTest {
method setUp (line 32) | @BeforeEach
method tearDown (line 41) | @AfterEach
method testSafeConfigValidationEnabledWithToleranceNone (line 51) | @Test
method testSafeConfigValidationEnabledWithToleranceAllAndDlq (line 78) | @Test
method testUnsafeConfigValidationEnabledWithToleranceAllNoDlq (line 108) | @Test
method testValidationDisabledWithErrorLoggingEnabled (line 139) | @Test
method testValidationDisabledMultipleTablesPartialErrorLogging (line 172) | @Test
method testValidationDisabledWithoutErrorLogging (line 209) | @Test
method testValidationDisabledTableNotExists (line 242) | @Test
method testValidationDisabledIcebergTableWarning (line 271) | @Test
method testLegacySchematizationConfigWarning (line 306) | @Test
method createServiceWithConfig (line 331) | private SnowflakeSinkServiceV2 createServiceWithConfig(SinkTaskConfig ...
method createServiceWithConfig (line 336) | private SnowflakeSinkServiceV2 createServiceWithConfig(
class TestAppender (line 361) | private static class TestAppender extends AppenderSkeleton {
method append (line 364) | @Override
method close (line 369) | @Override
method requiresLayout (line 374) | @Override
method containsMessage (line 379) | public boolean containsMessage(Level level, String messageFragment) {
method getEvents (line 387) | public List<LoggingEvent> getEvents() {
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientPropertiesTest.java
class StreamingClientPropertiesTest (line 41) | public class StreamingClientPropertiesTest {
method testGetValidProperties (line 46) | @Test
method shouldPropagateStreamingClientPropertiesFromOverrideMap (line 77) | @Test
method explicitStreamingClientPropertiesTakePrecedenceOverOverrideMap_SingleBufferEnabled (line 102) | @Test
method testValidPropertiesWithOverriddenStreamingPropertiesMap (line 127) | @Test
method testInvalidStreamingClientPropertiesMap (line 165) | @Test
method testStreamingClientPropertiesEquality (line 204) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/StreamingErrorHandlerIT.java
class StreamingErrorHandlerIT (line 44) | class StreamingErrorHandlerIT {
method setUp (line 56) | @BeforeEach
method tearDown (line 69) | @AfterEach
method brokenRecord_toleranceNone_shouldThrowDataException (line 76) | @Test
method brokenKeyRecord_toleranceNone_shouldThrowDataException (line 96) | @Test
method brokenRecord_toleranceNone_withDLQ_shouldRouteToDlqThenThrow (line 113) | @Test
method brokenRecord_toleranceAll_withDLQ_shouldSendOriginalExceptionToDLQ (line 144) | @Test
method brokenKeyRecord_toleranceAll_withDLQ_shouldSendOriginalExceptionToDLQ (line 177) | @Test
method multipleBrokenRecords_toleranceAll_withDLQ_shouldSendOnlyBrokenToDLQ (line 202) | @Test
method brokenRecord_toleranceAll_noDLQ_shouldSilentlyDrop (line 221) | @Test
method baseConfig (line 239) | private Map<String, String> baseConfig() {
method buildBrokenValueRecord (line 246) | private SinkRecord buildBrokenValueRecord(long offset) {
method buildBrokenKeyRecord (line 255) | private SinkRecord buildBrokenKeyRecord(long offset) {
method buildValidRecord (line 266) | private SinkRecord buildValidRecord(long offset) {
method createChannel (line 277) | private SnowpipeStreamingPartitionChannel createChannel(
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/StreamingManualModeIT.java
class StreamingManualModeIT (line 43) | @ExtendWith({InjectSnowflakeDataSourceExtension.class, InjectQueryRunner...
method beforeEach (line 57) | @BeforeEach
method afterEach (line 80) | @AfterEach
class TableAndPipeDefinedByUser (line 86) | @Nested
method beforeEach (line 91) | @BeforeEach
method afterEach (line 102) | @AfterEach
method test_streaming_ingestion_with_user_defined_table_and_pipe (line 107) | @Test
class DefaultPipe (line 131) | @Nested
method beforeEach (line 134) | @BeforeEach
method test_streaming_ingestion_with_user_defined_table_and_default_pipe (line 144) | @Test
method buildContentSinkRecords (line 166) | private List<SinkRecord> buildContentSinkRecords() throws JsonProcessi...
method toJson (line 197) | private JsonNode toJson(Object value) throws IOException {
method makeCommonAssertions (line 208) | private void makeCommonAssertions(final Map<String, Object> firstRow) ...
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/StreamingSinkServiceBuilder.java
class StreamingSinkServiceBuilder (line 13) | public class StreamingSinkServiceBuilder {
method builder (line 23) | public static StreamingSinkServiceBuilder builder(
method build (line 28) | public SnowflakeSinkServiceV2 build() {
method StreamingSinkServiceBuilder (line 33) | private StreamingSinkServiceBuilder(SnowflakeConnectionService conn, S...
method withErrorReporter (line 38) | public StreamingSinkServiceBuilder withErrorReporter(KafkaRecordErrorR...
method withSinkTaskContext (line 43) | public StreamingSinkServiceBuilder withSinkTaskContext(SinkTaskContext...
method withMetricsJmxReporter (line 48) | public StreamingSinkServiceBuilder withMetricsJmxReporter(MetricsJmxRe...
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/telemetry/PeriodicTelemetryReporterTest.java
class PeriodicTelemetryReporterTest (line 32) | class PeriodicTelemetryReporterTest {
method setUp (line 43) | @BeforeEach
method tearDown (line 51) | @AfterEach
method shouldStartAndStopWithoutErrors (line 58) | @Test
method shouldNotReportTelemetryWhenNoChannelsExist (line 71) | @Test
method shouldNotReportTelemetryWhenChannelsSupplierReturnsNull (line 91) | @Test
method shouldReportTelemetryForActiveChannels (line 111) | @Test
method shouldReportTelemetryForMultipleChannels (line 135) | @Test
method shouldNotReportTelemetryForEmptyChannelStatus (line 176) | @Test
method shouldNotReportTelemetryWhenChannelStatusIsNull (line 200) | @Test
method shouldContinueReportingAfterExceptionInChannelStatusRetrieval (line 225) | @Test
method shouldContinueReportingAfterExceptionInSupplier (line 255) | @Test
method shouldReportPeriodically (line 287) | @Test
method waitForTelemetryCount (line 311) | private void waitForTelemetryCount(int minCount, long maxWaitMs) throw...
method createMockChannelWithNonEmptyStatus (line 321) | private TopicPartitionChannel createMockChannelWithNonEmptyStatus() {
method createMockChannelWithNonEmptyStatus (line 325) | private TopicPartitionChannel createMockChannelWithNonEmptyStatus(fina...
method createMockChannelWithEmptyStatus (line 341) | private TopicPartitionChannel createMockChannelWithEmptyStatus() {
class MockTelemetryClient (line 358) | static class MockTelemetryClient implements Telemetry {
method addLogToBatch (line 364) | @Override
method close (line 371) | @Override
method sendBatchAsync (line 379) | @Override
method postProcess (line 391) | @Override
method getSentTelemetryData (line 394) | LinkedList<TelemetryData> getSentTelemetryData() {
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/v2/AppendRowWithFallbackPolicyTest.java
class AppendRowWithFallbackPolicyTest (line 16) | public class AppendRowWithFallbackPolicyTest {
method setUp (line 20) | @BeforeEach
method shouldReturnChannelOnFirstAttemptSuccess (line 25) | @Test
method shouldThrowBackpressureExceptionOnRetryableException (line 38) | @Test
method shouldThrowBackpressureExceptionForAllRetryableErrorCodes (line 64) | @Test
method assertThrowsBackpressureException (line 79) | private void assertThrowsBackpressureException(String errorCode) {
method shouldFallbackOnNonRetryableSFException (line 99) | @Test
method shouldNotRetryNorFallbackOnNonSFException (line 124) | @Test
method failingFallback (line 147) | private AppendRowWithFallbackPolicy.FallbackSupplierWithException fail...
method countingFallbackSupplier (line 153) | private AppendRowWithFallbackPolicy.FallbackSupplierWithException coun...
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/v2/BackpressureExceptionTest.java
class BackpressureExceptionTest (line 12) | public class BackpressureExceptionTest {
method shouldWrapSFExceptionWithCorrectMessage (line 14) | @Test
method shouldRecognizeReceiverSaturatedAsRetryable (line 27) | @Test
method shouldRecognizeMemoryThresholdExceededAsRetryable (line 36) | @Test
method shouldRecognizeMemoryThresholdExceededInContainerAsRetryable (line 45) | @Test
method shouldRecognizeHttpRetryableClientErrorAsRetryable (line 55) | @Test
method shouldRejectNonRetryableSFException (line 64) | @Test
method shouldRejectNonSFException (line 73) | @Test
method shouldRejectNullException (line 82) | @Test
method shouldRejectConstructionWithNonRetryableSFException (line 88) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/v2/ClientRecreationExceptionTest.java
class ClientRecreationExceptionTest (line 12) | public class ClientRecreationExceptionTest {
method shouldWrapSFExceptionWithCorrectMessage (line 14) | @Test
method shouldRecognizeInvalidClientError (line 24) | @Test
method shouldRecognizeSfApiPipeFailedOverError (line 32) | @Test
method shouldRecognizeClosedClientError (line 40) | @Test
method shouldNotRecognizeBackpressureErrors (line 48) | @Test
method shouldNotRecognizeChannelLevelErrors (line 58) | @Test
method shouldNotRecognizeOtherSFException (line 68) | @Test
method shouldNotRecognizeNonSFException (line 75) | @Test
method shouldNotRecognizeNull (line 82) | @Test
method shouldRejectConstructionWithNonClientInvalidSFException (line 87) | @Test
method shouldRejectConstructionWithBackpressureSFException (line 95) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/v2/SnowpipeStreamingPartitionChannelTest.java
class SnowpipeStreamingPartitionChannelTest (line 64) | class SnowpipeStreamingPartitionChannelTest {
method setUp (line 82) | @BeforeEach
method tearDown (line 101) | @AfterEach
method shouldNotCloseChannelOnFirstOpen (line 106) | @Test
method shouldCloseOpenChannelBeforeReopening (line 117) | @Test
method closeChannelAsyncCancelsInitializationBeforeChannelOpens (line 139) | @Test
method reopenChannelRecoversAfterFailedAsyncInitialization (line 165) | @Test
method reopenChannelClosesOldChannelWhenAsyncInitSucceeded (line 192) | @Test
method insertRecordThrowsBackpressureExceptionOnRetryableError (line 214) | @Test
method isInitializingReturnsTrueWhileChannelFutureIsPending (line 238) | @Test
method channelInvalidationRecovery_taskSurvivesAndContinuesIngesting (line 260) | @Test
method channelInvalidation_stopsReopeningAfterMaxConsecutiveRecoveries (line 294) | @Test
method buildValidRecord (line 322) | private SinkRecord buildValidRecord(long offset) {
method createPartitionChannel (line 334) | private SnowpipeStreamingPartitionChannel createPartitionChannel() {
method parseOffsetToken_nullReturnsNoOffset (line 375) | @Test
method parseOffsetToken_validToken (line 382) | @Test
method parseOffsetToken_invalidTokenThrows (line 392) | @Test
method createValidationEnabledChannel (line 409) | private SnowpipeStreamingPartitionChannel createValidationEnabledChannel(
method validationEnabled_validRecord_insertsSuccessfully (line 461) | @Test
method validationEnabled_extraColumn_triggersSchemaEvolution (line 474) | @Test
method validationEnabled_schemaEvolutionDisabled_structuralErrorRoutesToDlq (line 489) | @Test
method validationEnabled_describeTableFails_disablesValidation (line 504) | @Test
method validationEnabled_notNullColumn_detectsMissingValue (line 555) | @Test
method validationEnabled_multipleExtraColumns_passesRawColumnNames (line 575) | @Test
method validationEnabled_identityColumnMissing_insertsSuccessfully (line 608) | @Test
method validationEnabled_defaultNotNullColumnMissing_insertsSuccessfully (line 627) | @Test
method createPartitionChannelWithMigration (line 646) | private SnowpipeStreamingPartitionChannel createPartitionChannelWithMi...
method migration_skip_doesNotConsultSsv1 (line 691) | @Test
method migration_bestEffort_usesSsv1OffsetWhenSsv2HasNone (line 703) | @Test
method migration_bestEffort_proceedsWhenSsv1NotFound (line 719) | @Test
method migration_bestEffort_proceedsWhenSsv1HasNoOffset (line 733) | @Test
method migration_bestEffort_ignoresSsv1WhenSsv2HasOffset (line 747) | @Test
method migration_strict_usesSsv1OffsetWhenFound (line 788) | @Test
method migration_strict_throwsWhenSsv1NotFound (line 803) | @Test
method migration_strict_proceedsWhenSsv1HasNoOffset (line 816) | @Test
method migration_ssv2OpenFails_doesNotConsultSsv1 (line 831) | @Test
method migration_systemFunctionFails_propagatesException (line 848) | @Test
method migration_bestEffort_consultsSsv1DuringReopenChannel (line 866) | @Test
class TrackingIngestClientSupplier (line 901) | static class TrackingIngestClientSupplier {
method getCloseCallCount (line 912) | int getCloseCallCount() {
method getTotalChannelsCreated (line 916) | int getTotalChannelsCreated() {
method setThrowOnOffsetToken (line 920) | void setThrowOnOffsetToken(boolean throwOnOffsetToken) {
method setThrowOnAppendRow (line 924) | void setThrowOnAppendRow(boolean throwOnAppendRow) {
method setThrowOnOpenChannel (line 928) | void setThrowOnOpenChannel(boolean throwOnOpenChannel) {
method setRetryableAppendRowFailures (line 932) | void setRetryableAppendRowFailures(int count) {
method setNonRetryableAppendRowFailures (line 936) | void setNonRetryableAppendRowFailures(int count) {
method setBlockOnOpenChannel (line 940) | void setBlockOnOpenChannel(CountDownLatch latch) {
method incrementCloseCallCount (line 944) | void incrementCloseCallCount() {
method incrementChannelsCreated (line 948) | int incrementChannelsCreated() {
class TrackingStreamingIngestClient (line 954) | static class TrackingStreamingIngestClient implements SnowflakeStreami...
method TrackingStreamingIngestClient (line 961) | TrackingStreamingIngestClient(
method openChannel (line 967) | @Override
method openChannel (line 1005) | @Override
method close (line 1010) | @Override
method close (line 1013) | @Override
method initiateFlush (line 1019) | @Override
method dropChannel (line 1022) | @Override
method getLatestCommittedOffsetTokens (line 1027) | @Override
method getChannelStatus (line 1032) | @Override
method isClosed (line 1044) | @Override
method waitForFlush (line 1049) | @Override
method getDBName (line 1054) | @Override
method getSchemaName (line 1059) | @Override
method getPipeName (line 1064) | @Override
method getClientName (line 1069) | @Override
class TrackingStreamingIngestChannel (line 1076) | static class TrackingStreamingIngestChannel implements SnowflakeStream...
method TrackingStreamingIngestChannel (line 1083) | TrackingStreamingIngestChannel(
method getDBName (line 1092) | @Override
method getSchemaName (line 1097) | @Override
method getPipeName (line 1102) | @Override
method getFullyQualifiedPipeName (line 1107) | @Override
method getFullyQualifiedChannelName (line 1112) | @Override
method isClosed (line 1117) | @Override
method getChannelName (line 1122) | @Override
method close (line 1127) | @Override
method close (line 1133) | @Override
method appendRow (line 1138) | @Override
method appendRows (line 1151) | @Override
method getLatestCommittedOffsetToken (line 1157) | @Override
method getChannelStatus (line 1165) | @Override
method waitForCommit (line 1185) | @Override
method waitForFlush (line 1191) | @Override
method initiateFlush (line 1196) | @Override
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/v2/StreamingClientManagerIT.java
class StreamingClientManagerIT (line 19) | public class StreamingClientManagerIT {
method setUp (line 29) | @BeforeEach
method tearDown (line 50) | @AfterEach
method testGetClient_FirstTime_CreatesNewClient (line 60) | @Test
method testGetClient_SamePipeName_ReturnsExistingClient (line 68) | @Test
method testGetClient_DifferentPipeNames_CreatesDistinctClients (line 82) | @Test
method testGetClient_AfterClientClosed_CreatesNewClient (line 93) | @Test
method testClose_ExistingPipe_ClosesAndRemovesClient (line 109) | @Test
method testClose_NonExistentPipe_DoesNotThrow (line 122) | @Test
method testClose_MultipleClients_ClosesAllClients (line 127) | @Test
method testProvider_ReuseAfterPartialClose_WorksCorrectly (line 137) | @Test
method getClient (line 161) | private SnowflakeStreamingIngestClient getClient(String task, String p...
method closeTaskClients (line 171) | private void closeTaskClients(String task) {
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientPoolTest.java
class StreamingClientPoolTest (line 33) | class StreamingClientPoolTest {
method setUp (line 38) | @BeforeEach
method tearDown (line 45) | @AfterEach
class RefCountedClientTest (line 50) | @Nested
method taskTracking (line 53) | @Test
method clientFuture_returns_client_on_success (line 80) | @Test
method clientFuture_exposes_original_exception_on_failure (line 90) | @Test
method clientFuture_wraps_checked_exception_in_CompletionException (line 109) | @Test
method close_calls_close_on_client (line 121) | @Test
class RefCountedClientTestHarness (line 138) | class RefCountedClientTestHarness {
method RefCountedClientTestHarness (line 141) | RefCountedClientTestHarness() {
class PoolTest (line 154) | @Nested
method setUp (line 160) | @BeforeEach
method tearDownPool (line 167) | @AfterEach
method getClient (line 172) | private SnowflakeStreamingIngestClient getClient(String taskId, Stri...
method getClient_creates_client_for_new_pipe (line 178) | @Test
method getClient_reuses_client_for_same_pipe (line 188) | @Test
method getClient_returns_different_clients_for_different_pipes (line 205) | @Test
method getClientCountForTask_counts_only_that_tasks_pipes (line 221) | @Test
method closeTaskClients_removes_entry_when_last_task_released (line 236) | @Test
method closeTaskClients_keeps_client_when_other_tasks_remain (line 248) | @Test
method closeTaskClients_then_getClient_creates_new_client (line 262) | @Test
method closeTaskClients_for_unknown_task_does_not_throw (line 280) | @Test
method getClient_removes_entry_on_failure_and_rethrows (line 285) | @Test
method getClient_after_failure_retries_creation (line 298) | @Test
method recreateClient_retries_on_client_invalid_error (line 321) | @Test
method pool_threads_inherit_context_classloader_from_pool_creator (line 357) | @Test
method recreateClient_replaces_entry_and_preserves_tasks (line 394) | @Test
method recreateClient_closes_old_client (line 428) | @Test
method recreateClient_creates_fresh_entry_and_registers_task_when_no_entry_exists (line 452) | @Test
method recreateClient_noop_if_client_already_replaced (line 481) | @Test
method recreateClient_then_getClient_returns_new_client (line 520) | @Test
method recreateClient_concurrent_callers_only_creates_once (line 547) | @Test
method getClient_parallel_for_different_pipes_creates_concurrently (line 610) | @Test
method setSupplierReturning (line 645) | private void setSupplierReturning(SnowflakeStreamingIngestClient clien...
method setSupplierThrowing (line 650) | private void setSupplierThrowing(RuntimeException exception) {
method setSupplierThrowingChecked (line 657) | @SuppressWarnings("unchecked")
method sneakyThrow (line 669) | @SuppressWarnings("unchecked")
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientPoolsTest.java
class StreamingClientPoolsTest (line 16) | class StreamingClientPoolsTest {
method setUp (line 22) | @BeforeEach
method tearDown (line 30) | @AfterEach
method getClient_unwraps_CompletionException_and_throws_original_RuntimeException (line 37) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/streaming/v2/service/PartitionChannelManagerTest.java
class PartitionChannelManagerTest (line 25) | class PartitionChannelManagerTest {
method setUp (line 34) | @BeforeEach
method makeChannelNameConcatenatesWithUnderscores (line 55) | @Test
method startPartitionsRegistersChannelsInMap (line 64) | @Test
method startPartitionsPassesCorrectNamesToBuilder (line 78) | @Test
method startPartitionsUsesTopicToTableMapForTableName (line 106) | @Test
method getChannelByTopicPartitionReturnsChannel (line 136) | @Test
method getChannelByStringReturnsChannel (line 147) | @Test
method getChannelReturnsEmptyForUnknownPartition (line 159) | @Test
method getChannelByStringReturnsEmptyForUnknownName (line 165) | @Test
method closeRemovesOnlyRequestedPartitions (line 172) | @Test
method closeCallsCloseChannelAsyncOnRequestedPartitions (line 187) | @Test
method closeHandlesUnknownPartitionsGracefully (line 199) | @Test
method closeWithEmptyCollectionIsNoop (line 211) | @Test
method closeAllClosesAllChannelsAndClearsMap (line 224) | @Test
method closeAllOnEmptyManagerIsNoop (line 237) | @Test
method waitForAllChannelsCallsFlushOnEveryChannel (line 245) | @Test
method waitForAllChannelsOnEmptyManagerIsNoop (line 257) | @Test
method startSinglePartition (line 265) | private void startSinglePartition(TopicPartition topicPartition) {
method startPartitions (line 269) | private void startPartitions(TopicPartition... partitions) {
method testConfig (line 278) | private static SinkTaskConfig testConfig(Map<String, String> topicToTa...
FILE: src/test/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryChannelStatusTest.java
class SnowflakeTelemetryChannelStatusTest (line 19) | public class SnowflakeTelemetryChannelStatusTest {
method testRegisterAndUnregisterJmxMetrics (line 24) | @Test
method testDisabledJmx (line 55) | @Test
method testValidationFailureCountInDumpTo (line 81) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryServiceTest.java
class SnowflakeTelemetryServiceTest (line 37) | public class SnowflakeTelemetryServiceTest {
method setUp (line 46) | @BeforeEach
method testReportKafkaConnectStart (line 52) | @ParameterizedTest
method testReportKafkaConnectStart_clientValidationExplicitlySet (line 99) | @Test
method testReportKafkaConnectStop (line 116) | @ParameterizedTest
method testReportKafkaConnectFatalError (line 147) | @ParameterizedTest
method testReportKafkaConnectFatalErrorWithChannelContext (line 181) | @Test
method testReportKafkaPartitionUsage (line 201) | @ParameterizedTest
method testReportKafkaPartitionStart (line 333) | @ParameterizedTest
method createConnectorConfig (line 380) | private Map<String, String> createConnectorConfig() {
method createSnowflakeTelemetryService (line 384) | private SnowflakeTelemetryService createSnowflakeTelemetryService(
method sentTelemetryDataField (line 397) | private String sentTelemetryDataField(String field) {
method validateKeyAndValueConverter (line 404) | private void validateKeyAndValueConverter(JsonNode dataNode) {
class MockTelemetryClient (line 413) | public static class MockTelemetryClient implements Telemetry {
method MockTelemetryClient (line 421) | public MockTelemetryClient() {
method addLogToBatch (line 426) | @Override
method close (line 431) | @Override
method sendBatchAsync (line 437) | @Override
method postProcess (line 442) | @Override
method getSentTelemetryData (line 445) | public LinkedList<TelemetryData> getSentTelemetryData() {
FILE: src/test/java/com/snowflake/kafka/connector/internal/validation/DataValidationUtilTest.java
class DataValidationUtilTest (line 67) | public class DataValidationUtilTest {
method buildString (line 71) | private static String buildString(String str, int count) {
method expectErrorCodeAndMessage (line 79) | private void expectErrorCodeAndMessage(
method expectError (line 93) | private void expectError(ErrorCode expectedErrorCode, Runnable action) {
method testValidateAndParseDate (line 97) | @Test
method testValidateAndParseTime (line 176) | @Test
method testValidateAndParseTimestamp (line 277) | @Test
method testValidateAndParseTimestamp_integerEpoch (line 396) | @Test
method testValidateAndParseBigDecimal (line 423) | @Test
method testValidateAndParseString (line 484) | @Test
method testValidateAndParseVariant (line 539) | @Test
method assertJson (line 760) | private void assertJson(String colType, String expectedValue, Object v...
method assertJson (line 764) | private void assertJson(
method testValidateAndParseArray (line 786) | @Test
method testValidateAndParseObject (line 862) | @Test
method testValidateDuplicateKeys (line 968) | @Test
method testTooLargeVariant (line 997) | @Test
method testTooLargeMultiByteSemiStructuredValues (line 1011) | @Test
method testValidVariantType (line 1039) | @Test
method testValidateAndParseBinary (line 1195) | @Test
method testValidateAndParseReal (line 1275) | @Test
method testValidateAndParseBoolean (line 1301) | @Test
method testExceptionMessages (line 1345) | @Test
method testValidateAndParseVariantAsObject_jsonObject (line 1556) | @Test
method testValidateAndParseVariantAsObject_jsonArray (line 1566) | @Test
method testValidateAndParseVariantAsObject_primitive (line 1573) | @Test
method testValidateAndParseVariantAsObject_missingNode (line 1581) | @Test
method testValidateAndParseVariantAsObject_invalidJson (line 1587) | @Test
method testValidateAndParseVariantAsObject_nativePassthrough (line 1594) | @Test
method testValidateAndParseArrayAsList_jsonArray (line 1604) | @Test
method testValidateAndParseArrayAsList_nonArrayWrapped (line 1610) | @Test
method testValidateAndParseArrayAsList_nativeList (line 1617) | @Test
method testValidateAndParseArrayAsList_invalidJson (line 1624) | @Test
method testValidateAndFormatTimestamp_integerEpochNtz (line 1633) | @Test
method testValidateAndFormatTimestamp_longEpochNtz (line 1640) | @Test
method testValidateAndFormatTimestamp_integerEpochLtz (line 1646) | @Test
method testValidateAndFormatTimestamp_stringPassthrough (line 1652) | @Test
method testValidateAndFormatTimestamp_invalidString (line 1661) | @Test
method readTree (line 1669) | private JsonNode readTree(String value) {
FILE: src/test/java/com/snowflake/kafka/connector/internal/validation/RowValidatorTest.java
class RowValidatorTest (line 18) | public class RowValidatorTest {
method testColumnSchemaParseNumber (line 22) | @Test
method testColumnSchemaParseVarchar (line 35) | @Test
method testColumnSchemaParseVarcharSmall (line 49) | @Test
method testColumnSchemaParseTimestampNtz (line 61) | @Test
method testColumnSchemaParseBinary (line 72) | @Test
method testColumnSchemaParseVariant (line 83) | @Test
method testColumnSchemaParseArray (line 93) | @Test
method testColumnSchemaParseBoolean (line 102) | @Test
method testColumnSchemaParseUnknownType (line 111) | @Test
method testValidationResultValid (line 122) | @Test
method testValidationResultTypeError (line 132) | @Test
method testValidationResultStructuralError (line 144) | @Test
method testValidationResultEmptyStructuralError (line 163) | @Test
method testValidateRowValid (line 176) | @Test
method testValidateRowExtraColumn (line 192) | @Test
method testValidateRowMissingNotNull (line 209) | @Test
method testValidateRowNullInNotNull (line 227) | @Test
method testValidateRowInvalidType (line 245) | @Test
method testValidateRowMatchingColumnName (line 262) | @Test
method testValidateSchemaUnsupportedType (line 279) | @Test
method testValidateSchemaCollatedColumn (line 289) | @Test
method testValidateSchemaValid (line 308) | @Test
method testValidateRowEmptyColumnName (line 319) | @Test
method testValidateRowWhitespaceColumnName (line 336) | @Test
method testStructuredObjectTypeRejected (line 360) | @Test
method testStructuredArrayTypeRejected (line 375) | @Test
method testUnstructuredObjectTypeAccepted (line 387) | @Test
method testUnstructuredArrayTypeAccepted (line 397) | @Test
method testNestedTypeParsingWithLastIndexOf (line 411) | @Test
method testMissingNotNullColumnTriggersSchemaEvolution (line 428) | @Test
method testNullNotNullColumnTriggersSchemaEvolution (line 457) | @Test
method testNullValueInNullableColumnIsValid (line 486) | @Test
method testNullableColumnWithValue (line 511) | @Test
method testVarcharLargeValueNoOverflow (line 533) | @Test
method testValidateRow_missingIdentityColumn_passes (line 549) | @Test
method testValidateRow_missingDefaultNotNullColumn_passes (line 577) | @Test
method testValidateRow_missingRegularNotNullColumn_stillFails (line 605) | @Test
method testValidateRow_mixedServerFilledAndRegularColumns (line 634) | @Test
method testValidateRow_explicitValueForIdentityColumn_passes (line 693) | @Test
method testColumnSchema_isServerFilled (line 724) | @Test
method testValidateRowBinaryHexStringConvertedToByteArray (line 768) | @Test
method testValidateRowBinaryByteArrayPassthrough (line 799) | @Test
method testValidateRowBinaryEmptyHexString (line 828) | @Test
method testValidateRowBinaryOddLengthHexStringFails (line 856) | @Test
method testValidateRowBinaryLowercaseHexString (line 884) | @Test
method testValidateRowVarcharMapSerializedToJson (line 920) | @Test
method testValidateRowVarcharListSerializedToJson (line 940) | @Test
method testValidateRowVarcharNestedMapSerializedToJson (line 957) | @Test
method testValidateRowVarcharMapExceedsLengthLimit (line 979) | @Test
method testValidateRowBooleanIntegerZeroNormalizedToFalse (line 1004) | @Test
method testValidateRowBooleanIntegerOneNormalizedToTrue (line 1021) | @Test
method testValidateRowBooleanNativeBooleanPassthrough (line 1039) | @Test
method testValidateRowBooleanStringTokensNormalizedToBoolean (line 1059) | @Test
method testValidateRowBooleanInvalidInputProducesTypeError (line 1096) | @Test
method testValidateRowBooleanNonZeroOneIntegerProducesTypeError (line 1122) | @Test
method testValidateRowVariantJsonObjectStringNormalizedToMap (line 1147) | @Test
method testValidateRowVariantJsonArrayStringNormalizedToList (line 1168) | @Test
method testValidateRowVariantNativeObjectPassthrough (line 1185) | @Test
method testValidateRowVariantInvalidJsonStringProducesTypeError (line 1202) | @Test
method testValidateRowArrayJsonStringNormalizedToList (line 1223) | @Test
method testValidateRowArrayNonArrayJsonStringWrappedInList (line 1243) | @Test
method testValidateRowArrayNativeListPassthrough (line 1260) | @Test
method testValidateRowArrayInvalidJsonStringProducesTypeError (line 1276) | @Test
method testValidateRowObjectInvalidJsonStringProducesTypeError (line 1294) | @Test
method testValidateRowObjectArrayJsonStringProducesTypeError (line 1310) | @Test
method testValidateRowObjectValidJsonStringAccepted (line 1326) | @Test
method testValidateRowBinaryInvalidHexStringFails (line 1340) | @Test
method testValidateRowTimestampNtzIntegerEpochNormalized (line 1374) | @Test
method testValidateRowTimestampNtzLongEpochNormalized (line 1392) | @Test
method testValidateRowTimestampNtzStringPassthrough (line 1409) | @Test
method testValidateRowTimestampLtzIntegerEpochNormalized (line 1424) | @Test
method testValidateRowTimestampNtzInvalidStringRejects (line 1441) | @Test
method mockDescribeTableRow (line 1458) | private ResultSet mockDescribeTableRow(String name, String type, Strin...
method createColumnSchema (line 1467) | private ColumnSchema createColumnSchema(
method createTimestampColumnSchema (line 1491) | private ColumnSchema createTimestampColumnSchema(String name, ColumnLo...
FILE: src/test/java/com/snowflake/kafka/connector/internal/validation/SqlIdentifierNormalizerTest.java
class SqlIdentifierNormalizerTest (line 9) | public class SqlIdentifierNormalizerTest {
method testUnquotedIdentifiers (line 11) | @ParameterizedTest
method testQuotedIdentifiers (line 25) | @ParameterizedTest
method testEmptyString (line 40) | @Test
method testSingleChar (line 45) | @Test
method testSingleQuote (line 50) | @Test
method testEmptyQuotedIdentifier (line 56) | @Test
method testCacheReturnsSameResult (line 61) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/mock/MockResultSetForSizeTest.java
class MockResultSetForSizeTest (line 11) | public class MockResultSetForSizeTest implements ResultSet {
method MockResultSetForSizeTest (line 15) | public MockResultSetForSizeTest(int size) {
method next (line 20) | @Override
method close (line 29) | @Override
method wasNull (line 32) | @Override
method getString (line 37) | @Override
method getBoolean (line 42) | @Override
method getByte (line 47) | @Override
method getShort (line 52) | @Override
method getInt (line 57) | @Override
method getLong (line 62) | @Override
method getFloat (line 67) | @Override
method getDouble (line 72) | @Override
method getBigDecimal (line 77) | @Override
method getBytes (line 82) | @Override
method getDate (line 87) | @Override
method getTime (line 92) | @Override
method getTimestamp (line 97) | @Override
method getAsciiStream (line 102) | @Override
method getUnicodeStream (line 107) | @Override
method getBinaryStream (line 112) | @Override
method getString (line 117) | @Override
method getBoolean (line 122) | @Override
method getByte (line 127) | @Override
method getShort (line 132) | @Override
method getInt (line 137) | @Override
method getLong (line 142) | @Override
method getFloat (line 147) | @Override
method getDouble (line 152) | @Override
method getBigDecimal (line 157) | @Override
method getBytes (line 162) | @Override
method getDate (line 167) | @Override
method getTime (line 172) | @Override
method getTimestamp (line 177) | @Override
method getAsciiStream (line 182) | @Override
method getUnicodeStream (line 187) | @Override
method getBinaryStream (line 192) | @Override
method getWarnings (line 197) | @Override
method clearWarnings (line 202) | @Override
method getCursorName (line 205) | @Override
method getMetaData (line 210) | @Override
method getObject (line 215) | @Override
method getObject (line 220) | @Override
method findColumn (line 225) | @Override
method getCharacterStream (line 230) | @Override
method getCharacterStream (line 235) | @Override
method getBigDecimal (line 240) | @Override
method getBigDecimal (line 245) | @Override
method isBeforeFirst (line 250) | @Override
method isAfterLast (line 255) | @Override
method isFirst (line 260) | @Override
method isLast (line 265) | @Override
method beforeFirst (line 270) | @Override
method afterLast (line 273) | @Override
method first (line 276) | @Override
method last (line 281) | @Override
method getRow (line 286) | @Override
method absolute (line 291) | @Override
method relative (line 296) | @Override
method previous (line 301) | @Override
method setFetchDirection (line 306) | @Override
method getFetchDirection (line 309) | @Override
method setFetchSize (line 314) | @Override
method getFetchSize (line 317) | @Override
method getType (line 322) | @Override
method getConcurrency (line 327) | @Override
method rowUpdated (line 332) | @Override
method rowInserted (line 337) | @Override
method rowDeleted (line 342) | @Override
method updateNull (line 347) | @Override
method updateBoolean (line 350) | @Override
method updateByte (line 353) | @Override
method updateShort (line 356) | @Override
method updateInt (line 359) | @Override
method updateLong (line 362) | @Override
method updateFloat (line 365) | @Override
method updateDouble (line 368) | @Override
method updateBigDecimal (line 371) | @Override
method updateString (line 374) | @Override
method updateBytes (line 377) | @Override
method updateDate (line 380) | @Override
method updateTime (line 383) | @Override
method updateTimestamp (line 386) | @Override
method updateAsciiStream (line 389) | @Override
method updateBinaryStream (line 393) | @Override
method updateCharacterStream (line 397) | @Override
method updateObject (line 401) | @Override
method updateObject (line 405) | @Override
method updateNull (line 408) | @Override
method updateBoolean (line 411) | @Override
method updateByte (line 414) | @Override
method updateShort (line 417) | @Override
method updateInt (line 420) | @Override
method updateLong (line 423) | @Override
method updateFloat (line 426) | @Override
method updateDouble (line 429) | @Override
method updateBigDecimal (line 432) | @Override
method updateString (line 435) | @Override
method updateBytes (line 438) | @Override
method updateDate (line 441) | @Override
method updateTime (line 444) | @Override
method updateTimestamp (line 447) | @Override
method updateAsciiStream (line 450) | @Override
method updateBinaryStream (line 454) | @Override
method updateCharacterStream (line 458) | @Override
method updateObject (line 462) | @Override
method updateObject (line 466) | @Override
method insertRow (line 469) | @Override
method updateRow (line 472) | @Override
method deleteRow (line 475) | @Override
method refreshRow (line 478) | @Override
method cancelRowUpdates (line 481) | @Override
method moveToInsertRow (line 484) | @Override
method moveToCurrentRow (line 487) | @Override
method getStatement (line 490) | @Override
method getObject (line 495) | @Override
method getRef (line 501) | @Override
method getBlob (line 506) | @Override
method getClob (line 511) | @Override
method getArray (line 516) | @Override
method getObject (line 521) | @Override
method getRef (line 527) | @Override
method getBlob (line 532) | @Override
method getClob (line 537) | @Override
method getArray (line 542) | @Override
method getDate (line 547) | @Override
method getDate (line 552) | @Override
method getTime (line 557) | @Override
method getTime (line 562) | @Override
method getTimestamp (line 567) | @Override
method getTimestamp (line 572) | @Override
method getURL (line 577) | @Override
method getURL (line 582) | @Override
method updateRef (line 587) | @Override
method updateRef (line 590) | @Override
method updateBlob (line 593) | @Override
method updateBlob (line 596) | @Override
method updateClob (line 599) | @Override
method updateClob (line 602) | @Override
method updateArray (line 605) | @Override
method updateArray (line 608) | @Override
method getRowId (line 611) | @Override
method getRowId (line 616) | @Override
method updateRowId (line 621) | @Override
method updateRowId (line 624) | @Override
method getHoldability (line 627) | @Override
method isClosed (line 632) | @Override
method updateNString (line 637) | @Override
method updateNString (line 640) | @Override
method updateNClob (line 643) | @Override
method updateNClob (line 646) | @Override
method getNClob (line 649) | @Override
method getNClob (line 654) | @Override
method getSQLXML (line 659) | @Override
method getSQLXML (line 664) | @Override
method updateSQLXML (line 669) | @Override
method updateSQLXML (line 672) | @Override
method getNString (line 675) | @Override
method getNString (line 680) | @Override
method getNCharacterStream (line 685) | @Override
method getNCharacterStream (line 690) | @Override
method updateNCharacterStream (line 695) | @Override
method updateNCharacterStream (line 699) | @Override
method updateAsciiStream (line 703) | @Override
method updateBinaryStream (line 707) | @Override
method updateCharacterStream (line 711) | @Override
method updateAsciiStream (line 715) | @Override
method updateBinaryStream (line 719) | @Override
method updateCharacterStream (line 723) | @Override
method updateBlob (line 727) | @Override
method updateBlob (line 731) | @Override
method updateClob (line 735) | @Override
method updateClob (line 739) | @Override
method updateNClob (line 743) | @Override
method updateNClob (line 747) | @Override
method updateNCharacterStream (line 751) | @Override
method updateNCharacterStream (line 754) | @Override
method updateAsciiStream (line 758) | @Override
method updateBinaryStream (line 761) | @Override
method updateCharacterStream (line 764) | @Override
method updateAsciiStream (line 767) | @Override
method updateBinaryStream (line 771) | @Override
method updateCharacterStream (line 775) | @Override
method updateBlob (line 779) | @Override
method updateBlob (line 783) | @Override
method updateClob (line 787) | @Override
method updateClob (line 790) | @Override
method updateNClob (line 793) | @Override
method updateNClob (line 796) | @Override
method getObject (line 799) | @Override
method getObject (line 804) | @Override
method unwrap (line 809) | @Override
method isWrapperFor (line 814) | @Override
FILE: src/test/java/com/snowflake/kafka/connector/records/ConverterTest.java
class ConverterTest (line 36) | class ConverterTest {
method testConnectJsonConverter_MapInt64 (line 40) | @Test
method testConnectJsonConverter_MapBigDecimal (line 58) | @Test
method testConvertMapWithNestedValues (line 81) | @Test
method testConvertHeaders (line 106) | @Test
method testConvertKey (line 121) | @Test
method testConvertHeaders_WithSimpleHeaderConverter (line 136) | @SuppressWarnings("resource")
method testConvertHeaders_WithTimestampLogicalType (line 161) | @Test
method testConvertHeaders_WithDateLogicalType (line 178) | @Test
method testConvertStructWithAllTypes (line 193) | @Test
method testConvertValue_WithDefaultValue (line 253) | @Test
method testConvertReadOnlyByteBuffer (line 266) | @Test
method testConvertToMap_WithInvalidInput_ThrowsException (line 281) | @Test
method testConvertKey_WithTypeMismatch_ThrowsException (line 289) | @Test
method testConvertDecimal (line 297) | @Test
method testConvertDecimal_ExceedsPrecision_ReturnsString (line 311) | @Test
method testConvertTime (line 325) | @Test
method testConvertFloatSpecialValues (line 343) | @Test
method testConvertDoubleSpecialValues (line 366) | @Test
method testConvertToMap_TimestampNearEpoch_ReturnsIsoString (line 402) | @Test
method testConvertNullValue (line 423) | @Test
FILE: src/test/java/com/snowflake/kafka/connector/records/SnowflakeSinkRecordTest.java
class SnowflakeSinkRecordTest (line 35) | class SnowflakeSinkRecordTest {
method testValidRecord_WithJsonMap (line 43) | @Test
method testValidRecord_WithStruct (line 66) | @Test
method testTombstoneRecord (line 123) | @Test
method testBrokenRecord_WithInvalidKeySchema (line 142) | @Test
method testBrokenRecord_WithInvalidValue (line 162) | @Test
method testGetContentWithMetadata_WhenIncludeMetadataTrue (line 182) | @Test
method testGetContentWithMetadata_WhenIncludeMetadataFalse (line 194) | @Test
method testMetadataContainsKey (line 205) | @Test
method testFullMetadataFields (line 224) | @Test
method testMetadataWithTimestampType (line 264) | @ParameterizedTest(name = "timestamp type {0} should produce metadata ...
method testMetadataWithHeaders (line 287) | @Test
method testMetadataWithComplexHeaders (line 311) | @Test
method testContentWithArray (line 333) | @Test
method testContentWithEmptyArray (line 346) | @Test
method testEmptyContentWithMetadata (line 358) | @Test
method testContentWithKeyValue (line 371) | @Test
method testConnectorPushTime_WhenDisabled_NotPresent (line 386) | @Test
method testMetadata_WhenCreateTimeDisabled_NotPresent (line 401) | @Test
method testMetadata_WhenTopicDisabled_NotPresent (line 430) | @Test
method testMetadata_WhenOffsetAndPartitionDisabled_NotPresent (line 456) | @Test
method testMetadata_WhenAllFieldsDisabled_EmptyMetadata (line 483) | @Test
method testMetadata_WhenAllFieldsExplicitlyDisabled_ContentWithMetadataHasNoMetadataColumn (line 520) | @Test
method testTimestamp_WhenNoTimestampType_NotPresent (line 560) | @Test
method testLegacyMode_WithTimestampStruct_JacksonCanSerialize (line 575) | @Test
method testLegacyMode_WithJsonMap_WrapsInRecordContent (line 605) | @Test
method testLegacyMode_WithPlainString_WrapsInRecordContent (line 625) | @Test
method testLegacyMode_WithByteArray_WrapsInRecordContent (line 641) | @Test
method testLegacyMode_TombstoneStillWorks (line 658) | @Test
method testSchematizedMode_WithPlainString_StillBroken (line 671) | @Test
method testNormalizationEnabled_UppercasesColumnNames (line 684) | @Test
method testNormalizationDisabled_PreservesColumnNames (line 703) | @Test
method testNormalizationEnabled_QuotedIdentifierPreservesCase (line 722) | @Test
method createJsonConverter (line 756) | private static JsonConverter createJsonConverter() {
method timestampTypeTestCases (line 762) | private static Stream<Arguments> timestampTypeTestCases() {
method toConnectData (line 768) | private SchemaAndValue toConnectData(String jsonPayload) {
method createMetadataConfigWithAll (line 772) | private SnowflakeMetadataConfig createMetadataConfigWithAll() {
method createRecordFromJson (line 778) | private SnowflakeSinkRecord createRecordFromJson(String json, Snowflak...
method createSinkRecordWithHeaders (line 787) | private SinkRecord createSinkRecordWithHeaders(
FILE: src/test/java/com/snowflake/kafka/connector/streaming/iceberg/BaseIcebergIT.java
class BaseIcebergIT (line 13) | public class BaseIcebergIT {
method setup (line 17) | @BeforeAll
method teardown (line 22) | @AfterAll
method createIcebergTableWithColumnClause (line 27) | protected static void createIcebergTableWithColumnClause(
method doExecuteQueryWithParameter (line 41) | private static void doExecuteQueryWithParameter(String query, String t...
method dropIcebergTable (line 45) | protected static void dropIcebergTable(String tableName) {
method select (line 50) | protected static <T> T select(
FILE: src/test/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergIngestionIT.java
class IcebergIngestionIT (line 29) | public abstract class IcebergIngestionIT extends BaseIcebergIT {
method createIcebergTable (line 43) | protected void createIcebergTable() {}
method setUp (line 45) | @BeforeEach
method tearDown (line 70) | @AfterEach
method waitForOffset (line 78) | protected void waitForOffset(long targetOffset) throws Exception {
method createKafkaRecord (line 82) | protected SinkRecord createKafkaRecord(String jsonString, long offset,...
method selectAllComplexJsonRecordFromRecordContent (line 117) | protected List<RecordWithMetadata<ComplexJsonRecord>>
FILE: src/test/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergIngestionIntoVariantIT.java
class IcebergIngestionIntoVariantIT (line 17) | public class IcebergIngestionIntoVariantIT extends IcebergIngestionIT {
method createIcebergTable (line 19) | @Override
method shouldInsertRecordsLegacyBagOfBits (line 25) | @Test
method assertRecordsInTable (line 42) | private void assertRecordsInTable(List<Long> expectedOffsets) {
FILE: src/test/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergIngestionNoSchemaEvolutionIT.java
class IcebergIngestionNoSchemaEvolutionIT (line 22) | public class IcebergIngestionNoSchemaEvolutionIT extends IcebergIngestio...
method createIcebergTable (line 58) | @Override
method prepareData (line 72) | private static Stream<Arguments> prepareData() {
method shouldInsertRecords (line 78) | @ParameterizedTest(name = "{0}")
method assertRecordsInTable (line 96) | private void assertRecordsInTable(List<Long> expectedOffsets) {
FILE: src/test/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergVersion.java
Condensed preview — 399 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,324K chars).
[
{
"path": ".githooks/pre-commit",
"chars": 1186,
"preview": "#!/usr/bin/env bash\n#\n# Git pre-commit hook that enforces the same formatting checks as CI:\n# 1. Java – google-java-f"
},
{
"path": ".github/CODEOWNERS",
"chars": 32,
"preview": "* @snowflakedb/streaming-ingest\n"
},
{
"path": ".github/actions/build-connector/action.yml",
"chars": 966,
"preview": "name: Build Connector\ndescription: Build the Snowflake Kafka Connector JAR/ZIP for a given platform\n\ninputs:\n platform:"
},
{
"path": ".github/actions/run-e2e-tests/action.yml",
"chars": 2553,
"preview": "name: Run E2E Tests\ndescription: Run Docker-based end-to-end tests for the Snowflake Kafka Connector\n\ninputs:\n platform"
},
{
"path": ".github/dependabot.yaml",
"chars": 449,
"preview": "# To get started with Dependabot version updates, you'll need to specify which\n# package ecosystems to update and where "
},
{
"path": ".github/scripts/decrypt_secret.sh",
"chars": 688,
"preview": "#!/bin/sh\n\n# Decrypt the file\n# mkdir $HOME/secrets\n# --batch to prevent interactive command --yes to assume \"yes\" for q"
},
{
"path": ".github/scripts/parse_java_test_reports.py",
"chars": 5607,
"preview": "#!/usr/bin/env python3\n\"\"\"\nParse Maven Surefire and Failsafe XML reports, append a Markdown summary to\nGITHUB_STEP_SUMMA"
},
{
"path": ".github/scripts/squid.conf",
"chars": 1127,
"preview": "acl SSL_ports port 443\nacl Safe_ports port 80 # http\nacl Safe_ports port 21 # ftp\nacl Safe_ports port "
},
{
"path": ".github/workflows/IntegrationTest.yml",
"chars": 3090,
"preview": "name: Kafka Connector Java Integration Tests\n\non:\n push:\n branches: [ master ]\n pull_request:\n branches: '**'\n\nj"
},
{
"path": ".github/workflows/build-apache-kafka-images.yml",
"chars": 1839,
"preview": "name: Build Apache Kafka Docker images\n\non:\n push:\n branches: [ master ]\n paths:\n - 'test/docker/Dockerfile."
},
{
"path": ".github/workflows/end-to-end-legacy.yml",
"chars": 2825,
"preview": "name: Kafka Connector end-to-end tests (legacy platforms)\n\n# Runs the core e2e suite on older Kafka platform versions.\n#"
},
{
"path": ".github/workflows/end-to-end-stress.yml",
"chars": 1157,
"preview": "name: Kafka Connector stress test\n\non:\n push:\n branches: [ master ]\n workflow_dispatch:\n\njobs:\n build_and_test:\n "
},
{
"path": ".github/workflows/end-to-end.yaml",
"chars": 2806,
"preview": "name: Kafka Connector end-to-end tests\n\non:\n push:\n branches: [ master ]\n pull_request:\n branches: ['**']\n work"
},
{
"path": ".github/workflows/formatting.yml",
"chars": 784,
"preview": "name: formatting\n\non:\n pull_request:\n push:\n branches:\n - master\n\njobs:\n java:\n runs-on: ubuntu-latest\n "
},
{
"path": ".github/workflows/semgrep.yml",
"chars": 283,
"preview": "---\nname: Run semgrep checks\n\non:\n pull_request:\n branches: [master]\n\npermissions:\n contents: read\n\njobs:\n run-sem"
},
{
"path": ".gitignore",
"chars": 286,
"preview": ".DS_Store\n.envrc\n\n# IDEs\n.idea/\n.settings/\n.claude/\n.cursor/\n.vscode/\n.project/\n\n# Python\n__pycache__\nvenv\n\n# Java\n.cach"
},
{
"path": ".java-version",
"chars": 3,
"preview": "11\n"
},
{
"path": "LICENSE",
"chars": 11355,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 3463,
"preview": "# `snowflake-kafka-connector`\n\n[](http://www.apache"
},
{
"path": "deploy.sh",
"chars": 1818,
"preview": "#!/bin/bash\n\n# exit on error\nset -e\n\nTHIS_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\nif [ -z \"$GPG_KEY_ID\""
},
{
"path": "format.sh",
"chars": 731,
"preview": "#!/usr/bin/env bash\n\nset -euo pipefail\nSCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\ncd \"$SCRIPT_DIR\"\n\n"
},
{
"path": "pom.xml",
"chars": 28133,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n ~ /*\n ~ * Copyright (c) 2019 - 2024 Snowflake Computing Inc. All rights "
},
{
"path": "pom_confluent.xml",
"chars": 35684,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!--\n ~ /*\n ~ * Copyright (c) 2019 - 2024 Snowflake Computing Inc. All rights "
},
{
"path": "profile.json.example",
"chars": 199,
"preview": "{\n \"user\": \"user name\",\n \"private_key\": \"private key\",\n \"host\": \"acountname.snowflakecomputing.com:443\",\n \"schema\": "
},
{
"path": "scripts/process_licenses.py",
"chars": 9588,
"preview": "#!/usr/bin/env python\n\n# This script processes licenses of 3rd party dependencies and stores them in the JAR. The rules "
},
{
"path": "src/main/java/com/snowflake/ingest/streaming/internal/TimestampWrapper.java",
"chars": 1964,
"preview": "package com.snowflake.ingest.streaming.internal;\n\nimport com.snowflake.kafka.connector.internal.validation.Power10Util;\n"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/ConnectorConfigTools.java",
"chars": 7016,
"preview": "/*\n * Copyright (c) 2019 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/ConnectorConfigValidator.java",
"chars": 249,
"preview": "package com.snowflake.kafka.connector;\n\nimport java.util.Map;\n\npublic interface ConnectorConfigValidator {\n\n /**\n * V"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/Constants.java",
"chars": 7792,
"preview": "package com.snowflake.kafka.connector;\n\npublic final class Constants {\n public static final String DEFAULT_PIPE_NAME_SU"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/DefaultConnectorConfigValidator.java",
"chars": 18225,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.ConnectorConfigTools.BehaviorOnNullV"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/SemanticVersion.java",
"chars": 2079,
"preview": "package com.snowflake.kafka.connector;\n\nimport java.util.Objects;\nimport java.util.regex.Matcher;\nimport java.util.regex"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/SnowflakeSinkTask.java",
"chars": 18083,
"preview": "/*\n * Copyright (c) 2019 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/SnowflakeSinkTaskAuthorizationExceptionTracker.java",
"chars": 2095,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/SnowflakeStreamingSinkConnector.java",
"chars": 12200,
"preview": "/*\n * Copyright (c) 2019 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/TopicToTableParser.java",
"chars": 3912,
"preview": "package com.snowflake.kafka.connector;\n\nimport java.util.ArrayList;\nimport java.util.LinkedHashMap;\nimport java.util.Lis"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/Utils.java",
"chars": 17910,
"preview": "/*\n * Copyright (c) 2024 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/config/AuthenticatorType.java",
"chars": 1584,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfi"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/config/CommaSeparatedKeyValueValidator.java",
"chars": 1592,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport org.apache.kafka.common.config.ConfigDef;\nimport org.apache.kafka."
},
{
"path": "src/main/java/com/snowflake/kafka/connector/config/ConnectorConfigDefinition.java",
"chars": 21035,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport static org.apache.kafka.common.config.ConfigDef.Importance.*;\nimpo"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/config/SinkTaskConfig.java",
"chars": 16664,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport com.google.auto.value.AutoValue;\nimport com.google.common.annotati"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/config/SnowflakeValidation.java",
"chars": 1004,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport java.util.Locale;\n\n/**\n * Determines the connector validation mode"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/config/TopicToTableValidator.java",
"chars": 818,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport com.snowflake.kafka.connector.TopicToTableParser;\nimport org.apach"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/dlq/KafkaRecordErrorReporter.java",
"chars": 664,
"preview": "package com.snowflake.kafka.connector.dlq;\n\nimport org.apache.kafka.connect.sink.ErrantRecordReporter;\nimport org.apache"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/CachingConfig.java",
"chars": 3473,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport com.snowflake.kafka.connector.Constants.KafkaConnectorConfigPara"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/CachingSnowflakeConnectionService.java",
"chars": 9533,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static java.util.concurrent.TimeUnit.MINUTES;\n\nimport com.google"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/DescribeTableRow.java",
"chars": 2390,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport java.util.Objects;\n\n/** Class representing a single row returned"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/InternalUtils.java",
"chars": 6599,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static org.apache.commons.lang3.StringUtils.isBlank;\n\nimport com"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/JdbcProperties.java",
"chars": 2555,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport java.util.Properties;\n\n/** Wrapper class for all snowflake jdbc "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/JdbcPropertyKeys.java",
"chars": 951,
"preview": "package com.snowflake.kafka.connector.internal;\n\n/**\n * Snowflake JDBC connection property key names. These match the of"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/KCLogger.java",
"chars": 3888,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport com.snowflake.kafka.connector.Utils;\nimport org.slf4j.Logger;\nim"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/PrivateKeyTool.java",
"chars": 3301,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static org.apache.commons.lang3.StringUtils.isBlank;\n\nimport jav"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionService.java",
"chars": 4994,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport com.snowflake.kafka.connector.internal.schemaevolution.ColumnInf"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionServiceFactory.java",
"chars": 2327,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport com.snowflake.kafka.connector.config.SinkTaskConfig;\nimport java"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/SnowflakeErrors.java",
"chars": 9616,
"preview": "/*\n * Copyright (c) 2019 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/SnowflakeKafkaConnectorException.java",
"chars": 423,
"preview": "package com.snowflake.kafka.connector.internal;\n\npublic class SnowflakeKafkaConnectorException extends RuntimeException "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/SnowflakeSinkService.java",
"chars": 3383,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport com.codahale.metrics.MetricRegistry;\nimport com.google.common.an"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/SnowflakeURL.java",
"chars": 2977,
"preview": "/*\n * Copyright (c) 2019 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/StandardSnowflakeConnectionService.java",
"chars": 21079,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static com.snowflake.kafka.connector.Utils.TABLE_COLUMN_METADATA"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/URL.java",
"chars": 122,
"preview": "package com.snowflake.kafka.connector.internal;\n\npublic interface URL {\n String hostWithPort();\n\n String getScheme();\n"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/metrics/MetricsJmxReporter.java",
"chars": 5324,
"preview": "package com.snowflake.kafka.connector.internal.metrics;\n\nimport static com.snowflake.kafka.connector.internal.metrics.Me"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/metrics/MetricsUtil.java",
"chars": 2893,
"preview": "package com.snowflake.kafka.connector.internal.metrics;\n\nimport java.util.Collection;\n\n/** All metrics related constants"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/metrics/NoopTaskMetrics.java",
"chars": 1307,
"preview": "package com.snowflake.kafka.connector.internal.metrics;\n\n/** Null-object implementation of {@link TaskMetrics}. Every me"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/metrics/SnowflakeSinkTaskMetrics.java",
"chars": 9376,
"preview": "package com.snowflake.kafka.connector.internal.metrics;\n\nimport static com.snowflake.kafka.connector.internal.metrics.Me"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/metrics/TaskMetrics.java",
"chars": 1366,
"preview": "package com.snowflake.kafka.connector.internal.metrics;\n\n/**\n * Task-level metrics facade. Callers program against this "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/ColumnInfos.java",
"chars": 1669,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n */\n\npackage com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/ColumnTypeMapper.java",
"chars": 733,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n */\n\npackage com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/SchemaEvolutionTargetItems.java",
"chars": 2454,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n */\n\npackage com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/SnowflakeColumnTypeMapper.java",
"chars": 3273,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n */\n\npackage com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/SnowflakeSchemaEvolutionService.java",
"chars": 3441,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n */\n\npackage com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/TableSchema.java",
"chars": 1010,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n */\n\npackage com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/TableSchemaResolver.java",
"chars": 7204,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n */\n\npackage com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/schemaevolution/ValidationResultMapper.java",
"chars": 1478,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n */\n\npackage com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/DefaultStreamingConfigValidator.java",
"chars": 4530,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static com.snowflake.kafka.connector.ConnectorConfigTo"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/IngestionMethodConfig.java",
"chars": 487,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport java.util.Locale;\n\n/**\n * Enum representing the ingest"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/LatestCommitedOffsetTokenExecutor.java",
"chars": 2835,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static java.time.temporal.ChronoUnit.SECONDS;\n\nimport "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/OpenChannelRetryPolicy.java",
"chars": 2947,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport com.snowflake.ingest.streaming.SFException;\nimport com"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2.java",
"chars": 21725,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static com.snowflake.kafka.connector.Utils.getTableNam"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProperties.java",
"chars": 5151,
"preview": "/*\n * Copyright (c) 2023 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingConfigValidator.java",
"chars": 492,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport com.google.common.collect.ImmutableMap;\nimport java.ut"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingErrorHandler.java",
"chars": 3395,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaCo"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/TopicPartitionChannelInsertionException.java",
"chars": 877,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\n/**\n * Class for exceptions that occur while interacting with"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/channel/TopicPartitionChannel.java",
"chars": 3556,
"preview": "package com.snowflake.kafka.connector.internal.streaming.channel;\n\nimport com.google.common.annotations.VisibleForTestin"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/telemetry/PeriodicTelemetryReporter.java",
"chars": 5307,
"preview": "package com.snowflake.kafka.connector.internal.streaming.telemetry;\n\nimport com.google.common.annotations.VisibleForTest"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/telemetry/SnowflakeTelemetryChannelCreation.java",
"chars": 2477,
"preview": "/*\n * Copyright (c) 2023 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/telemetry/SnowflakeTelemetryChannelStatus.java",
"chars": 12993,
"preview": "/*\n * Copyright (c) 2023 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/telemetry/SnowflakeTelemetrySsv1Migration.java",
"chars": 2988,
"preview": "package com.snowflake.kafka.connector.internal.streaming.telemetry;\n\nimport static com.snowflake.kafka.connector.interna"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/AppendRowWithFallbackPolicy.java",
"chars": 5960,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2;\n\nimport com.snowflake.ingest.streaming.SFException;\nimport "
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/BackpressureException.java",
"chars": 2329,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2;\n\nimport com.google.common.base.Preconditions;\nimport com.sn"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/ClientRecreationException.java",
"chars": 3235,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2;\n\nimport com.google.common.base.Preconditions;\nimport com.sn"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/ClientRecreator.java",
"chars": 871,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2;\n\nimport com.snowflake.ingest.streaming.SnowflakeStreamingIn"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/PipeNameProvider.java",
"chars": 356,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2;\n\nimport static com.snowflake.kafka.connector.Constants.DEFA"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/SnowpipeStreamingPartitionChannel.java",
"chars": 36990,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2;\n\nimport static com.snowflake.kafka.connector.Constants.Kafk"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/WaitForLastOffsetCommittedPolicy.java",
"chars": 1650,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2;\n\nimport static com.snowflake.kafka.connector.internal.Snowf"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/channel/PartitionOffsetTracker.java",
"chars": 8778,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.channel;\n\nimport static com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientFactory.java",
"chars": 2631,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.client;\n\nimport com.snowflake.ingest.streaming.SnowflakeStre"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientPool.java",
"chars": 12771,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.client;\n\nimport com.snowflake.ingest.streaming.SnowflakeStre"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientPools.java",
"chars": 10635,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.client;\n\nimport static com.google.common.base.Strings.isNull"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/client/StreamingClientSupplier.java",
"chars": 460,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.client;\n\nimport com.snowflake.ingest.streaming.SnowflakeStre"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/migration/Ssv1MigrationMode.java",
"chars": 2269,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.migration;\n\nimport static com.snowflake.kafka.connector.Cons"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/migration/Ssv1MigrationResponse.java",
"chars": 2004,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.migration;\n\nimport com.fasterxml.jackson.annotation.JsonIgno"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/service/BatchOffsetFetcher.java",
"chars": 8270,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.service;\n\nimport static com.snowflake.kafka.connector.intern"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/service/PartitionChannelManager.java",
"chars": 14292,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.service;\n\nimport com.google.common.annotations.VisibleForTes"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/streaming/v2/service/ThreadPools.java",
"chars": 5599,
"preview": "package com.snowflake.kafka.connector.internal.streaming.v2.service;\n\nimport com.snowflake.kafka.connector.config.SinkTa"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryBasicInfo.java",
"chars": 1607,
"preview": "package com.snowflake.kafka.connector.internal.telemetry;\n\nimport com.google.common.base.Preconditions;\nimport com.googl"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryService.java",
"chars": 9372,
"preview": "package com.snowflake.kafka.connector.internal.telemetry;\n\nimport com.snowflake.kafka.connector.Constants.KafkaConnector"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/telemetry/SnowflakeTelemetryServiceFactory.java",
"chars": 1322,
"preview": "package com.snowflake.kafka.connector.internal.telemetry;\n\nimport java.sql.Connection;\n\n/**\n * Factory class which produ"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/telemetry/TelemetryConstants.java",
"chars": 2825,
"preview": "package com.snowflake.kafka.connector.internal.telemetry;\n\n/**\n * Placeholder for all constants used for Sending informa"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/BinaryStringUtils.java",
"chars": 668,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/ByteArraySerializer.java",
"chars": 1020,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/ColumnLogicalType.java",
"chars": 1718,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/ColumnPhysicalType.java",
"chars": 1183,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/ColumnSchema.java",
"chars": 15128,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n *\n * This file provides integration between SSv1"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/DataValidationUtil.java",
"chars": 48576,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/DuplicateDetector.java",
"chars": 1043,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/utils/Dupl"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/DuplicateKeyValidatedObject.java",
"chars": 735,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/DuplicateKeyValidatingSerializer.java",
"chars": 2799,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/ErrorCode.java",
"chars": 1436,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/utils/Erro"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/Power10Util.java",
"chars": 917,
"preview": "package com.snowflake.kafka.connector.internal.validation;\n\nimport java.math.BigInteger;\n\n/**\n * Powers of 10 used for t"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/RowValidator.java",
"chars": 14900,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n *\n * This file provides integration between SSv1"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/SFExceptionValidation.java",
"chars": 2425,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/utils/SFEx"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/SqlIdentifierNormalizer.java",
"chars": 3993,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/TimestampWrapper.java",
"chars": 3466,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/Utils.java",
"chars": 862,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/utils/Util"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/ValidationResult.java",
"chars": 4851,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n *\n * This file provides integration between SSv1"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/internal/validation/ZonedDateTimeSerializer.java",
"chars": 989,
"preview": "/*\n * COPIED FROM SNOWFLAKE INGEST SDK V1\n * Source: snowflake-ingest-java/src/main/java/net/snowflake/ingest/streaming/"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/records/KafkaRecordConverter.java",
"chars": 14377,
"preview": "package com.snowflake.kafka.connector.records;\n\nimport com.snowflake.kafka.connector.internal.KCLogger;\nimport com.snowf"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/records/SnowflakeMetadataConfig.java",
"chars": 2755,
"preview": "package com.snowflake.kafka.connector.records;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConf"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/records/SnowflakeSinkRecord.java",
"chars": 11155,
"preview": "package com.snowflake.kafka.connector.records;\n\nimport static com.snowflake.kafka.connector.Utils.TABLE_COLUMN_METADATA;"
},
{
"path": "src/main/java/com/snowflake/kafka/connector/streaming/iceberg/IcebergDDLTypes.java",
"chars": 421,
"preview": "package com.snowflake.kafka.connector.streaming.iceberg;\n\npublic class IcebergDDLTypes {\n\n public static String ICEBERG"
},
{
"path": "src/main/resources/com/snowflake/kafka/connector/ingest_error_messages.properties",
"chars": 2567,
"preview": "#\n# Copyright (c) 2024 Snowflake Computing Inc. All rights reserved.\n#\n\n#\n# Exception messages.\n# These error code are a"
},
{
"path": "src/main/resources/com/snowflake/kafka/connector/internal/validation/ingest_error_messages.properties",
"chars": 814,
"preview": "#\n# COPIED FROM SNOWFLAKE INGEST SDK V1\n# Source: snowflake-ingest-java/src/main/resources/net/snowflake/ingest/ingest_e"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/CachingConfigValidatorTest.java",
"chars": 4450,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/ConnectClusterBaseIT.java",
"chars": 5080,
"preview": "package com.snowflake.kafka.connector;\n\nimport static org.awaitility.Awaitility.await;\n\nimport com.snowflake.kafka.conne"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/ConnectorConfigValidatorLogsTest.java",
"chars": 2307,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.internal.TestUtils.generateAESKey;\ni"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/ConnectorConfigValidatorTest.java",
"chars": 31953,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/ConnectorIT.java",
"chars": 15191,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/InjectQueryRunner.java",
"chars": 456,
"preview": "package com.snowflake.kafka.connector;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\n"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/InjectQueryRunnerExtension.java",
"chars": 2733,
"preview": "package com.snowflake.kafka.connector;\n\nimport com.snowflake.kafka.connector.internal.SnowflakeDataSourceFactory;\nimport"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/InjectSnowflakeDataSource.java",
"chars": 471,
"preview": "package com.snowflake.kafka.connector;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retention;\n"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/InjectSnowflakeDataSourceExtension.java",
"chars": 2708,
"preview": "package com.snowflake.kafka.connector;\n\nimport com.snowflake.kafka.connector.internal.SnowflakeDataSourceFactory;\nimport"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/LegacySchemaToggleIT.java",
"chars": 6013,
"preview": "package com.snowflake.kafka.connector;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org.awai"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/SchemaEvolutionAvroSrIT.java",
"chars": 8173,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.internal.TestUtils.assertTableColumn"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/SchemaEvolutionBase.java",
"chars": 3238,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/SchemaEvolutionJsonIT.java",
"chars": 13608,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/SinkTaskIT.java",
"chars": 8883,
"preview": "package com.snowflake.kafka.connector;\n\nimport static org.assertj.core.api.Assertions.assertThat;\nimport static org.test"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/SinkTaskProxyIT.java",
"chars": 7418,
"preview": "package com.snowflake.kafka.connector;\n\nimport com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams;\nimpor"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/SmtIT.java",
"chars": 9050,
"preview": "package com.snowflake.kafka.connector;\n\nimport static org.apache.kafka.connect.runtime.ConnectorConfig.TRANSFORMS_CONFIG"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/SnowflakeSinkTaskAuthorizationExceptionTrackerTest.java",
"chars": 2593,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfigParams"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/SnowflakeSinkTaskForStreamingIT.java",
"chars": 15004,
"preview": "package com.snowflake.kafka.connector;\n\nimport static com.snowflake.kafka.connector.internal.TestUtils.getConnectionServ"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/TopicToTableParserTest.java",
"chars": 3223,
"preview": "package com.snowflake.kafka.connector;\n\nimport static org.junit.Assert.assertEquals;\nimport static org.junit.Assert.asse"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/UtilsTest.java",
"chars": 12496,
"preview": "package com.snowflake.kafka.connector;\n\nimport static java.util.Arrays.*;\nimport static java.util.Collections.*;\nimport "
},
{
"path": "src/test/java/com/snowflake/kafka/connector/builder/SinkRecordBuilder.java",
"chars": 2172,
"preview": "package com.snowflake.kafka.connector.builder;\n\nimport com.google.common.base.Preconditions;\nimport org.apache.kafka.com"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/config/ClientValidationConfigTest.java",
"chars": 2393,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfi"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/config/SinkTaskConfigTest.java",
"chars": 9516,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfi"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/config/SinkTaskConfigTestBuilder.java",
"chars": 2721,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport com.snowflake.kafka.connector.ConnectorConfigTools;\nimport com.sno"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/config/SnowflakeSinkConnectorConfigBuilder.java",
"chars": 5233,
"preview": "package com.snowflake.kafka.connector.config;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorConfi"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/dlq/InMemoryKafkaRecordErrorReporter.java",
"chars": 1285,
"preview": "package com.snowflake.kafka.connector.dlq;\n\nimport static java.util.Collections.unmodifiableList;\n\nimport java.util.Arra"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/CachingSnowflakeConnectionServiceStatsTest.java",
"chars": 2780,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorCon"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/CachingSnowflakeConnectionServiceTest.java",
"chars": 8901,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorCon"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/ConnectionServiceIT.java",
"chars": 6222,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static com.snowflake.kafka.connector.internal.TestUtils.TEST_CON"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/EmbeddedProxyServer.java",
"chars": 8776,
"preview": "/*\n * Copyright (c) 2019 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/InternalUtilsTest.java",
"chars": 12175,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\nimport sta"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/JdbcPropertiesTest.java",
"chars": 2669,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static org.assertj.core.api.AssertionsForClassTypes.assertThatTh"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/KCLoggerTest.java",
"chars": 4505,
"preview": "/*\n * Copyright (c) 2019 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/NonEncryptedKeyTestSnowflakeConnection.java",
"chars": 1190,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static com.snowflake.kafka.connector.internal.TestUtils.transfor"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/ResetProxyConfigExec.java",
"chars": 434,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport net.snowflake.client.api.exception.SnowflakeSQLException;\n\npubli"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/SchematizationTestUtils.java",
"chars": 2065,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class Schematiz"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/SnowflakeConnectionServiceCacheTest.java",
"chars": 3291,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static com.snowflake.kafka.connector.Constants.KafkaConnectorCon"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/SnowflakeDataSourceFactory.java",
"chars": 4036,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport com.snowflake.kafka.connector.Constants.KafkaConnectorConfigPara"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/SnowflakeURLTest.java",
"chars": 3913,
"preview": "/*\n * Copyright (c) 2019 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/StandardSnowflakeConnectionServiceDdlTest.java",
"chars": 16050,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static org.junit.jupiter.api.Assertions.*;\nimport static org.moc"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/TestUtils.java",
"chars": 33501,
"preview": "/*\n * Copyright (c) 2019 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/TombstoneRecordIngestionIT.java",
"chars": 7915,
"preview": "package com.snowflake.kafka.connector.internal;\n\nimport static com.snowflake.kafka.connector.ConnectorConfigValidatorTes"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/metrics/MetricsJmxReporterTest.java",
"chars": 2062,
"preview": "package com.snowflake.kafka.connector.internal.metrics;\n\nimport static org.junit.Assert.*;\n\nimport com.codahale.metrics."
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/metrics/SnowflakeSinkTaskMetricsTest.java",
"chars": 7594,
"preview": "package com.snowflake.kafka.connector.internal.metrics;\n\nimport static com.snowflake.kafka.connector.internal.TestUtils."
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/ColumnInfosTest.java",
"chars": 1747,
"preview": "package com.snowflake.kafka.connector.internal.schemaevolution;\n\nimport static org.assertj.core.api.Assertions.assertTha"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/SchemaEvolutionTargetItemsTest.java",
"chars": 3230,
"preview": "package com.snowflake.kafka.connector.internal.schemaevolution;\n\nimport static org.assertj.core.api.Assertions.assertTha"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/SnowflakeColumnTypeMapperTest.java",
"chars": 3551,
"preview": "package com.snowflake.kafka.connector.internal.schemaevolution;\n\nimport static org.assertj.core.api.Assertions.assertTha"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/SnowflakeSchemaEvolutionServiceTest.java",
"chars": 7709,
"preview": "/*\n * Copyright (c) 2026 Snowflake Computing Inc. All rights reserved.\n *\n * Tests for schema evolution service and DDL "
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/TableSchemaResolverTest.java",
"chars": 8882,
"preview": "package com.snowflake.kafka.connector.internal.schemaevolution;\n\nimport static org.assertj.core.api.Assertions.*;\n\nimpor"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/schemaevolution/ValidationResultMapperTest.java",
"chars": 3661,
"preview": "package com.snowflake.kafka.connector.internal.schemaevolution;\n\nimport static org.assertj.core.api.Assertions.assertTha"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/BatchOffsetFetcherTest.java",
"chars": 11406,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static com.snowflake.kafka.connector.internal.streamin"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/ChannelStatusCheckIT.java",
"chars": 12648,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static org.awaitility.Awaitility.await;\nimport static "
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/CloseTopicPartitionChannelIT.java",
"chars": 2683,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static org.awaitility.Awaitility.await;\n\nimport com.fa"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/DefaultStreamingConfigValidatorTest.java",
"chars": 3311,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static org.junit.jupiter.api.Assertions.assertFalse;\ni"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/FakeIngestClientSupplier.java",
"chars": 1758,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport com.snowflake.ingest.streaming.SnowflakeStreamingInges"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/FakeSnowflakeStreamingIngestChannel.java",
"chars": 4897,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static java.util.List.copyOf;\n\nimport com.snowflake.in"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/FakeSnowflakeStreamingIngestClient.java",
"chars": 5056,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport com.snowflake.ingest.streaming.ChannelStatus;\nimport c"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/InMemorySinkTaskContext.java",
"chars": 1820,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport java.util.HashMap;\nimport java.util.Map;\nimport java.u"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/OpenChannelRetryPolicyTest.java",
"chars": 3647,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\n"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2AvroSchematizationIT.java",
"chars": 10175,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static com.snowflake.kafka.connector.internal.TestUtil"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2BaseIT.java",
"chars": 660,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport com.snowflake.kafka.connector.internal.TestUtils;\nimpo"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2IT.java",
"chars": 33128,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static com.snowflake.kafka.connector.internal.TestUtil"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2SchematizationIT.java",
"chars": 3535,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport com.snowflake.kafka.connector.builder.SinkRecordBuilde"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2Test.java",
"chars": 21664,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\n"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/SnowflakeSinkServiceV2ValidationLoggingTest.java",
"chars": 13751,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static org.junit.jupiter.api.Assertions.*;\nimport stat"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientPropertiesTest.java",
"chars": 10575,
"preview": "/*\n * Copyright (c) 2023 Snowflake Inc. All rights reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the\n "
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/StreamingErrorHandlerIT.java",
"chars": 13116,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\n"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/StreamingManualModeIT.java",
"chars": 8659,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport static com.snowflake.kafka.connector.internal.TestUtil"
},
{
"path": "src/test/java/com/snowflake/kafka/connector/internal/streaming/StreamingSinkServiceBuilder.java",
"chars": 2025,
"preview": "package com.snowflake.kafka.connector.internal.streaming;\n\nimport com.snowflake.kafka.connector.config.SinkTaskConfig;\ni"
}
]
// ... and 199 more files (download for full content)
About this extraction
This page contains the full source code of the snowflakedb/snowflake-kafka-connector GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 399 files (2.1 MB), approximately 572.2k tokens, and a symbol index with 2720 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.