Skip to content

Instantly share code, notes, and snippets.

@NazarenkoDenis
Created January 28, 2025 11:39
Show Gist options
  • Select an option

  • Save NazarenkoDenis/f82fd35b6d83b00e352da4e3605ae43a to your computer and use it in GitHub Desktop.

Select an option

Save NazarenkoDenis/f82fd35b6d83b00e352da4e3605ae43a to your computer and use it in GitHub Desktop.
{
"tables": [
{
"lineageID": "0b157755-1ac9-3457-97af-2535c3a3ca2c",
"columns": [
{
"lineageID": "1d2c1fd4-4185-4691-8657-323753d925c2",
"name": "hs_code",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "inventory_items.harmonized_system_code",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
}
],
"datasource": {}
},
{
"lineageID": "0b8f72da-be84-3286-9342-df90ab38e908",
"columns": [
{
"lineageID": "2449ed70-c3df-480f-9f2f-a3a11503bc92",
"isRemoved": true
},
{
"lineageID": "8d0d38b7-48ee-4b58-b7e4-3d770559e012",
"isRemoved": true
},
{
"lineageID": "5d5339aa-e5e3-4423-9a0b-bd74304beaa7",
"name": "total_available_bocage",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(inventory_levels.total_available, inventory_levels.location_id = 12285313139)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "f7228341-6800-435a-8828-ef0d7639780e",
"name": "total_available_bourgogne",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(inventory_levels.total_available, inventory_levels.location_id = 13682376819)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "8aebffb6-8301-4df1-bbc3-582068aaa920",
"name": "total_available_nfs",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(inventory_levels.total_available, inventory_levels.location_id = 83001246019)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "47fe0ea2-2639-434f-bbde-e5e90323f75a",
"name": "total_available_nyc_imported",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(inventory_levels.total_available, inventory_levels.location_id = 81187537219)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "f887f456-194f-4be5-9b49-7e2d75c4d5f3",
"name": "total_available_on_loan",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(inventory_levels.total_available, inventory_levels.location_id = 64113049715)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "ac8b517e-6b58-40b0-8004-d6a9fb81af81",
"name": "total_available_sample_salon",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(inventory_levels.total_available, inventory_levels.location_id = 64113016947)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
}
],
"datasource": {}
},
{
"lineageID": "0203f35e-9f8c-34a0-b813-bb5f0a401209",
"columns": [
{
"lineageID": "506806a7-6f02-4206-a4fa-c146e28412c9",
"isRemoved": true
},
{
"lineageID": "1b8bd822-a327-4f9c-8553-bf96a6f105d1",
"isRemoved": true
},
{
"lineageID": "6daa9266-9ce8-495c-a782-a1d6b0ee8aa4",
"isRemoved": true
},
{
"lineageID": "6f42d214-dfba-4dd1-a3d6-13eecb4be110",
"isRemoved": true
},
{
"lineageID": "1f11853d-03e1-49dc-8f5f-640377c03e5a",
"isRemoved": true
},
{
"lineageID": "8a0dbe2b-a13a-429f-8c79-adf0760dac0a",
"isRemoved": true
},
{
"lineageID": "626eb7c2-df1a-3952-94d5-8635c63e4c9a",
"name": "total_net_sales",
"kind": "measure",
"dataType": "",
"isUnique": false,
"isHidden": false,
"expression": "order_items.total_gross_sales - order_items.total_discount_allocation - refund_items.total_amount",
"label": "Net Sales",
"description": "",
"valueFormat": "money",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "b01699d2-7b76-4b95-9617-9df911eedd97",
"name": "total_quantity_bocage",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(order_items.total_quantity, orders.location_id = 12285313139)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "5d3b1e68-d741-433f-9545-0ec6b395bf7e",
"name": "total_quantity_bourgogne",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(order_items.total_quantity, orders.location_id = 13682376819)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "9fa7f833-b4fd-455d-9136-caed3d3565be",
"name": "total_quantity_nfs",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(order_items.total_quantity, orders.location_id = 83001246019)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "3c87b2fd-7f72-4dbf-8e7a-2e0884acd833",
"name": "total_quantity_nyc_imported",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(order_items.total_quantity, orders.location_id = 81187537219)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "7ed27213-3f7f-4ef6-aa60-e3ca9f3e9461",
"name": "total_quantity_on_loan",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(order_items.total_quantity, orders.location_id = 64113049715)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "e3c593b7-a391-4e3a-ba95-ac205181b565",
"name": "total_quantity_sample_salon",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "calculate(order_items.total_quantity, orders.location_id = 64113016947)",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "43d8efca-6c49-3941-9243-8ca531cb2413",
"expression": "if(and(order_items.total_net_sales \u003e 0, order_items.total_cost \u003e 0), (order_items.total_net_sales - order_items.total_cost) / order_items.total_net_sales * 100, 0)",
"description": ""
}
],
"datasource": {}
},
{
"lineageID": "da2189f5-7013-34c2-a50d-bb9676477265",
"columns": [
{
"lineageID": "890b4eed-d434-47d0-bc1b-87f1668347d2",
"name": "presentment_money",
"kind": "dimension",
"dataType": "",
"isUnique": false,
"isHidden": false,
"expression": "json_path(orders.total_price_set, \"presentment_money.amount\")",
"label": "Total Sales/Presentment",
"description": "",
"valueFormat": "default",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "92c80a9b-34f2-23f2-ffaa-464414d1614e",
"expression": "orders.total_net_amount - orders.total_cost"
},
{
"lineageID": "1ff31a9b-4134-23f2-ffaa-464414d1614e",
"expression": "IF(AND(orders.total_net_sales \u003e 0, orders.total_cost \u003e 0), (orders.total_net_sales - orders.total_cost) / orders.total_net_sales * 100, 0)",
"description": "The profit margin made during a specified time period. The margin is calculated as ([net sales - cost] / net sales) * 100."
}
],
"datasource": {}
},
{
"lineageID": "ff179673-7d04-31f0-af6d-64f9be050ad8",
"columns": [
{
"lineageID": "3f5b831b-b973-4387-85ae-e1ef09ac1a1d",
"name": "metafield_custom_lifecycle",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "json_path(products.meta_fields, \"custom.lifecycle\")",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "77d5d5f2-c8a3-43d9-96fa-9dbde5b4277c",
"name": "metafield_custom_category",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "json_path(products.meta_fields, \"custom.category\")",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "f44addc0-7f3c-4b86-9b2f-d763cfcec901",
"name": "metafield_custom_materials",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "json_path(products.meta_fields, \"custom.materials\")",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "f59d4b54-a562-4c9e-ab56-3cfe59cbca12",
"name": "metafield_custom_vendor_meta",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "json_path(products.meta_fields, \"custom.vendor_meta\")",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "b7ddef05-dfe8-4e36-98cb-1a75bcc688f7",
"name": "metafield_custom_style_",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "json_path(products.meta_fields, \"custom.style_\")",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "7db0f731-9941-4661-8cb6-772a2281c9bd",
"name": "metafield_custom_composition",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "json_path(products.meta_fields, \"custom.composition\")",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "3e73251e-eaa1-446d-a6ca-56456130ade8",
"name": "metafield_custom_comm_invoice_description",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "json_path(products.meta_fields, \"custom.comm_invoice_description\")",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
},
{
"lineageID": "97c756e0-802f-46d3-93c3-d89e418d901a",
"name": "metafield_custom_cost_",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "json_path(products.meta_fields, \"custom.cost_\")",
"label": "",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
}
],
"datasource": {}
},
{
"lineageID": "4892effe-4ade-3cdd-97e9-79085fecc8f7",
"columns": [
{
"lineageID": "b5f4af26-0519-40e5-9dcc-e20269136a1f",
"isRemoved": true
},
{
"lineageID": "7bd6c8ef-0548-4f66-a46f-bfc7df8d0de6",
"isRemoved": true
}
],
"datasource": {}
},
{
"lineageID": "c93dec84-7082-3b4e-8790-42072baa967d",
"columns": [
{
"lineageID": "9d4cbafc-56c4-44b0-ad1c-1ec0b5e6a962",
"name": "order_name",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "if(\n\torders.id \u003e 0,\n\torders.name,\n\texplore(\"default\", refunds.related_x(orders.name))\n)",
"label": "Order Name",
"description": "",
"valueFormat": "",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
}
],
"datasource": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment