Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save NazarenkoDenis/6cc55feccb242f969c5a611158c1ce52 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": "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": []
},
{
"lineageID": "0514e9c2-e1a6-44e0-96e8-786a7b8cf8bb",
"name": "total_cost",
"kind": "measure",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "inventory_levels.sum_x(inventory_items.cost * inventory_levels.available)",
"label": "",
"description": "",
"valueFormat": "money",
"labelShort": "",
"groupLabel": "",
"requiredFields": [],
"drillColumns": [],
"aliases": [],
"timeframes": []
}
],
"datasource": {}
},
{
"lineageID": "0203f35e-9f8c-34a0-b813-bb5f0a401209",
"columns": [
{
"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": "6521bff8-f431-42aa-b202-bedaa8559a76",
"name": "test",
"kind": "dimension",
"dataType": "string",
"isUnique": false,
"isHidden": false,
"expression": "",
"label": "",
"description": "",
"valueFormat": "",
"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": "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