1
0
mirror of synced 2025-12-25 02:09:19 -05:00

run format (#15566)

This commit is contained in:
Marcos Marx
2022-08-11 14:08:16 -04:00
committed by GitHub
parent 3b527a19d2
commit 6d116871db
17 changed files with 692 additions and 1159 deletions

View File

@@ -45,10 +45,10 @@ public class AzureBlobStorageConsumer extends FailureTrackingAirbyteMessageConsu
private final Map<AirbyteStreamNameNamespacePair, AzureBlobStorageWriter> streamNameAndNamespaceToWriters;
public AzureBlobStorageConsumer(
final AzureBlobStorageDestinationConfig azureBlobStorageDestinationConfig,
final ConfiguredAirbyteCatalog configuredCatalog,
final AzureBlobStorageWriterFactory writerFactory,
final Consumer<AirbyteMessage> outputRecordCollector) {
final AzureBlobStorageDestinationConfig azureBlobStorageDestinationConfig,
final ConfiguredAirbyteCatalog configuredCatalog,
final AzureBlobStorageWriterFactory writerFactory,
final Consumer<AirbyteMessage> outputRecordCollector) {
this.azureBlobStorageDestinationConfig = azureBlobStorageDestinationConfig;
this.configuredCatalog = configuredCatalog;
this.writerFactory = writerFactory;
@@ -91,8 +91,8 @@ public class AzureBlobStorageConsumer extends FailureTrackingAirbyteMessageConsu
}
private void createContainers(final SpecializedBlobClientBuilder specializedBlobClientBuilder,
final AppendBlobClient appendBlobClient,
final ConfiguredAirbyteStream configuredStream) {
final AppendBlobClient appendBlobClient,
final ConfiguredAirbyteStream configuredStream) {
// create container if absent (aka SQl Schema)
final BlobContainerClient containerClient = appendBlobClient.getContainerClient();
if (!containerClient.exists()) {
@@ -101,7 +101,7 @@ public class AzureBlobStorageConsumer extends FailureTrackingAirbyteMessageConsu
if (DestinationSyncMode.OVERWRITE.equals(configuredStream.getDestinationSyncMode())) {
LOGGER.info("Sync mode is selected to OVERRIDE mode. New container will be automatically"
+ " created or all data would be overridden (if any) for stream:" + configuredStream
.getStream().getName());
.getStream().getName());
var blobItemList = StreamSupport.stream(containerClient.listBlobs().spliterator(), false)
.collect(Collectors.toList());
blobItemList.forEach(blob -> {

View File

@@ -1,3 +1,7 @@
/*
* Copyright (c) 2022 Airbyte, Inc., all rights reserved.
*/
package io.airbyte.integrations.destination.azure_blob_storage;
import io.airbyte.integrations.base.FailureTrackingAirbyteMessageConsumer;
@@ -9,20 +13,20 @@ import java.util.function.Consumer;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
@DisplayName("AzureBlobRecordConsumer")
@ExtendWith(MockitoExtension.class)
public class AzureBlobRecordConsumerTest extends PerStreamStateMessageTest {
@Mock
private Consumer<AirbyteMessage> outputRecordCollector;
private AzureBlobStorageConsumer consumer;
@Mock
private AzureBlobStorageDestinationConfig azureBlobStorageDestinationConfig;
private AzureBlobStorageDestinationConfig azureBlobStorageDestinationConfig;
@Mock
private ConfiguredAirbyteCatalog configuredCatalog;
@@ -44,4 +48,5 @@ public class AzureBlobRecordConsumerTest extends PerStreamStateMessageTest {
protected FailureTrackingAirbyteMessageConsumer getMessageConsumer() {
return consumer;
}
}

View File

@@ -1,3 +1,7 @@
/*
* Copyright (c) 2022 Airbyte, Inc., all rights reserved.
*/
package io.airbyte.integrations.destination.scylla;
import com.fasterxml.jackson.databind.JsonNode;
@@ -17,6 +21,7 @@ import org.testcontainers.containers.GenericContainer;
@DisplayName("ScyllaRecordConsumer")
@ExtendWith(MockitoExtension.class)
public class ScyllaRecordConsumerTest extends PerStreamStateMessageTest {
private static ScyllaContainer scyllaContainer;
@Mock
@@ -68,4 +73,5 @@ public class ScyllaRecordConsumerTest extends PerStreamStateMessageTest {
}
}
}

View File

@@ -8,9 +8,9 @@
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
}
}
},
@@ -27,9 +27,9 @@
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
}
}
},
@@ -46,9 +46,9 @@
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
}
}
},
@@ -65,9 +65,9 @@
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
}
}
},
@@ -84,9 +84,9 @@
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
}
}
},
@@ -103,9 +103,9 @@
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
}
}
},
@@ -122,9 +122,9 @@
"type": "object",
"properties": {
"api_key": {
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
"type": "string",
"description": "Hubplanner API key. See <a href=\"https://github.com/hubplanner/API#authentication\" target=\"_blank\">here</a> for more details.",
"airbyte_secret": true
}
}
},

