From 8c762493b2b85d7f4756ef82d1264ddd587bcd45 Mon Sep 17 00:00:00 2001 From: Diego Rodriguez Date: Wed, 3 Jan 2024 15:23:24 -0300 Subject: [PATCH] fix: schemas --- schemas/correction_step/output.avsc | 226 ++++++++++++++-------------- schemas/feature_step/output.avsc | 185 +++++++++++------------ schemas/lightcurve_step/output.avsc | 4 +- schemas/xmatch_step/output.avsc | 4 +- 4 files changed, 207 insertions(+), 212 deletions(-) diff --git a/schemas/correction_step/output.avsc b/schemas/correction_step/output.avsc index 11da39f65..0cab6cc73 100644 --- a/schemas/correction_step/output.avsc +++ b/schemas/correction_step/output.avsc @@ -27,119 +27,119 @@ "type": { "type": "array", "items": { - "type": "record", - "name": "alert", - "fields": [ - { - "name": "aid", - "type": "string" - }, - { - "name": "oid", - "type": "string" - }, - { - "name": "sid", - "type": "string" - }, - { - "name": "pid", - "type": "long" - }, - { - "name": "tid", - "type": "string" - }, - { - "name": "fid", - "type": "string" - }, - { - "name": "candid", - "type": ["string", "long"] - }, - { - "name": "mjd", - "type": "double" - }, - { - "name": "ra", - "type": "double" - }, - { - "name": "e_ra", - "type": "float" - }, - { - "name": "dec", - "type": "double" - }, - { - "name": "e_dec", - "type": "float" - }, - { - "name": "mag", - "type": "float" - }, - { - "name": "e_mag", - "type": "float" - }, - { - "name": "mag_corr", - "type": ["float", "null"] - }, - { - "name": "e_mag_corr", - "type": ["float", "null"] - }, - { - "name": "e_mag_corr_ext", - "type": ["float", "null"] - }, - { - "name": "isdiffpos", - "type": "int" - }, - { - "name": "corrected", - "type": "boolean" - }, - { - "name": "dubious", - "type": "boolean" - }, - { - "name": "stellar", - "type": "boolean" - }, - { - "name": "has_stamp", - "type": "boolean" - }, - { - "name": "forced", - "type": "boolean" - }, - { - "name": "new", - "type": "boolean" - }, - { - "name": "parent_candid", - "type": ["string", "long", "null"] - }, - { - "name": "extra_fields", - "type": { - "default": {}, - "type": "map", - "values": ["null", "int", "float", "string", "bytes", "boolean"] + "type": "record", + "name": "alert", + "fields": [ + { + "name": "aid", + "type": ["string", "null"] + }, + { + "name": "oid", + "type": "string" + }, + { + "name": "sid", + "type": "string" + }, + { + "name": "pid", + "type": "long" + }, + { + "name": "tid", + "type": "string" + }, + { + "name": "fid", + "type": "string" + }, + { + "name": "candid", + "type": ["string", "long"] + }, + { + "name": "mjd", + "type": "double" + }, + { + "name": "ra", + "type": "double" + }, + { + "name": "e_ra", + "type": "float" + }, + { + "name": "dec", + "type": "double" + }, + { + "name": "e_dec", + "type": "float" + }, + { + "name": "mag", + "type": "float" + }, + { + "name": "e_mag", + "type": "float" + }, + { + "name": "mag_corr", + "type": ["float", "null"] + }, + { + "name": "e_mag_corr", + "type": ["float", "null"] + }, + { + "name": "e_mag_corr_ext", + "type": ["float", "null"] + }, + { + "name": "isdiffpos", + "type": "int" + }, + { + "name": "corrected", + "type": "boolean" + }, + { + "name": "dubious", + "type": "boolean" + }, + { + "name": "stellar", + "type": "boolean" + }, + { + "name": "has_stamp", + "type": "boolean" + }, + { + "name": "forced", + "type": "boolean" + }, + { + "name": "new", + "type": "boolean" + }, + { + "name": "parent_candid", + "type": ["string", "long", "null"] + }, + { + "name": "extra_fields", + "type": { + "default": {}, + "type": "map", + "values": ["null", "int", "float", "string", "bytes", "boolean"] + } } - } - ] - }, + ] + }, "default": [] } }, @@ -153,7 +153,7 @@ "fields": [ { "name": "aid", - "type": "string" + "type": ["string", "null"] }, { "name": "oid", diff --git a/schemas/feature_step/output.avsc b/schemas/feature_step/output.avsc index 93f9fa37c..841d0e360 100644 --- a/schemas/feature_step/output.avsc +++ b/schemas/feature_step/output.avsc @@ -1,103 +1,98 @@ { - "doc": "Multi stream light curve with xmatch", - "name": "alerce.light_curve_xmatched", - "type": "record", - "fields": [ - {"name": "oid", "type": "string"}, - {"name": "candid", "type": {"type": "array", "items": "string"}}, - { - "name": "detections", - "type": + "doc": "Multi stream light curve with xmatch", + "name": "alerce.light_curve_xmatched", + "type": "record", + "fields": [ + { "name": "oid", "type": "string" }, + { "name": "candid", "type": { "type": "array", "items": "string" } }, + { + "name": "detections", + "type": { + "type": "array", + "default": [], + "items": { + "name": "detections_record", + "type": "record", + "fields": [ + { "name": "candid", "type": ["long", "string"] }, + { "name": "tid", "type": "string" }, + { "name": "aid", "type": ["string", "null"] }, + { "name": "oid", "type": ["long", "string"] }, + { "name": "mjd", "type": "double" }, + { "name": "sid", "type": "string" }, + { "name": "fid", "type": "string" }, + { "name": "pid", "type": "long" }, + { "name": "ra", "type": "double" }, + { "name": "e_ra", "type": "float" }, + { "name": "dec", "type": "double" }, + { "name": "e_dec", "type": "float" }, + { "name": "mag", "type": "float" }, + { "name": "e_mag", "type": "float" }, + { "name": "mag_corr", "type": ["float", "null"] }, + { "name": "e_mag_corr", "type": ["float", "null"] }, + { "name": "e_mag_corr_ext", "type": ["float", "null"] }, + { "name": "isdiffpos", "type": "int" }, + { "name": "corrected", "type": "boolean" }, + { "name": "dubious", "type": "boolean" }, + { "name": "has_stamp", "type": "boolean" }, + { "name": "stellar", "type": "boolean" }, + { "name": "forced", "type": "boolean" }, + { "name": "new", "type": "boolean" }, + { "name": "parent_candid", "type": ["long", "string", "null"] }, { - "type": "array", - "default": [], - "items": { - "name": "detections_record", - "type": "record", - "fields": [ - {"name": "candid", "type": [ "long", "string" ]}, - {"name": "tid", "type": "string"}, - {"name": "aid", "type": "string"}, - {"name": "oid", "type": ["long", "string" ]}, - {"name": "mjd", "type": "double"}, - {"name": "sid", "type": "string"}, - {"name": "fid", "type": "string"}, - {"name": "pid", "type": "long"}, - {"name": "ra", "type": "double"}, - {"name": "e_ra", "type": "float"}, - {"name": "dec", "type": "double"}, - {"name": "e_dec", "type": "float"}, - {"name": "mag", "type": "float"}, - {"name": "e_mag", "type": "float"}, - {"name": "mag_corr", "type": ["float", "null"]}, - {"name": "e_mag_corr", "type": ["float", "null"]}, - {"name": "e_mag_corr_ext", "type": ["float", "null"]}, - {"name": "isdiffpos", "type": "int"}, - {"name": "corrected", "type": "boolean"}, - {"name": "dubious", "type": "boolean"}, - {"name": "has_stamp", "type": "boolean"}, - {"name": "stellar", "type": "boolean"}, - {"name": "forced", "type": "boolean"}, - {"name": "new", "type": "boolean"}, - {"name": "parent_candid", "type": ["long", "string", "null"]}, - { - "name": "extra_fields", - "type": { - "default": {}, - "type": "map", - "values": [ - "null", - "int", - "float", - "string", - "bytes", - "boolean" - ] - } - } - ] - } + "name": "extra_fields", + "type": { + "default": {}, + "type": "map", + "values": ["null", "int", "float", "string", "bytes", "boolean"] + } } - }, + ] + } + } + }, + { + "name": "non_detections", + "type": { + "type": "array", + "default": [], + "items": { + "name": "non_detections_record", + "type": "record", + "fields": [ + { "name": "aid", "type": ["string", "null"] }, + { "name": "tid", "type": "string" }, + { "name": "sid", "type": "string" }, + { "name": "oid", "type": ["long", "string"] }, + { "name": "mjd", "type": "double" }, + { "name": "fid", "type": "string" }, + { "name": "diffmaglim", "type": "float" } + ] + } + } + }, + { + "name": "xmatches", + "type": [ { - "name": "non_detections", - "type": { - "type": "array", - "default": [], - "items": { - "name": "non_detections_record", - "type": "record", - "fields": [ - {"name": "aid", "type": "string"}, - {"name": "tid", "type": "string"}, - {"name": "sid", "type": "string"}, - {"name": "oid", "type": ["long", "string" ]}, - {"name": "mjd", "type": "double"}, - {"name": "fid", "type": "string"}, - {"name": "diffmaglim", "type": "float"} - ] - } - } + "type": "map", + "values": { + "type": "map", + "values": ["string", "float", "null", "int"] + } }, + "null" + ] + }, + { + "name": "features", + "type": [ { - "name": "xmatches", - "type": [ - { - "type": "map", - "values": {"type": "map", "values": ["string", "float", "null", "int"]} - }, - "null" - ] + "type": "map", + "values": ["boolean", "float", "null", "int"] }, - { - "name": "features", - "type": [ - { - "type": "map", - "values": ["boolean", "float", "null", "int"] - }, - "null" - ] - } - ] + "null" + ] + } + ] } diff --git a/schemas/lightcurve_step/output.avsc b/schemas/lightcurve_step/output.avsc index b28ab3bce..8f53d770d 100644 --- a/schemas/lightcurve_step/output.avsc +++ b/schemas/lightcurve_step/output.avsc @@ -24,7 +24,7 @@ "fields": [ { "name": "aid", - "type": "string" + "type": ["string", "null"] }, { "name": "oid", @@ -121,7 +121,7 @@ "fields": [ { "name": "aid", - "type": "string" + "type": ["string", "null"] }, { "name": "oid", diff --git a/schemas/xmatch_step/output.avsc b/schemas/xmatch_step/output.avsc index 16b45020c..1058d6234 100644 --- a/schemas/xmatch_step/output.avsc +++ b/schemas/xmatch_step/output.avsc @@ -33,7 +33,7 @@ }, { "name": "aid", - "type": "string" + "type": ["string", "null"] }, { "name": "oid", @@ -146,7 +146,7 @@ "fields": [ { "name": "aid", - "type": "string" + "type": ["string", "null"] }, { "name": "tid",