version:v1name:order-summary-searchtype:servicetags:-syndicate-serviceservice:replicas:1compute:runnable-defaultingress:enabled:truestripPath:truepath:/order-summary/api/v1noAuthentication:truestack:beacon+restenvs:PGRST_OPENAPI_SERVER_PROXY_URI:https://touched-rattler.dataos.app/order-summary/api/v1/order-summary/api/v1beacon:source:type:databasename:ordersumdbworkspace:publictopology:-name:databasetype:inputdoc:order search database connection-name:rest-apitype:outputdoc:serves up the order search database as a RESTFUL APIdependencies:-database
---version:v1name:order-summ-datatype:workflowdescription:This jobs query lens and write data to postgres tableworkflow:title:Order Summarydag:-name:order-summary-datatitle:Order Summaryspec:stack:flare:5.0compute:runnable-defaultstackSpec:job:explain:trueinputs:-name:input_orderquery:|SELECT"product.total_products" as total_products,"order_shipment.total_order_quantity" as total_order_quantity,cast("order_shipment.total_shipment_cost" as int) as total_shipment_cost,"order_shipment.shipment_type" as shipment_type,"order.order_id" as order_id,"order.order_date" as order_ts,"retailer.type" as retailer_type,"retailer.name" as retailer_name,"retailer.chain" as retailer_chain,"retailer.state" as retailer_state,"retailer.city" as retailer_cityFROMLENS (SELECT"product.total_products","order_shipment.total_order_quantity","order_shipment.total_shipment_cost","order_shipment.shipment_type","order.order_id","order.order_date","retailer.type","retailer.name","retailer.chain","retailer.state","retailer.city"FROMsupplychain)options:SSL:"true"driver:"io.trino.jdbc.TrinoDriver"logLevel:INFOoutputs:-name:output01depot:dataos://ordersumdbdatabase:public?acl=rwdriver:org.postgresql.Driversteps:-sink:-sequenceName:input_orderdatasetName:order_summaryoutputName:output01outputType:JDBCQueryoutputOptions:query:INSERT INTO order_summary (__metadata, total_products, total_order_quantity, total_shipment_cost, shipment_type, order_id, order_ts, retailer_type, retailer_name, retailer_chain, retailer_state, retailer_city) VALUES ( to_json(?::JSONB), ?, ?, ?, ?, ?, ?,?, ?, ?, ?, ?) ON CONFLICT (order_id) DO UPDATE SET __metadata = excluded.__metadata, total_products = excluded.total_products, total_order_quantity = excluded.total_order_quantity, total_shipment_cost = excluded.total_shipment_cost, shipment_type=excluded.shipment_type, order_id = excluded.order_id, order_ts = excluded.order_ts, retailer_type = excluded.retailer_type, retailer_name= excluded.retailer_name, retailer_chain= excluded.retailer_chain, retailer_state= excluded.retailer_state, retailer_city= excluded.retailer_city