View File

@@ -1,45 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": [
"null",
"string"
]
},
"rate": {
"type": [
"null",
"number"
]
},
"metadata": {
"type": [
"null",
"string"
]
},
"createdDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"updatedDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"label": {
"type": "string"
},
"currency": {
"type": "string"
}
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": ["null", "string"]
},
"rate": {
"type": ["null", "number"]
},
"metadata": {
"type": ["null", "string"]
},
"createdDate": {
"type": ["null", "string"],
"format": "date-time"
},
"updatedDate": {
"type": ["null", "string"],
"format": "date-time"
},
"label": {
"type": "string"
},
"currency": {
"type": "string"
}
}
}
}

View File

@@ -1,264 +1,156 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": [
"null",
"string"
]
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": ["null", "string"]
},
"title": {
"type": ["null", "string"]
},
"type": {
"type": ["null", "string"]
},
"state": {
"type": ["null", "string"]
},
"allDay": {
"type": ["null", "boolean"]
},
"scale": {
"type": ["null", "string"]
},
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"categoryTemplateId": {
"type": ["null", "string"]
},
"categoryName": {
"type": ["null", "string"]
},
"stateValue": {
"type": ["null", "integer"]
},
"resource": {
"type": "string"
},
"project": {
"type": "string"
},
"note": {
"type": ["null", "string"]
},
"details": {
"properties": {
"offDaysCount": {
"type": ["null", "integer"]
},
"title": {
"type": [
"null",
"string"
]
"workDaysCount": {
"type": ["null", "integer"]
},
"type": {
"type": [
"null",
"string"
]
"holidayCount": {
"type": ["null", "integer"]
},
"state": {
"type": [
"null",
"string"
]
"workWeekDetails": {
"items": {
"type": ["null", "integer"]
},
"type": ["null", "array"]
},
"allDay": {
"type": [
"null",
"boolean"
]
"bookedMinutes": {
"type": ["null", "integer"]
},
"scale": {
"type": [
"null",
"string"
]
},
"start": {
"type": "string"
},
"end": {
"type": "string"
},
"categoryTemplateId": {
"type": [
"null",
"string"
]
},
"categoryName": {
"type": [
"null",
"string"
]
},
"stateValue": {
"type": [
"null",
"integer"
]
},
"resource": {
"type": "string"
},
"project": {
"type": "string"
},
"note": {
"type": [
"null",
"string"
]
},
"details": {
"properties": {
"offDaysCount": {
"type": [
"null",
"integer"
]
},
"workDaysCount": {
"type": [
"null",
"integer"
]
},
"holidayCount": {
"type": [
"null",
"integer"
]
},
"workWeekDetails": {
"items": {
"type": [
"null",
"integer"
]
},
"type": [
"null",
"array"
]
},
"bookedMinutes": {
"type": [
"null",
"integer"
]
},
"budgetBookedAmount": {
"type": [
"null",
"integer"
]
}
},
"type": [
"null",
"object"
]
},
"createdDate": {
"format": "date-time",
"type": [
"null",
"string"
]
},
"updatedDate": {
"format": "date-time",
"type": [
"null",
"string"
]
},
"metadata": {
"type": [
"null",
"string"
]
},
"customFields": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"templateId": {
"type": "string"
},
"templateType": {
"type": "string"
},
"templateLabel": {
"type": [
"null",
"string"
]
},
"value": {
"type": [
"null",
"string"
]
},
"choices": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"choiceId": {
"type": "string"
},
"value": {
"type": [
"null",
"string"
]
}
},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
}
},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
},
"bookingRate": {
"properties": {
"external": {
"properties": {
"defaultRateId": {
"type": [
"null",
"integer"
]
}
},
"type": [
"null",
"object"
]
},
"internal": {
"properties": {
"defaultRateId": {
"type": [
"null",
"integer"
]
}
},
"type": [
"null",
"object"
]
}
},
"type": [
"null",
"object"
]
},
"bookingCreatorId": {
"type": [
"null",
"string"
]
},
"lastUpdatedById": {
"type": [
"null",
"string"
]
},
"backgroundColor": {
"type": [
"null",
"string"
]
"budgetBookedAmount": {
"type": ["null", "integer"]
}
},
"type": ["null", "object"]
},
"createdDate": {
"format": "date-time",
"type": ["null", "string"]
},
"updatedDate": {
"format": "date-time",
"type": ["null", "string"]
},
"metadata": {
"type": ["null", "string"]
},
"customFields": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"templateId": {
"type": "string"
},
"templateType": {
"type": "string"
},
"templateLabel": {
"type": ["null", "string"]
},
"value": {
"type": ["null", "string"]
},
"choices": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"choiceId": {
"type": "string"
},
"value": {
"type": ["null", "string"]
}
},
"type": ["null", "object"]
},
"type": ["null", "array"]
}
},
"type": ["null", "object"]
},
"type": ["null", "array"]
},
"bookingRate": {
"properties": {
"external": {
"properties": {
"defaultRateId": {
"type": ["null", "integer"]
}
},
"type": ["null", "object"]
},
"internal": {
"properties": {
"defaultRateId": {
"type": ["null", "integer"]
}
},
"type": ["null", "object"]
}
},
"type": ["null", "object"]
},
"bookingCreatorId": {
"type": ["null", "string"]
},
"lastUpdatedById": {
"type": ["null", "string"]
},
"backgroundColor": {
"type": ["null", "string"]
}
}
}
}

