Amanda Maurell
06/18/2024, 5:20 PMdata should not be empty
.
The response I want to save contains 30 jsons. 15 of them contain 22 keys, whilst the other half contain 1 key less. I mention all of the 22 keys in the schema and the nested ones.
Anyone has any idea why it might be breaking? Should I add something to accept the missing key from part of the records?
I'll add the schema and the yml file in the thread đ§”Amanda Maurell
06/18/2024, 5:20 PM{
"$schema": "<http://json-schema.org/draft-07/schema#>",
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"title": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"price": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"discountPercentage": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"rating": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
]
},
"stock": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"tags": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"brand": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"required": []
},
"sku": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"weight": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"dimensions": {
"type": "object",
"properties": {
"width": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"height": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"depth": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
}
},
"required": []
},
"warrantyInformation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"shippingInformation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"availabilityStatus": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"reviews": {
"type": "array",
"items": {
"type": "object"
}
},
"returnPolicy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"minimumOrderQuantity": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
]
},
"meta": {
"type": "object",
"properties": {
"createdAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"updatedAt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"barcode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
},
"qrCode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": []
},
"images": {
"anyOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "null"
}
]
},
"thumbnail": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"id"
]
}
Amanda Maurell
06/18/2024, 5:21 PMplugins:
extractors:
- name: tap-rest-api-msdk
variant: widen
pip_url: tap-rest-api-msdk
config:
api_url: <https://dummyjson.com/products>
streams:
- name: products_etl
primary_keys:
- id
records_path: $.products[*]
schema: extract/products_schema.json
schema-flattening: False
limit: 15
loaders:
- name: target-csv
variant: hotgluexyz
pip_url: git+<https://github.com/hotgluexyz/target-csv.git>
config:
destination_path: raw_data
delimiter: ","
quotechar: '"'
doublequote: true
allow_missing_keys: true
Edgar RamĂrez (Arch.dev)
06/19/2024, 11:03 AMEdgar RamĂrez (Arch.dev)
06/19/2024, 11:04 AMEdgar RamĂrez (Arch.dev)
06/19/2024, 11:09 AMAmanda Maurell
06/19/2024, 12:21 PMEdgar RamĂrez (Arch.dev)
06/19/2024, 12:48 PMAmanda Maurell
06/19/2024, 9:34 PM"meta_createdAt": {
"type": "string"
},
"meta_updatedAt": {
"type": "string"
},
"meta_barcode": {
"type": "string"
},
"meta_qrCode": {
"type": "string"
}
Or am I missing something? đ€Edgar RamĂrez (Arch.dev)
06/20/2024, 9:17 AMAmanda Maurell
06/20/2024, 9:45 AMEdgar RamĂrez (Arch.dev)
06/20/2024, 9:47 AM$ .meltano/loaders/target-csv/venv/bin/pip list
Package Version
--------------- -----------
backoff 1.8.0
ciso8601 2.3.1
jsonschema 2.6.0
pip 24.1b1
python-dateutil 2.9.0.post0
pytz 2018.4
setuptools 70.0.0
simplejson 3.11.1
singer-python 5.12.1
six 1.16.0
target-csv 0.3.6
wheel 0.43.0
Amanda Maurell
06/20/2024, 9:48 AMEdgar RamĂrez (Arch.dev)
06/20/2024, 9:50 AMAmanda Maurell
06/20/2024, 9:50 AMAmanda Maurell
06/20/2024, 9:53 AMEdgar RamĂrez (Arch.dev)
06/20/2024, 10:08 AMmeltano remove loader target-csv
meltano add loader target-csv --variant meltanolabs
https://hub.meltano.com/loaders/target-csv--meltanolabs/Amanda Maurell
06/20/2024, 6:07 PMEdgar RamĂrez (Arch.dev)
06/20/2024, 6:09 PMmeltanolabs
variant?Amanda Maurell
06/20/2024, 6:10 PMAmanda Maurell
06/20/2024, 6:12 PM