Announcements and Reminders | Scott | Announcements: Ongoing Topics: SIG Recruitment: We will need to be recruiting for a variety of roles in the coming months. Please consider whether you would be interested. Please reach out to Scott Perry or Sharon Markus with any questions. |
Mapping Working Group | Mike | The task: We have over 80 Derived Tables scripts that currently extract JSON objects/arrays Metadb 1.4 can do this for us automatically by creating appropriate MAPPING commands We need to create the MAPPINGs
For today: Review Metadb documentation which outlines how to create these mappings Example of a Mapping created from a derived table creation script. From the po_lines_cost.sql script: jsonb_extract_path_text(pol.jsonb, 'cost', 'listUnitPrice')::numeric(19,4) AS po_line_list_unit_price_phys,
jsonb_extract_path_text(pol.jsonb, 'cost', 'quantityPhysical') AS po_line_quant_phys,
jsonb_extract_path_text(pol.jsonb, 'cost', 'listUnitPriceElectronic')::numeric(19,4) AS po_line_list_unit_price_elec,
jsonb_extract_path_text(pol.jsonb, 'cost', 'quantityElectronic') AS po_line_quant_elec,
jsonb_extract_path_text(pol.jsonb, 'cost', 'additionalCost')::numeric(19,4) AS po_line_additional_cost,
jsonb_extract_path_text(pol.jsonb, 'cost', 'currency') AS po_line_currency,
jsonb_extract_path_text(pol.jsonb, 'cost', 'discount')::numeric(19,4) AS po_line_discount,
jsonb_extract_path_text(pol.jsonb, 'cost', 'discountType') AS po_line_discount_type,
jsonb_extract_path_text(pol.jsonb, 'cost', 'poLineEstimatedPrice')::numeric(19,4) AS po_line_estimated_price
TO this in the Mapping file CREATE DATA MAPPING FOR json FROM TABLE folio_orders.po_line__ COLUMN jsonb PATH '$.cost' TO 'cost';
Meta analysis. I have written a script that tries to collect all Fields+Tables that are being extracted. This might speed up the analysis Divvying up the work. This spreadsheet might help. |