jon_simpson
02/03/2023, 7:06 PM#invoice
{
'id':12,
'price': 23
'shipment':{
'uuid': ASDASD-23123,
'status': 'pending'
}
}
Looking to have two outputs
invoice_id, price
12, 23
And a shipment info
shipment_uuid, invoice_id (from higher in the body), status
ASDADS-23123, 12, pendingaaronsteers
02/03/2023, 7:42 PMObjectType
. The "author" example at the following link is a good example of this:
https://sdk.meltano.com/en/latest/typing.htmlaaronsteers
02/03/2023, 7:43 PM.to_dict()
at the bottom of that sample basically converts it to JSON Schema anyway.) The classes are more concise though, and you get the benefits of type checking, etc.jon_simpson
02/03/2023, 7:43 PMaaronsteers
02/03/2023, 7:45 PMjon_simpson
02/03/2023, 7:46 PMaaronsteers
02/03/2023, 7:47 PMStream
class declaration, you can add something like:
class MyStream(RESTStream):
schema = PropertiesList(
Property("id", IntegerType, required=True),
Property("price", IntegerType, required=True),
Property(
"shipment",
ObjectType(
Property("uuid", StringType),
Property("status", StringType),
)
).to_dict()
jon_simpson
02/03/2023, 7:48 PMinvoice_shipments
but only have uuid, status
without the id from invoiceaaronsteers
02/03/2023, 7:49 PMaaronsteers
02/03/2023, 7:50 PMjon_simpson
02/03/2023, 7:51 PMaaronsteers
02/03/2023, 7:51 PM