View File

@@ -1,48 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": [
"null",
"string"
]
},
"name": {
"type": "string"
},
"company": {
"type": [
"null",
"string"
]
},
"__v": {
"type": [
"null",
"integer"
]
},
"createdDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"updatedDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"deleted": {
"type": [
"null",
"boolean"
]
}
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": ["null", "string"]
},
"name": {
"type": "string"
},
"company": {
"type": ["null", "string"]
},
"__v": {
"type": ["null", "integer"]
},
"createdDate": {
"type": ["null", "string"],
"format": "date-time"
},
"updatedDate": {
"type": ["null", "string"],
"format": "date-time"
},
"deleted": {
"type": ["null", "boolean"]
}
}
}
}

View File

@@ -1,45 +1,30 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": [
"null",
"string"
]
},
"name": {
"type": "string"
},
"createdDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"updatedDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"backgroundColor": {
"type": [
"null",
"string"
]
},
"label": {
"type": "string"
},
"metadata": {
"type": [
"null",
"string"
]
}
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": ["null", "string"]
},
"name": {
"type": "string"
},
"createdDate": {
"type": ["null", "string"],
"format": "date-time"
},
"updatedDate": {
"type": ["null", "string"],
"format": "date-time"
},
"backgroundColor": {
"type": ["null", "string"]
},
"label": {
"type": "string"
},
"metadata": {
"type": ["null", "string"]
}
}
}
}

View File

