Skip to content

Instantly share code, notes, and snippets.

View meetchandan's full-sized avatar
🎯

Chandan Bhattad meetchandan

🎯
View GitHub Profile
insert into instant_order.instant_event(action_code, data, is_processed, schedule_at, backoff_config)
values
('CALCULATE_ADJUSTMENTS', '{"order_nr": "IAECAH165R5NBKQ2WA"}', 0, current_timestamp(), '{}'),
('CALCULATE_ADJUSTMENTS', '{"order_nr": "IAECBD1479PN9MYQ1A"}', 0, current_timestamp(), '{}'),
('CALCULATE_ADJUSTMENTS', '{"order_nr": "IAECB91478321I4PRA"}', 0, current_timestamp(), '{}'),
('CALCULATE_ADJUSTMENTS', '{"order_nr": "IAECAF146VRG5G6EYA"}', 0, current_timestamp(), '{}'),
('CALCULATE_ADJUSTMENTS', '{"order_nr": "IAECAB3919TAMOKFNA"}', 0, current_timestamp(), '{}'),
('CALCULATE_ADJUSTMENTS', '{"order_nr": "IAECAD166QS6301UCA"}', 0, current_timestamp(), '{}'),
('CALCULATE_ADJUSTMENTS', '{"order_nr": "IAECAB391ZDXHDYV0A"}', 0, current_timestamp(), '{}'),
('CALCULATE_ADJUSTMENTS', '{"order_nr": "IAECB5124FPHO69NUA"}', 0, current_timestamp(), '{}'),
WITH base AS (
SELECT
id_partner,
pbarcode_canonical,
psku_code,
LOWER(country_code) AS country_code,
qty,
allocated_unit_cost_lcy
FROM
`noonbicedata.cogs_v3.txlog_cogs_output`
{
"canCancel": false,
"cancelationReasons": [
{
"code": "cust_bought_by_mistake",
"desc": "Bought by mistake"
},
{
"code": "cust_changed_mind",
"desc": "Change of mind"
{
"fee_desc" : {
"title" : "How fees work",
"line_items": [
{
"title": "Small order Fee",
"icon": "image_url",
"desc": "..."
},
{
# RO: Replenishment Order
class RO:
id_ro int
ro_nr string uq
wh_code
po_nr
status # pending_approval, approved, rejected, cancelled, sent_to_vendor (should design allowed status transitions)
created_by
updated_by
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>DS polygons</name>
<Style id="poly-000000-2000-76-nodesc-normal">
<LineStyle>
<color>ff000000</color>
<width>2</width>
</LineStyle>
<PolyStyle>
explain
SELECT * from
offer.offer o FORCE INDEX (sku) WHERE
(id_partner=14371 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=35073 AND sku='N11201409A' AND id_catalog=1) OR (id_partner=27063 AND sku='N11074931A' AND id_catalog=1) OR (id_partner=17493 AND sku='N11074839A' AND id_catalog=1) OR (id_partner=35255 AND sku='N11074931A' AND id_catalog=1) OR (id_partner=891 AND sku='N11074931A' AND id_catalog=1) OR (id_partner=21400 AND sku='N11075084A' AND id_catalog=1) OR (id_partner=14289 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=36817 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=887 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=31865 AND sku='N11074931A' AND id_catalog=1) OR (id_partner=27810 AND sku='N11201409A' AND id_catalog=1) OR (id_partner=36018 AND sku='N11074839A' AND id_catalog=1) OR (id_partner=29082 AND sku='N11201258A' AND id_catalog=1) OR (id_partner=36878 AND sku='N11075084A' AND id_catalog=1) OR (id_partner=13362 AND sku='N11201258A' AND id_catalog=1) OR (id_
{
"totalSteps": 4,
"stepLengths": [
15,
30,
40,
15
],
"position": 2,
"estimateStatus": "Delayed",
import requests
from decimal import Decimal
'''
Few points:
1. MP would only tell the total amount to refund, it would not do any
calculations of how much is already refunded etc etc
2. MP would not talk to temporal directly(?)
3. Didn't feel the need to use signals,
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<name>Untitled layer</name>
<Style id="poly-000000-1200-77-nodesc-normal">
<LineStyle>
<color>ff000000</color>
<width>1.2</width>
</LineStyle>
<PolyStyle>