stefano_nicolai
06/23/2021, 12:31 PMschema = th.PropertiesList(
th.Property("...", th.StringType),
...
th.Property("OrderTotal", th.ObjectType(
th.Property("CurrencyCode", th.StringType),
th.Property("Amount", th.NumberType)
)
),
...
)
When we run the tap, we receive the two following warnings, only once per run:
time=2021-06-23 13:30:20 name=tap-test level=WARNING message=Catalog entry missing for 'orders':'('properties', 'OrderTotal', 'properties', 'CurrencyCode')'. Using parent value of selected=True.
time=2021-06-23 13:30:20 name=tap-test level=WARNING message=Catalog entry missing for 'orders':'('properties', 'OrderTotal', 'properties', 'Amount')'. Using parent value of selected=True.
stefano_nicolai
06/23/2021, 12:32 PM{
...,
"OrderTotal": {"type": ["object", "null"],
"properties": {
"CurrencyCode": {"type": ["string", "null"]},
"Amount": {"type": ["number", "null"]}
}
},
...
}
Could you help us identify the underlying issue?aaronsteers
06/23/2021, 4:52 PMaaronsteers
06/23/2021, 4:53 PMaaronsteers
06/23/2021, 5:00 PMIf we create an ELT with "target-bigquery" the table row is correctly created with a nested fieldThis indicates schema is being passed correctly.
but both "CurrencyCode" and "Amount" are NULL...The differences in the CSV loading may be an issue/symptom of the target CSV. @stefano_nicolai - Can you try with target-jsonl and let me know if you get the correct structure in a jsonl output?
aaronsteers
06/23/2021, 5:03 PM"Property '{property_name}' was present in the '{stream_name}' stream but not found in catalog schema. Ignoring."
Can you check your logs for a substring of this text, to see if there are any cases on unmapped properties when mapping record data and schema?stefano_nicolai
06/25/2021, 10:21 AMaaronsteers
06/25/2021, 5:14 PMWe think the main problem is the lack of the optional nested field "OrderTotal" in some of the source records, and how the tap is handling them.And yes, to your question, it would be very helpful to see the schema definition and logic to populate a record. Can you share those here or in a an issue in the SDK issue tracker? (If this is a public repo, you can also share a link.)
stefano_nicolai
06/28/2021, 4:10 PMtime=_2021-06-28_
_08:18:48_ name=tap-amazon level=INFO message=tap-amazon v0.0.1, Singer SDK v0.2.0)
time=_2021-06-28_
_08:18:48_ name=tap-amazon level=INFO message=Skipping parse of env var settings...
time=_2021-06-28_
_08:18:48_ name=tap-amazon level=INFO message=Config validation passed with 0 errors and 0 warnings.
time=_2021-06-28_
_08:18:48_ name=tap-amazon level=INFO message=Beginning incremental sync of 'orders'...
time=_2021-06-28_
_08:18:48_ name=tap-amazon level=WARNING message=Catalog entry missing for 'orders':'('properties', 'OrderTotal', 'properties', 'CurrencyCode')'. Using parent value of selected=True.
time=_2021-06-28_
_08:18:48_ name=tap-amazon level=WARNING message=Catalog entry missing for 'orders':'('properties', 'OrderTotal', 'properties', 'Amount')'. Using parent value of selected=True.
{"type": "SCHEMA", "stream": "orders", "schema": {"properties": {"AmazonOrderId": {"type": ["string", "null"]}, "PurchaseDate": {"format": "date-time", "type": ["string", "null"]}, "LastUpdateDate": {"format": "date-time", "type": ["string", "null"]}, "OrderStatus": {"type": ["string", "null"]}, "SellerOrderId": {"type": ["string", "null"]}, "FulfillmentChannel": {"type": ["string", "null"]}, "SalesChannel": {"type": ["string", "null"]}, "ShipServiceLevel": {"type": ["string", "null"]}, "OrderTotal": {"properties": {"CurrencyCode": {"type": ["string", "null"]}, "Amount": {"type": ["number", "null"]}}, "type": ["object", "null"]}, "NumberOfItemsShipped": {"type": ["integer", "null"]}, "NumberOfItemsUnshipped": {"type": ["integer", "null"]}, "PaymentMethod": {"type": ["string", "null"]}, "PaymentMethodDetails": {"items": {"type": ["string"]}, "type": ["array", "null"]}, "IsReplacementOrder": {"type": ["boolean", "null"]}, "MarketplaceId": {"type": ["string", "null"]}, "ShipmentServiceLevelCategory": {"type": ["string", "null"]}, "OrderType": {"type": ["string", "null"]}, "EarliestShipDate": {"format": "date-time", "type": ["string", "null"]}, "LatestShipDate": {"format": "date-time", "type": ["string", "null"]}, "IsBusinessOrder": {"type": ["boolean", "null"]}, "IsSoldByAB": {"type": ["boolean", "null"]}, "IsPrime": {"type": ["boolean", "null"]}, "IsGlobalExpressEnabled": {"type": ["boolean", "null"]}, "IsPremiumOrder": {"type": ["boolean", "null"]}, "IsISPU": {"type": ["boolean", "null"]}}, "type": "object"}, "key_properties": ["AmazonOrderId"], "bookmark_properties": ["LastUpdateDate"]}
{"type": "RECORD", "stream": "orders", "record": {"AmazonOrderId": "xx1-xxxxxxx-xxxxxxx", "PurchaseDate": "2021-01-01T00:00:00Z", "LastUpdateDate": "2021-01-01T00:00:00Z", "OrderStatus": "Shipped", "SellerOrderId": "xx1-xxxxxxx-xxxxxxx", "FulfillmentChannel": "XXX", "SalesChannel": "<http://Amazon.com|Amazon.com>", "ShipServiceLevel": "Expedited", "OrderTotal": {"CurrencyCode": "EUR", "Amount": "10.01"}, "NumberOfItemsShipped": 1, "NumberOfItemsUnshipped": 0, "PaymentMethod": "Other", "PaymentMethodDetails": ["Standard"], "IsReplacementOrder": true, "MarketplaceId": "XXXXXXXXXXXXX", "ShipmentServiceLevelCategory": "Expedited", "OrderType": "StandardOrder", "EarliestShipDate": "2021-01-01T00:00:00Z", "LatestShipDate": "2021-01-01T00:00:00Z", "IsBusinessOrder": false, "IsSoldByAB": false, "IsPrime": false, "IsGlobalExpressEnabled": false, "IsPremiumOrder": false, "IsISPU": false}, "time_extracted": "2021-01-01T00:00:00Z"}
`{"type": "STATE", "value": {"bookmarks": {"ord…stefano_nicolai
06/28/2021, 4:11 PMaaronsteers
06/28/2021, 7:20 PMEnsure null parent properties are aways created.
or going all the way to the leaf items: Full property tree is created even when nodes are empty/null.
aaronsteers
06/28/2021, 7:24 PMdouwe_maan
06/28/2021, 9:19 PMOrderTotal
is missing entirely or whether it is present with a null
value, The schema allows null
as an alternative to object
, and I’d expect a missing key to be interpreted the same, but perhaps these targets care. Either way, it’s technically a bug in the targets (and I think it deserves an issue there, especially if it’s fixed in the adswerve variant but not the pipelinewise ones), but if the SDK can do something extra (that isn’t too expensive) to fill in the missing fields with explict null
s, that could make sense.stefano_nicolai
06/30/2021, 7:55 AM