@@ -1,43 +1,28 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": [
"null",
"string"
]
},
"name": {
"type": "string"
},
"date": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"metadata": {
"type": [
"null",
"string"
]
},
"createdDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"updatedDate": {
"type": [
"null",
"string"
],
"format": "date-time"
}
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": ["null", "string"]
},
"name": {
"type": "string"
},
"date": {
"type": ["null", "string"],
"format": "date-time"
},
"metadata": {
"type": ["null", "string"]
},
"createdDate": {
"type": ["null", "string"],
"format": "date-time"
},
"updatedDate": {
"type": ["null", "string"],
"format": "date-time"
}
}
}
}

View File

@@ -1,490 +1,271 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": [
"null",
"string"
]
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": ["null", "string"]
},
"name": {
"type": "string"
},
"links": {
"properties": {},
"type": ["null", "object"]
},
"notes": {
"type": ["null", "string"]
},
"createdDate": {
"type": ["null", "string"],
"format": "date-time"
},
"updatedDate": {
"type": ["null", "string"],
"format": "date-time"
},
"timeEntryEnabled": {
"type": ["null", "boolean"]
},
"timeEntryLocked": {
"type": ["null", "boolean"]
},
"timeEntryApproval": {
"type": ["null", "boolean"]
},
"resourceRates": {
"items": {
"properties": {
"resource": {
"type": ["null", "string"]
},
"companyBillingRateId": {
"type": ["null", "string"]
},
"companyBillingRate": {
"type": ["null", "number"]
}
},
"name": {
"type": "string"
"type": ["null", "object"]
},
"type": ["null", "array"]
},
"includeBookedTimeReports": {
"type": ["null", "boolean"]
},
"includeBookedTimeGrid": {
"type": ["null", "boolean"]
},
"projectManagers": {
"items": {
"type": ["null", "string"]
},
"type": ["null", "array"]
},
"resources": {
"items": {
"type": ["null", "string"]
},
"type": ["null", "array"]
},
"workDays": {
"items": {
"type": ["null", "boolean"]
},
"type": ["null", "array"]
},
"useProjectDays": {
"type": ["null", "boolean"]
},
"budget": {
"properties": {
"hasBudget": {
"type": ["null", "boolean"]
},
"links": {
"properties": {},
"type": [
"null",
"object"
]
"projectHours": {
"properties": {
"active": {
"type": ["null", "boolean"]
},
"hours": {
"type": ["null", "number"]
}
},
"type": ["null", "object"]
},
"notes": {
"type": [
"null",
"string"
]
},
"createdDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"updatedDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"timeEntryEnabled": {
"type": [
"null",
"boolean"
]
},
"timeEntryLocked": {
"type": [
"null",
"boolean"
]
},
"timeEntryApproval": {
"type": [
"null",
"boolean"
]
},
"resourceRates": {
"items": {
"properties": {
"resource": {
"type": [
"null",
"string"
]
},
"companyBillingRateId": {
"type": [
"null",
"string"
]
},
"companyBillingRate": {
"type": [
"null",
"number"
]
}
"cashAmount": {
"properties": {
"active": {
"type": ["null", "boolean"]
},
"amount": {
"type": ["null", "number"]
},
"currency": {
"type": ["null", "string"]
},
"billingRate": {
"properties": {
"useDefault": {
"type": ["null", "boolean"]
},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
},
"includeBookedTimeReports": {
"type": [
"null",
"boolean"
]
},
"includeBookedTimeGrid": {
"type": [
"null",
"boolean"
]
},
"projectManagers": {
"items": {
"type": [
"null",
"string"
]
},
"type": [
"null",
"array"
]
},
"resources": {
"items": {
"type": [
"null",
"string"
]
},
"type": [
"null",
"array"
]
},
"workDays": {
"items": {
"type": [
"null",
"boolean"
]
},
"type": [
"null",
"array"
]
},
"useProjectDays": {
"type": [
"null",
"boolean"
]
},
"budget": {
"properties": {
"hasBudget": {
"type": [
"null",
"boolean"
]
"rate": {
"type": ["null", "number"]
},
"projectHours": {
"properties": {
"active": {
"type": [
"null",
"boolean"
]
},
"hours": {
"type": [
"null",
"number"
]
}
},
"type": [
"null",
"object"
]
},
"cashAmount": {
"properties": {
"active": {
"type": [
"null",
"boolean"
]
},
"amount": {
"type": [
"null",
"number"
]
},
"currency": {
"type": [
"null",
"string"
]
},
"billingRate": {
"properties": {
"useDefault": {
"type": [
"null",
"boolean"
]
},
"rate": {
"type": [
"null",
"number"
]
},
"id": {
"type": [
"null",
"string"
]
}
},
"type": [
"null",
"object"
]
}
},
"type": [
"null",
"object"
]
"id": {
"type": ["null", "string"]
}
},
"type": [
"null",
"object"
]
},
"companyBillingRateId": {
"type": [
"null",
"string"
]
},
"budgetHours": {
"type": [
"null",
"number"
]
},
"budgetCashAmount": {
"type": [
"null",
"number"
]
},
"budgetCurrency": {
"type": [
"null",
"string"
]
},
"useStatusColor": {
"type": [
"null",
"boolean"
]
},
"status": {
"type": [
"null",
"string"
]
},
"useProjectDuration": {
"type": [
"null",
"boolean"
]
},
"start": {
"type": [
"null",
"string"
]
},
"end": {
"type": [
"null",
"string"
]
},
"backgroundColor": {
"type": [
"null",
"string"
]
},
"projectCode": {
"type": [
"null",
"string"
]
},
"metadata": {
"type": [
"null",
"string"
]
},
"customFields": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"templateId": {
"type": "string"
},
"templateType": {
"type": "string"
},
"templateLabel": {
"type": [
"null",
"string"
]
},
"value": {
"type": [
"null",
"string"
]
},
"choices": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"choiceId": {
"type": "string"
},
"value": {
"type": [
"null",
"string"
]
}
},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
}
},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
},
"timeEntryNoteRequired": {
"type": [
"null",
"boolean"
]
},
"projectRate": {
"properties": {
"external": {
"properties": {
"defaultRateId": {
"type": [
"null",
"string"
]
},
"customRates": {
"items": {
"properties": {
"_id": {
"type": [
"null",
"string"
]
},
"id": {
"type": [
"null",
"string"
]
},
"resourceId": {
"type": [
"null",
"string"
]
}
},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
}
},
"type": [
"null",
"object"
]
},
"internal": {
"properties": {
"customRates": {
"items": {
"properties": {
"_id": {
"type": [
"null",
"string"
]
},
"id": {
"type": [
"null",
"string"
]
},
"resourceId": {
"type": [
"null",
"string"
]
}
},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
},
"defaultRateId": {
"type": [
"null",
"string"
]
}
},
"type": [
"null",
"object"
]
}
},
"type": [
"null",
"object"
]
},
"note": {
"type": [
"null",
"string"
]
},
"tags": {
"items": {
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
},
"type": ["null", "object"]
}
},
"type": ["null", "object"]
}
},
"type": ["null", "object"]
},
"companyBillingRateId": {
"type": ["null", "string"]
},
"budgetHours": {
"type": ["null", "number"]
},
"budgetCashAmount": {
"type": ["null", "number"]
},
"budgetCurrency": {
"type": ["null", "string"]
},
"useStatusColor": {
"type": ["null", "boolean"]
},
"status": {
"type": ["null", "string"]
},
"useProjectDuration": {
"type": ["null", "boolean"]
},
"start": {
"type": ["null", "string"]
},
"end": {
"type": ["null", "string"]
},
"backgroundColor": {
"type": ["null", "string"]
},
"projectCode": {
"type": ["null", "string"]
},
"metadata": {
"type": ["null", "string"]
},
"customFields": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"templateId": {
"type": "string"
},
"templateType": {
"type": "string"
},
"templateLabel": {
"type": ["null", "string"]
},
"value": {
"type": ["null", "string"]
},
"choices": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"choiceId": {
"type": "string"
},
"value": {
"type": ["null", "string"]
}
},
"type": ["null", "object"]
},
"type": ["null", "array"]
}
},
"type": ["null", "object"]
},
"type": ["null", "array"]
},
"timeEntryNoteRequired": {
"type": ["null", "boolean"]
},
"projectRate": {
"properties": {
"external": {
"properties": {
"defaultRateId": {
"type": ["null", "string"]
},
"customRates": {
"items": {
"properties": {
"_id": {
"type": ["null", "string"]
},
"id": {
"type": ["null", "string"]
},
"resourceId": {
"type": ["null", "string"]
}
},
"type": ["null", "object"]
},
"type": ["null", "array"]
}
},
"type": ["null", "object"]
},
"internal": {
"properties": {
"customRates": {
"items": {
"properties": {
"_id": {
"type": ["null", "string"]
},
"id": {
"type": ["null", "string"]
},
"resourceId": {
"type": ["null", "string"]
}
},
"type": ["null", "object"]
},
"type": ["null", "array"]
},
"defaultRateId": {
"type": ["null", "string"]
}
},
"type": ["null", "object"]
}
},
"type": ["null", "object"]
},
"note": {
"type": ["null", "string"]
},
"tags": {
"items": {
"type": ["null", "object"]
},
"type": ["null", "array"]
}
}
}
}

View File

@@ -1,212 +1,125 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": [
"null",
"string"
]
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"additionalProperties": true,
"properties": {
"_id": {
"type": ["null", "string"]
},
"email": {
"type": ["null", "string"]
},
"metadata": {
"type": ["null", "string"]
},
"createdDate": {
"type": ["null", "string"],
"format": "date-time"
},
"updatedDate": {
"type": ["null", "string"],
"format": "date-time"
},
"note": {
"type": ["null", "string"]
},
"firstName": {
"type": "string"
},
"lastName": {
"type": ["null", "string"]
},
"status": {
"type": ["null", "string"]
},
"role": {
"type": ["null", "string"]
},
"links": {
"properties": {},
"type": ["null", "object"]
},
"billing": {
"properties": {
"useDefault": {
"type": ["null", "boolean"]
},
"email": {
"type": [
"null",
"string"
]
},
"metadata": {
"type": [
"null",
"string"
]
},
"createdDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"updatedDate": {
"type": [
"null",
"string"
],
"format": "date-time"
},
"note": {
"type": [
"null",
"string"
]
},
"firstName": {
"type": "string"
},
"lastName": {
"type": [
"null",
"string"
]
},
"status": {
"type": [
"null",
"string"
]
},
"role": {
"type": [
"null",
"string"
]
},
"links": {
"properties": {},
"type": [
"null",
"object"
]
},
"billing": {
"properties": {
"useDefault": {
"type": [
"null",
"boolean"
]
},
"rate": {
"type": [
"null",
"number"
]
}
},
"type": [
"null",
"object"
]
},
"useCustomAvailability": {
"type": [
"null",
"boolean"
]
},
"customFields": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"templateId": {
"type": "string"
},
"templateType": {
"type": "string"
},
"templateLabel": {
"type": [
"null",
"string"
]
},
"value": {
"type": [
"null",
"string"
]
},
"choices": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"choiceId": {
"type": "string"
},
"value": {
"type": [
"null",
"string"
]
}
},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
}
},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
},
"resourceRates": {
"properties": {
"external": {
"items": {
"properties": {},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
},
"internal": {
"items": {
"properties": {},
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
}
},
"type": [
"null",
"object"
]
},
"isProjectManager": {
"type": [
"null",
"boolean"
]
},
"tags": {
"items": {
"type": [
"null",
"object"
]
},
"type": [
"null",
"array"
]
"rate": {
"type": ["null", "number"]
}
},
"type": ["null", "object"]
},
"useCustomAvailability": {
"type": ["null", "boolean"]
},
"customFields": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"templateId": {
"type": "string"
},
"templateType": {
"type": "string"
},
"templateLabel": {
"type": ["null", "string"]
},
"value": {
"type": ["null", "string"]
},
"choices": {
"items": {
"properties": {
"_id": {
"type": "string"
},
"choiceId": {
"type": "string"
},
"value": {
"type": ["null", "string"]
}
},
"type": ["null", "object"]
},
"type": ["null", "array"]
}
},
"type": ["null", "object"]
},
"type": ["null", "array"]
},
"resourceRates": {
"properties": {
"external": {
"items": {
"properties": {},
"type": ["null", "object"]
},
"type": ["null", "array"]
},
"internal": {
"items": {
"properties": {},
"type": ["null", "object"]
},
"type": ["null", "array"]
}
},
"type": ["null", "object"]
},
"isProjectManager": {
"type": ["null", "boolean"]
},
"tags": {
"items": {
"type": ["null", "object"]
},
"type": ["null", "array"]
}
}
}
}

