{"id":4412,"date":"2026-05-05T11:45:33","date_gmt":"2026-05-05T11:45:33","guid":{"rendered":"https:\/\/ranaghazzi.com\/?p=4412"},"modified":"2026-05-12T00:01:08","modified_gmt":"2026-05-12T00:01:08","slug":"4412","status":"publish","type":"post","link":"https:\/\/ranaghazzi.com\/?p=4412","title":{"rendered":"AirFlights Gold Layer"},"content":{"rendered":"<p><style>\n    .light-font-container, .light-font-container p, .light-font-container h2, .light-font-container li {<br \/>\n        font-weight: #FFFFFF !important;<br \/>\n    }<br \/>\n<\/style>\n<\/p>\n<div class=\"light-font-container\" style=\"background-color: #2b85d9; padding: 40px; border-radius: 15px;\">\n<div class=\"light-font-container\" style=\"background-color: #2b85d9; padding: 40px; border-radius: 15px;\">\n<h2 style=\"text-align: center;\">AirFlights Gold Layer &#8211; Round-Trip Analysis<\/h2>\n<div style=\"height: 20px;\">\u00a0<\/div>\n<\/div>\n\n\n<div class=\"wp-block-group alignwide has-contrast-color has-text-color has-link-color wp-elements-87138d2254dce82b002b2b83b3ffeea6 has-global-padding is-layout-constrained wp-block-group-is-layout-constrained\">\n<p class=\"has-text-align-center has-contrast-color has-text-color has-link-color has-large-font-size wp-elements-3d3dbf84351774319040046406d83829 wp-block-paragraph\"><strong>Tools: Databricks | Pandas | PyArrow | PySpark | Delta Lake <\/strong><\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-buttons alignwide is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-35f06ea7 wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link has-contrast-color has-text-color has-background has-link-color has-large-font-size has-text-align-center has-custom-font-size wp-element-button\" href=\"https:\/\/github.com\/Ranoush-USA\/AirFlights\/blob\/main\/Airflight-dev\/resources\/notebooks\/Airflights-Gold.ipynb\" style=\"background-color:#fdd017;padding-right:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--60)\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>GitHub<\/strong><\/a><\/div>\n<\/div>\n\n\n\n<div style=\"height:18px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Description: <\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This notebook processes cleaned flight data from Silver tables to create business-ready analytics for round-trip flight combinations.<\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">It transforms cleaned Silver-layer flight data into actionable Gold-layer insights by identifying the best-priced round-trip flight combinations across airlines and routes.<\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The Notebook begins by loading the necessary libraries and defining strict PyArrow schemas to ensure data consistency throughout processing. It then reads both direct and connecting flight records from Unity Catalog&#8217;s Silver Delta tables, consolidates them into a single dataset, and categorizes trips by type.<\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The core logic matches outbound and return flights by airline and mirrored origin\/destination pairs, calculates total round-trip pricing, and extracts the cheapest combination per airline and route. Results are surfaced through a temporary SQL view, making them immediately queryable for validation and downstream consumption.<\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">The final output is a clean, aggregated dataset of optimal round-trip flight pairings \u2014 structured for direct use in business reporting, dashboards, and further analytics.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/dbc-c96a283d-ad26.cloud.databricks.com\/editor\/notebooks\/477541889828499?o=1909213613424026#followup\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><a href=\"https:\/\/dbc-c96a283d-ad26.cloud.databricks.com\/editor\/notebooks\/477541889828499?o=1909213613424026#followup\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><a href=\"https:\/\/dbc-c96a283d-ad26.cloud.databricks.com\/editor\/notebooks\/477541889828499?o=1909213613424026#followup\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>AirFlights Gold Layer &#8211; Round-Trip Analysis \u00a0 Tools: Databricks | Pandas | PyArrow | PySpark | Delta Lake Description: This notebook processes cleaned flight data from Silver tables to create business-ready analytics for round-trip flight combinations. It transforms cleaned Silver-layer flight data into actionable Gold-layer insights by identifying the best-priced round-trip flight combinations across airlines [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4412","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AirFlights Gold Layer - Rana Nasri Ghazzi<\/title>\n<meta name=\"description\" content=\"Explore Rana Ghazzi&#039;s data analytics portfolio \u2014 dashboards, visualizations, and insights built with Tableau, Power BI &amp; Python.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ranaghazzi.com\/?p=4412\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AirFlights Gold Layer - Rana Nasri Ghazzi\" \/>\n<meta property=\"og:description\" content=\"Explore Rana Ghazzi&#039;s data analytics portfolio \u2014 dashboards, visualizations, and insights built with Tableau, Power BI &amp; Python.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ranaghazzi.com\/?p=4412\" \/>\n<meta property=\"og:site_name\" content=\"Rana Nasri Ghazzi\" \/>\n<meta property=\"article:published_time\" content=\"2026-05-05T11:45:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-12T00:01:08+00:00\" \/>\n<meta name=\"author\" content=\"Rana Ghazzi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Rana Ghazzi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ranaghazzi.com\/?p=4412#article\",\"isPartOf\":{\"@id\":\"https:\/\/ranaghazzi.com\/?p=4412\"},\"author\":{\"name\":\"Rana Ghazzi\",\"@id\":\"https:\/\/ranaghazzi.com\/#\/schema\/person\/d8ee34f53cb0df9faaf816fb5363a4cc\"},\"headline\":\"AirFlights Gold Layer\",\"datePublished\":\"2026-05-05T11:45:33+00:00\",\"dateModified\":\"2026-05-12T00:01:08+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ranaghazzi.com\/?p=4412\"},\"wordCount\":171,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ranaghazzi.com\/#\/schema\/person\/d8ee34f53cb0df9faaf816fb5363a4cc\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ranaghazzi.com\/?p=4412#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ranaghazzi.com\/?p=4412\",\"url\":\"https:\/\/ranaghazzi.com\/?p=4412\",\"name\":\"AirFlights Gold Layer - Rana Nasri Ghazzi\",\"isPartOf\":{\"@id\":\"https:\/\/ranaghazzi.com\/#website\"},\"datePublished\":\"2026-05-05T11:45:33+00:00\",\"dateModified\":\"2026-05-12T00:01:08+00:00\",\"description\":\"Explore Rana Ghazzi's data analytics portfolio \u2014 dashboards, visualizations, and insights built with Tableau, Power BI & Python.\",\"breadcrumb\":{\"@id\":\"https:\/\/ranaghazzi.com\/?p=4412#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ranaghazzi.com\/?p=4412\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ranaghazzi.com\/?p=4412#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ranaghazzi.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AirFlights Gold Layer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ranaghazzi.com\/#website\",\"url\":\"https:\/\/ranaghazzi.com\/\",\"name\":\"Rana Nasri Ghazzi\",\"description\":\"Turning Data into Decisions\",\"publisher\":{\"@id\":\"https:\/\/ranaghazzi.com\/#\/schema\/person\/d8ee34f53cb0df9faaf816fb5363a4cc\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ranaghazzi.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/ranaghazzi.com\/#\/schema\/person\/d8ee34f53cb0df9faaf816fb5363a4cc\",\"name\":\"Rana Ghazzi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ranaghazzi.com\/wp-content\/uploads\/2025\/11\/logo.png\",\"url\":\"https:\/\/ranaghazzi.com\/wp-content\/uploads\/2025\/11\/logo.png\",\"contentUrl\":\"https:\/\/ranaghazzi.com\/wp-content\/uploads\/2025\/11\/logo.png\",\"width\":1024,\"height\":1024,\"caption\":\"Rana Ghazzi\"},\"logo\":{\"@id\":\"https:\/\/ranaghazzi.com\/wp-content\/uploads\/2025\/11\/logo.png\"},\"url\":\"https:\/\/ranaghazzi.com\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AirFlights Gold Layer - Rana Nasri Ghazzi","description":"Explore Rana Ghazzi's data analytics portfolio \u2014 dashboards, visualizations, and insights built with Tableau, Power BI & Python.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ranaghazzi.com\/?p=4412","og_locale":"en_US","og_type":"article","og_title":"AirFlights Gold Layer - Rana Nasri Ghazzi","og_description":"Explore Rana Ghazzi's data analytics portfolio \u2014 dashboards, visualizations, and insights built with Tableau, Power BI & Python.","og_url":"https:\/\/ranaghazzi.com\/?p=4412","og_site_name":"Rana Nasri Ghazzi","article_published_time":"2026-05-05T11:45:33+00:00","article_modified_time":"2026-05-12T00:01:08+00:00","author":"Rana Ghazzi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Rana Ghazzi","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ranaghazzi.com\/?p=4412#article","isPartOf":{"@id":"https:\/\/ranaghazzi.com\/?p=4412"},"author":{"name":"Rana Ghazzi","@id":"https:\/\/ranaghazzi.com\/#\/schema\/person\/d8ee34f53cb0df9faaf816fb5363a4cc"},"headline":"AirFlights Gold Layer","datePublished":"2026-05-05T11:45:33+00:00","dateModified":"2026-05-12T00:01:08+00:00","mainEntityOfPage":{"@id":"https:\/\/ranaghazzi.com\/?p=4412"},"wordCount":171,"commentCount":0,"publisher":{"@id":"https:\/\/ranaghazzi.com\/#\/schema\/person\/d8ee34f53cb0df9faaf816fb5363a4cc"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ranaghazzi.com\/?p=4412#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ranaghazzi.com\/?p=4412","url":"https:\/\/ranaghazzi.com\/?p=4412","name":"AirFlights Gold Layer - Rana Nasri Ghazzi","isPartOf":{"@id":"https:\/\/ranaghazzi.com\/#website"},"datePublished":"2026-05-05T11:45:33+00:00","dateModified":"2026-05-12T00:01:08+00:00","description":"Explore Rana Ghazzi's data analytics portfolio \u2014 dashboards, visualizations, and insights built with Tableau, Power BI & Python.","breadcrumb":{"@id":"https:\/\/ranaghazzi.com\/?p=4412#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ranaghazzi.com\/?p=4412"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ranaghazzi.com\/?p=4412#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ranaghazzi.com\/"},{"@type":"ListItem","position":2,"name":"AirFlights Gold Layer"}]},{"@type":"WebSite","@id":"https:\/\/ranaghazzi.com\/#website","url":"https:\/\/ranaghazzi.com\/","name":"Rana Nasri Ghazzi","description":"Turning Data into Decisions","publisher":{"@id":"https:\/\/ranaghazzi.com\/#\/schema\/person\/d8ee34f53cb0df9faaf816fb5363a4cc"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ranaghazzi.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/ranaghazzi.com\/#\/schema\/person\/d8ee34f53cb0df9faaf816fb5363a4cc","name":"Rana Ghazzi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ranaghazzi.com\/wp-content\/uploads\/2025\/11\/logo.png","url":"https:\/\/ranaghazzi.com\/wp-content\/uploads\/2025\/11\/logo.png","contentUrl":"https:\/\/ranaghazzi.com\/wp-content\/uploads\/2025\/11\/logo.png","width":1024,"height":1024,"caption":"Rana Ghazzi"},"logo":{"@id":"https:\/\/ranaghazzi.com\/wp-content\/uploads\/2025\/11\/logo.png"},"url":"https:\/\/ranaghazzi.com\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=\/wp\/v2\/posts\/4412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4412"}],"version-history":[{"count":38,"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=\/wp\/v2\/posts\/4412\/revisions"}],"predecessor-version":[{"id":4618,"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=\/wp\/v2\/posts\/4412\/revisions\/4618"}],"wp:attachment":[{"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ranaghazzi.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}