View File

@@ -14,7 +14,8 @@ public class PostgresCdcProperties {
final Properties props = commonProperties();
props.setProperty("plugin.name", PostgresUtils.getPluginValue(config.get("replication_method")));
if (config.has("snapshot_mode")) {
//The parameter `snapshot_mode` is passed in test to simulate reading the WAL Logs directly and skip initial snapshot
// The parameter `snapshot_mode` is passed in test to simulate reading the WAL Logs directly and
// skip initial snapshot
props.setProperty("snapshot.mode", config.get("snapshot_mode").asText());
} else {
props.setProperty("snapshot.mode", "initial");

View File

@@ -4,8 +4,6 @@
package io.airbyte.integrations.source.postgres;
import static io.airbyte.db.DataTypeUtils.TIMESTAMP_FORMATTER;
import static io.airbyte.db.DataTypeUtils.TIME_FORMATTER;
import static io.airbyte.db.jdbc.JdbcConstants.INTERNAL_COLUMN_NAME;
import static io.airbyte.db.jdbc.JdbcConstants.INTERNAL_COLUMN_TYPE;
import static io.airbyte.db.jdbc.JdbcConstants.INTERNAL_COLUMN_TYPE_NAME;

View File

@@ -166,4 +166,5 @@ public class CdcWalLogsPostgresSourceDatatypeTest extends AbstractPostgresSource
.build());
}
}
}

View File

@@ -111,11 +111,11 @@ class SnowflakeJdbcSourceAcceptanceTest extends JdbcSourceAcceptanceTest {
.withSupportedSyncModes(List.of(SyncMode.FULL_REFRESH, SyncMode.INCREMENTAL))
.withSourceDefinedPrimaryKey(List.of(List.of(COL_ID))),
CatalogHelpers.createAirbyteStream(
TABLE_NAME_WITHOUT_PK,
defaultNamespace,
Field.of(COL_ID, JsonSchemaType.INTEGER),
Field.of(COL_NAME, JsonSchemaType.STRING),
Field.of(COL_UPDATED_AT, JsonSchemaType.STRING_DATE))
TABLE_NAME_WITHOUT_PK,
defaultNamespace,
Field.of(COL_ID, JsonSchemaType.INTEGER),
Field.of(COL_NAME, JsonSchemaType.STRING),
Field.of(COL_UPDATED_AT, JsonSchemaType.STRING_DATE))
.withSupportedSyncModes(List.of(SyncMode.FULL_REFRESH, SyncMode.INCREMENTAL))
.withSourceDefinedPrimaryKey(Collections.emptyList()),
CatalogHelpers.createAirbyteStream(

View File

@@ -10,4 +10,4 @@
"submitted_at": 9999999999
}
}
}
}

View File

@@ -3,7 +3,6 @@ import json
import re
import shutil
import tempfile
import sys
from pathlib import Path
from unittest.mock import patch
@@ -180,4 +179,4 @@ def test_validate_mask_values(connector_name, dict_json_value, expected_secret,
loader = SecretsLoader(connector_name=connector_name, gsm_credentials={})
json_value = json.loads(dict_json_value)
loader.mask_secrets_from_action_log(None, json_value)
assert expected_secret in capsys.readouterr().out
assert expected_secret in capsys.readouterr().out