From Days to Seconds — Reducing Query Times on Large Geospatial Datasets by 99%
Summary
- Query optimization: Global Water Security Center cut query times from days to seconds by leveraging lakehouse architecture and geospatial indexing.
- 99% improvement: Using Databricks Auto Loader, Spark Streaming, and H3 geospatial indexing reduced time-to-analysis by 99% on 500 billion data points.
- Mission impact: Faster analysis enables DoD teams to detect water-related geopolitical events quicker, supporting national security with advanced data architecture.
From Days to Seconds — Reducing Query Times on Large Geospatial Datasets by 99%

Talk by Chris Crawford, Sr. Solutions Archtect, Databricks ; Hobson Bryan, Associate Director of Technology, Global Water Security Center
The Global Water Security Center translates environmental science into actionable insights for the U.S. Department of Defense. Prior to incorporating Databricks, responding to these requests required querying approximately five hundred thousand raster files representing over five hundred billion points. By leveraging lakehouse architecture, Databricks Auto Loader, Spark Streaming, Databricks Spatial SQL, H3 geospatial indexing and Databricks Liquid Clustering, we were able to drastically reduce our “time to analysis” from multiple business days to a matter of seconds. Now, our data scientists execute queries on pre-computed tables in Databricks, resulting in a “time to analysis” that is 99% faster, giving our teams more time for deeper analysis of the data. Additionally, we’ve incorporated Databricks Workflows, Databricks Asset Bundles, Git and Git Actions to support CI/CD across workspaces. We completed this work in close partnership with Databricks.
Here’s more to explore:
Production ready data pipelines for analytics and AI: https://www.databricks.com/solutions/data-engineering
The Big Book of Data Engineering: https://www.databricks.com/resources/ebook/big-book-data-engineering-2nd-edition
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements
FAQs
How did Global Water Security Center reduce query times by 99%?
The center leveraged Databricks lakehouse architecture with Auto Loader, Spark Streaming, H3 geospatial indexing, and Liquid Clustering. This combination eliminated the need to query 500,000 raster files representing over 500 billion points, replacing it with pre-computed tables for instant analysis.
What is the Global Water Security Center's mission?
GWSC is a DoD-funded organization that monitors water events globally to detect geopolitical instability—from flooding and droughts to infrastructure changes. Faster data analysis enables them to provide timely strategic insights to U.S. government agencies.
What technologies enabled the geospatial optimization?
The solution uses Databricks Spatial SQL, H3 geospatial indexing for efficient grid-based lookups, Liquid Clustering for automatic data optimization, and Workflows with Git/GitHub Actions for CI/CD across workspaces.
Who led this geospatial data transformation?
Chris Crawford (Databricks Solutions Architect) and Hobson Bryan (GWSC Associate Director of Technology) partnered closely to design and implement this high-impact solution.
Full transcript
All right, folks. Welcome to this presentation called entitled From Days to Seconds. We're going to be talking about uh what the Global Water Security Center did to reduce query times on large geospatial data sets. Um all right, fast forward here. So. I'm based out of Birmingham, Alabama. I'm a solutions architect on the SLED team. and I'm Hobson Bryan, the associate director of technology at the global water security center at the University of Alabama.
So, I'm not going to drain the slide, but if you do not know, there is this really cool organization that you're going to learn about today called the Global Water Security Center, and they are a DoD funded organization that monitors water events around the world. They look for anything that could cause any type of geopolitical instability in the world from too much water, flooding, droughts to someone putting a dam on one side of the country that causes issues downstream and many other events all related to water.
They have uh customers through all all throughout the government that uh use their finished product to keep uh to make sure that they understand what is going on in that uh country in that region and look again look for anything that might be disruptive. So what we're going to do today is going to talk about a little bit more about uh GWSC and the mission. We're going to talk about the opportunity what was the problem that you know we were trying that uh he brought Dave Bricks in to solve.
We're gonna talk about the solution road mapaps. We're gonna talk about how it was before data bricks, some of how it was kind of during their data bricks journey and then what it looks like today. And if time we'll talk about the future state. Uh we're going to talk about and finally we'll uh conclude with our conclusions actual what are the real tangible results that came out of uh out of their work and using data bricks.
So awesome. Thanks. All right let's start with a little context. I want to thank everybody for joining our session today and it's exciting to see so many people interested in geospatial. I'm going to run us through our mission, our products uh as well as a very high level view of our our workflow. So the global water security center rapidly translates environmental data into actionable strategic insights for the US Department of Defense.
We do this through a combination of people, process, technology and data. Our people possess specialized skill sets specific to our work. Our process, we use a pathways to instability framework that drastically simplifies these complex topics in a way that we can actually analyze them. For technology and data, we use uh data bricks on AWS and we process trillions of data points from around the world. All with the angle of creating a stronger, safer, and more prosperous United States.
Thank you. So, first about our products. U if you want to, you can follow this QR code. There's also a link in the bottom left. A moment of shameless self-promotion. I've included some thumbnails here, but maybe just a quick show of hands. Raise your hand if you've ever heard of the Panama Canal, for example. Okay, cool. A lot of hands. Okay. Now, raise your hand if you knew that the Panama Canal actually depends on rainwater in order to lift the boats up and to for them to pass through the canal.
Got a few hands. Very nice. So, not as many hands. Interesting fact, Panama Canal handles 40% of US container traffic and the next shortest route is around the tip of South America and that's twice as long. So this report that analyzed historic droughts uh to give today's the recent drought more context and as well to understand what's going to happen in the future and the implications for uh US supply chains is pretty interesting.
We have a lot of other interesting reports like that. At the website we've got uh briefs on Russia, Iran, Afghanistan, Southeast Asia, all sorts of interesting stuff. So I'd encourage you to check that out. A little bit more organizational context. I've just outlined our workflow as a simple three-step process. We get a request from Department of Defense. We perform an analysis. The small pot of people, an environmental data scientist, a a cgrapher and a human environmental analyst complete that.
They have about two weeks to complete it. And then we provide a report. And maybe maybe it's surprising to you, maybe not, but that report is in the format of a PDF. So we send that PDF off to DoD. So now we'll we'll talk a second about the opportunity. I'm going to run you through an initial state just to set the stage for why do we need data bricks? I'll share a quick screenshot of our data viewer, some observations, and then I'll talk about why our time to analysis, in other words, the amount of time that it took us to acquire our data and actually start the analysis was about half the project time, and that was equal to the time that we had for analysis.
And finally, I'll talk about our wildly important goal. So, this is our data viewer. There are a handful of web apps that incorporate data on precipitation, drought, uh stream flow, temperature, uh reservoir ex stent, all sorts of different data sources. And you can see here in this example, this is monthly total precept anomaly in the map. And there are a couple widgets. This is super helpful if one of the questions you have was what was the last 12 months of weekly precipitation?
Great. That's good. You can find that here. Or what was the last 12 months of cumulative precipitation also great and you want to know it for that point in time. But if you want to know for example um what was the weekly precipitation across the entire extent of uh Mexico or for some watershed this data viewer is not going to cut it. Or if you want to blend some sort of data that's going to be a little bit more challenging to do that.
So this was our data viewer architecture on the left side of the screen. You can see these are custom apps built on AWS about 10 other components. Pretty complex architecture. It's oriented towards data visualization helps answer that discrete set of questions. If you want to answer a new question, well, you have to create a new widget or an entirely new app and that requires full stack development. And there's no self-service for large data extracts.
So when we started this process, when a data scientist would want data, they would have to come to the engineering team and say, "Hey, I want you know data X, Y, and Z." And then there was a slow turnaround while they're waiting us on us to provide that. So that's why our time to analysis was about half the project time. So they would request that data. data engineering would write that custom script script. They would extract it and we provide it to them.
Then they would do their own transformation. They check the data quality. Maybe they come up with a question. They'd start doing their analyses. And then they'd say, "Oh, actually I need a slightly different time range, right? Or I need, you know, a slightly different region of interest." And then that request would have to come all the way back. And at this point on a two-eek project, we're already running behind schedule.
And then finally they would have to uh create the report, illustrate it and package it up across those three different people. So we set a what I call it's from a a book called 4XD but a wildly important goal. So what is the number one thing that we could do that we kind of flipped this on its head and that was to provide the data in seconds or minutes not hours nor days. uh the wonkier explanation of this. So a lot of words but provide commonly used core data sets in a trusted pre-engineered ondemand analysis ready performant and interoperable format.
We use the top phrase to sell it to our customers, right? We said, you know, to my boss, I said, look, we need to get data in seconds or minutes, not hours and days. But internally, from an engineering perspective, the bottom portion of this represents all the boxes that we need to check to say uh that this data meets a certain standard. So, we'll pause here for a second. So, um, you know, I know we're about to kind of get into the medallion architecture, and I know a lot of times, uh, when we're talking about medallion architecture, we say, uh, you know, it's bronze and then we're going to go to silver, and then we're going to go to gold.
And we kind of think about this in like a left to right, you know, format. That's not really how to architect a medallion architecture, is it? Yeah, it's a it's a great u call out. So I I've outlined this as a solution road map. It's almost like follow the recipes or if you have if you ever use map quest, you know, you print out your directions and follow the directions. That's what this is intended to be. But from a design perspective, we really start at the right end of the architecture and that is what are the users going to do with this data?
Specifically, what queries are they going to write? And then once we understood what those users needs then we worked backwards to the source data to understand how we needed to architect the system. I think it's a really important point to emphasize because it's easy to, you know, go to databicks. com, check out the documentation and think depending on where you are in your journey and say, "Oh, well, we need a medallion architecture."
But if you just start building it, right, you don't have those specific tables and those specific queries and time, you're not going to get to highly performant table and you're probably going to end up with a whole bunch of tables that might be, you know, partially done, right? So being super clear about what that goal is and working backwards from it will be really helpful in applying this recipe or this road map to your own situation.
So this is our architecture for I'm assuming most of the people in the room are familiar with medallion architecture source bronze silver and gold. We also have an orchestration layer along the bottom. I've got a a slide for each uh section of this architecture and the intent is we'll we'll dig into them a bit. So there's some steps on on each um step of the architecture and if you want to find out more about how to implement the specifics to your use case.
There's a lot of great documentation or feel free to come come back to me after and I'm happy to share some code and that sort of thing. So starting on the far left side, you also notice some crawl, walk, jog, and sprint. So we delivered this in a in an iterative manager manner to offer some value along the way. So we had our source data set in an S3 bucket. We provided access to that S3 bucket using Unity catalog and the workspace.
Uh we we used raster io to slice those net CDFs as a temporary solution while we built out the rest of the architecture. So that brought our time down from taking days relying on someone else to some self-service and that script we were able to run it uh in a matter of depending on the amount of data we were processing in a matter of hours. Next there's the bronze layer. That's where we used autoloadader and spark structured streaming.
There we keep the same structure as the source data. So think about if in this case we're using net CDFs and you have some headers in your net CDF you want that those table headers to be the same in your bronze table. This is an appendon table. In our case our data provider would publish multiple copies of the same data or multiple versions rather. So let's say we're talking about temperature the temperature for three months ago.
It gets published over and over every month until eventually it stabilizes because there's some modeling work going on in the background. And so we have to keep a record of all of those and then dduplicate that later in the process. And the silver table that's where we're doing our H3 indexing. We're doing some joins here as well. So we're tessillating our shape files. So we tend to query by country. That's that's a primary region of interest that we that we work on.
So we tessillate our country shape file. Then we tessillate the latl long points and I'll get into if people aren't familiar with tessillation we'll get into what that means and we join those table. So that gives us a really fast and there's some dduplication that goes on a really fast table on which to query off of. At the bottom that's our orchestration layer. So we have a workflow that's bundled as a a data bricks asset bundle we deploy via get get hub actions and so that table that got us to walk so that's super fast and then we use the dab combined with the workflow to iteratively tune those jobs that create that workflow and then that way as we need to make changes to the table we can do that fairly quickly.
And then the last sort of a a bonus that's separate from this uh the pipeline on the left that's our goal layer layer where we have a data bricks app that triggers a workflow. So that's a a noode UI to run a dozen data science notebooks for a region of interest and that generates all the project tables for our reports and then finally we we export it. Yeah, shout out to the data bricks apps team and like he said you know it was just that was just bonus.
He already had, you know, this workflow in place, but when the apps came out, he's like, "Oh, wow. I can Let's just do it. Let's just do it." Yeah. In fact, didn't even know that I was going to include a slide on that. I know. It's like apps, you're what? Yeah. Anyway, uh so source data, why why do we want to attach uh mount Unity catalog to this S3 bucket and access it via the workspace? first and bring that time down from days to hours so that the data scientists can self-s serve.
That's governed access. So my team's super small. I'm the head of technology. I'm also the AWS administrator. I also do some code code review. And so the idea that you know I'm going to go into AWS and every time a data scientist needs access to some port of the bucket or you know the variety of other people that might need access to this data going through AWS is kind of a pain. So, and no offense to any of our AWS people, love AWS, used to work at Amazon.
But setting that aside, uh it's really nice, arguably a little easier to just provide that access through Unity. You get that collaborative dev environment, right, with the notebooks. Previously, people are taking those extracts, putting them on their local machines, using our studio uh on their local machines, and then sharing their data around there. They could just work in that collaborative environment. And then we use that uh raster io script as well as some other packages to slice you could think about a layer cake uh to slice this collection of net CDFs for a given time and region of interest.
Um and that was our our kind of interim solution. We kept the of course the S3 access but the script was the partial solution. So our data set that we're talking about here is erra or ar5. That's the fifth generation of this atmospheric reanalysis. This is 30,16 megabyte net CDFs in our S3 bucket. We have larger data sets, but this is the one that we started with. It represents about 30 billion points. So, a time stamp, a lat long, and then a variable like precipitate, rate of precipitation or or temperature.
So, when we go to do a slice, we're we're slicing all 30,000 of those files. Uh how do we do it? You establish that connection. And there's some great documentation online for that. You in import the dependencies. If you're interested in doing this, you know, reach out to me. I'm happy to help you. We convert the shape file into a bounding box and then we clip each file like a slicing through a cake. Uh using that bounding box.
We we restack them all and then we write them. You could save them as a net CDF or a delta table. So that was our our initial step. Next, we needed to ingest the data. I'm doing a doing well on time here. Um, so we'll ingest the data. This is our bronze table and we used autoloader and spark streaming to do this. And this is what brought us down to hours and minutes. So this is our our walk stage when combined with the silver table as well.
So why do we want to use autoloader? It allows you to incrementally ingest data. Remember I mentioned that our publishers publishing these files every day. I don't want to have to um keep track of which files have been ingested and which haven't. Also, if a job fails, uh you're incorporating these checkpoints. So, autoloader actually keeps track of which files have been ingested. That's super nice. It's near real time, so as a file arrives, it can just be ingested.
There's also schema evolution. So, the other day, the data provider, they added a column uh to the data set that didn't break the pipeline because we had enabled schema evolution. And we use this autoloader to load this data to Delta. Autoloader is just a high performance scalable uh horizontally scalable batch and streaming file ingestion system that auto detects new files. So how do you do it? It's a it's pretty simple process.
You specify where your data is. That's your source directory. You enable autoloader. There's a chunk of code online that you can do that. You specify your schema handling. Do you want the schema to evolve or not essentially? And then the userdefined function, this would be specific to your data set. You have to parse those net CDF files. So it's a multi-dimensional array and you're essentially transforming that to a uh flat and uh long format because now instead of having all these uh if you think about the globe all these stacked globes uh so let's say there's a latl long point and it's going to appear in multiple slice.
Now that appears in your your table um and then so you have some duplication of those latl long points and some of the same time stamps and that sort of thing. But then you you write that table to a delta table. Then we index the data. So this is where this is specific to geospatial. Maybe a quick show of hands. Who's used H3 in the room? Some people. So it doesn't work for every use case. It's it's sufficient for ours.
You use it to have fast spatial joins, do large scale queries. There's some nice built-in functions. It's space efficient. So the hex IDs are space efficient. And I've also included some comments here in parenthesis just in the interest of time. But these go together, right? So H3 plus liquid clustering. And the liquid clustering allows you to optimize your table without rewriting the entire thing. So that's pretty handy especially as you're um ingesting additional data.
So for example in a given month we're going to get more data for the entire world but we query by region of interest which is a country. So we don't want to rewrite our entire entire table every month, right? To account for that new global data set that's been um appended onto a table that was optimized for a country of interest uh query. So being able to optimize them without that rewrite write is pretty nice. It's an open source discrete global grid system that just means we're covering the earth in these hexagons.
It's hierarchical. You have different resolutions and the liquid clustering. You can dynamically redefine those cluster keys which is nice. So we've actually got two data sets in play here. We have the era five. So that's atmospheric. Just think of it as historical weather. We have the latapl long. We're going to tessillate it. So all that means is we're going to find out for each point in our in our our latl long point in the data set what H3 cell does that point belong to.
Then we're going to do something similar with the country shape files. So for each hexagon, we kind of flip it around. Each hexagon, which country does that hexagon intersect with? So now you have two tables. One has all your lat longs with the H3 cells that they are intersect with. And then the same thing with the country. You have all your H3 cells and the country that those intersect with. Now you can join on the H3 cell ID which is a fast join because we're using H3 along with this liquid clustering.
And now you can answer give me all of the latl long points and these represent our raster centroidids. Give me all the latl long points that are associated with this region of interest in this case a country. So we we do that with the join. We define those clustering keys. That's we query by country and time in the H3 index and we write that out to the day uh to the delta table. So that gets us to the point where we can now query you know these 30 billion rows of data in you know a matter of minutes not too long.
All right last but not least second to last but not least the orchestration layer. This is where we use workflow. So we take everything that we just talked about. So we have a bunch of source notebooks and we associate each of those with a task in a workflow. So all a task is you can think of it as a source notebook along with some predefined compute. They can either run uh ser serially or can never say that word serially no still can't say it in a row you know or in parallel.
Um, and so in our case, we run these in a series because they're dependencies across each other. And um, and then we combine that with the asset bundle. And that allows us to uh, define via essentially a YAML file uh, both the uh, resource configuration, so what computer are we using as well as that sequence of tasks that uh, creates that workflow. So how do we do this? First, we define the task. Those are the notebooks and their dependencies.
We configure clusters for the task. We set triggers. If you're using asset bundles, you actually there are a couple of flavors of triggers. One's for the workflow. So, do we want to run the workflow every time there's a a new file ingested or do we want to run it once a month? uh as well as for the asset bundle that is when do you trigger the asset bundle to be deployed uh to data bricks. So we have that tied in with our git process.
So when we when we merge code in certain in a certain way in certain environments then that bundle is deployed to data bricks and then finally the deploy which for us is automated. So the gold layer is imagine now we have we have our silver table that's got our source data. Now we have multiple uh source uh tables and incidentally we actually use this approach for a data set that's about 100 times larger called cap 6.
So we have that table and now we can query a region of interest across all these tables in a consistent way. But now we have a dozen data science notebooks that run downstream of that. Previously they would have to go in and configure each notebook, run it, sit there for a second, you know, maybe troubleshoot it a little bit, parameterize it again. And there's a lot of just, you know, meanwhile you're like going off to a meeting, right?
You're coming back and you're like, "Okay, now I got to restart my computer." And by the time it's kind of like death by a thousand cuts, running that dozen notebooks could take three to five business days. And so what we did is we created a noode app uh that wires into a workflow that runs all dozen of those notebooks off of that silver table. And so that gives even an analyst the self-service ability to run all these notebooks in a single shot from a single UI.
And we get all the lineage and reproducibility, the built-in governance associated with that. um they're configurable widgets as inputs and it's again pack controlled with an asset bundle. So how do you do it? You just create a new app in the workspace. You add those widgets. You wire those widgets to your workflow parameters. You assign the cluster that you want to use for the app and then you deploy it and share the app.
And so that brought us um down to really this should be rather than days to minutes, it should be minutes to um seconds. Actually, no, that one's days to minutes. Excuse me, because it used to take five days and now it takes uh about 40 minutes for a large country like Brazil. So finally, I will offer you some quick conclusions. So let's talk about the business value for a second. So we've got two parts. The time to analysis.
So that was up through the silver table. That process of acquiring data with all the back and forth with our data engineers that were using AWS, that typically took about 5 days. Now I can query a 30 billion row table, return and write 600 million rows in about 30 seconds. So that's a whole lot faster. Uh we have right now this number is increasing, but right now we're doing about 36 briefs a year. So, we're getting five days back for 36 briefs a year.
That's at least $100,000 in data science time saved, which as a taxpayer funded organization, I'm always interested and as a taxpayer interested in making efficient use of the taxpayer money. So, that's just money saved, which is awesome. I've also been able to reduce the amount of spend on that full stack development substantially. essentially um I'll say u reallocated you know another $900,000 in labor and this is all you know our our annual compute bill not just for this workflow but all of our compute on AWS and data bricks is about $50,000 so that's where I get that 20x return from if you add the 100 and the 900 over the 50 and you know it really understates it on the right side with the app on top of the data science workflow.
That's bringing it down from five days to an hour. We're in the process of rolling that out. Now, that was a pretty fast follow on the silver tables. That's a 98% reduction. Again, another five days back for 36 briefs a year, and that number is growing. Another $100,000 saved. We were already doing this work anyway, right? So there wasn't any additional I mean there's a little bit of a teeny bit of you know nonmaterial amount of compute associated with running the app but if anything that workflow is probably going to reduce our compute costs because we can fine-tune uh all of the compute associated with each of those notebooks and now analysts can self-service rather than asking a data scientist.
So that's pretty handy. And all this accounts do we used to do about four I'll call them standard analyses per brief. Now we do over a dozen. This has led to more iteration between our uh researchers, our data scientists, our cgrapher that's giving us higher quality products that we're delivering on time because now we don't have we're not you know cramming this process into two weeks. we have data literally with or our analysis our initial analysis within an hour of receiving a request from DoD.
So that's a big difference than having to wait two weeks. So now we have an additional nine business days, right, to really dig in to these complex topics. That's building trust with our customers and happy customers is always a good thing. I'll give you a quick timeline just to if you're thinking about this journey, you know what what you might expect. So this runs out back about six quarters in Q4 2023 and connected with and at data bricks.
We immediately set up that Unity ecatalog uh raw data access to S3. That's what brought us down from days to hours. They helped us with a medallion proof of concept. We covered almost everything uh up through no orchestration but just uh up through the silver table in a proof of concept in a single notebook. So although this was this represents the AR5 pipeline alone is about 25 source files and almost 10,000 lines of code.
You know the basics of this can be run in a single notebook. Setting aside the orchestration stuff then we index the full AR5 data set. And I actually came to this a year ago and sat in on a similar session and the guy the person presenting said, "Oh, I had a 90 I forget what it was 96% reduction in query time." I went back to my hotel room. I was like, "I need to benchmark this." And sure enough, we even before we started fine-tuning things, we were at like the 90% mark.
Um, so that was exciting. We went ahead and gave access to the data scientist to that temporary index era 5 data set before we had the orchestration before we had the ongoing updates right just to get something in their hands and get some feedback and that knocked that time they weren't having to run that script anymore that raster IO script that took it down to minutes then we applied this on the CIP 6 data set it's about 100 times larger and we gave access to that data set so the data scientists were pretty happy.
And then we started with the uh the asset bundles, you know, creating now that we have people depending on the data, creating multiple workspaces, right? And building out what the rest of the stuff that makes this a robust um data set and infrastructure behind it. And then we also kicked off that data bricks app and that'll be our our next focus. So our mindset here is a bit of an evolution. We started with the data viewer that I that I showed you.
Then we start getting those data extracts and people are still working in R studio on their local machine. Now people start with data bricks. We still I mentioned that this is really a spectrum. It's not like phases because people still use all these tools. They still do analyses on their local machines as much as I asked them not to. They still do it. that's fine. Um, we still use the data viewer. People like my boss who don't want to, you know, they don't want to go into data bricks, uh, just to check out a location.
Uh, he's a retired Air Force colonel in the military. So, I'm not going to say you have to do it this way. He still goes to the data viewer, and that's his prerogative, but we're really a cloud first organization now, which is great. Some lessons learned. So, and this is again I'll come back to your point earlier. Even though this is left to right to follow the or uh the architecture, you really need to start in the middle and know your your users's queries, understand what their pain points are, and set that wildly important goal based on those pain points. you know, don't just say, "Oh, well, I think we need to do a medallion architecture because I went to the data bricks conference and that's, you know, what I heard that we're supposed to do."
So, really understand their day-to-day. Then design your silver table just conceptually, logically around those users expectations. Remember, you can only cluster on up to four keys. So, if you're building a really big, some people want to create these super wide tables, um, which is fine, but you want at least one of those four keys to be in your query to take advantage of liquid clustering. Uh, and if you have more than that, I don't know, maybe you need another table can only be optimized for so many keys.
Understand your options for tessillation. we went down a a pretty good rabbit hole on trying to address every edge case with our our tessellation. And um in hindsight, maybe we could have done that a little bit more simply. It just depends on what level of accuracy, you know, if you're trying to we're doing analyses at a watershed or a country level. If you need uh your analyses every single point to be exactly correct uh maybe you need a different approach but I help I find that it helps to actually draw a picture to understand all those different tessillation options but only make it as complex as your use case allows or as simple as your use case allows on the left side got to understand your source data right to understand how you're going to get it from point A to point B uh remember it should be a pend only that's what's going to give you in our case we needed to understand how that data was actually evolving.
So every time they publish that data set and it gets updated for that same uh place and time stamp we needed to understand how it was changing and so if you if you don't append only and you just keep the most recent version if there is a question about data quality it becomes hard to answer. One of the hardest things about this, aside from some of the orchestration stuff that I'll talk about in a moment, is tuning to your file size.
So, Spark, we're we're dealing with these 16 megabyte net CDFs. Um, Spark doesn't know that those files are net uh 16 megabytes when it opens it. and it it it's not going to know how to allocate um task efficiently from a partitioning and compute perspective because it doesn't know how big that file is going to be in memory. So you really need to uh tune to your file size and not just the file size but what that file looks like in memory. um that's got to be aligned to your compute memory, the number of cores you have, and the number of partitions.
And if you don't do that, you might run your job and have what what we call like a dangling task. All the other work will be done, and then your c compute will be sitting there spinning and it'll be working on one task and you'll say, "What's going on?" You might want to check your partitions. you don't you pro it's unlikely if you're dealing with a file of any size that you want to use the default partitioning in in data bricks and then to that end I haven't found an exactly scientific way to approach that last point so we start small handful of files run it monitor the metrics then do it again say double the compute did it run twice as fast if it didn't run twice as asked why not and so before you know saying well maybe if I quadruple or increase it by tfold and see if it'll work as I mean if you have the money to do that I guess you're welcome to but you really want to understand to make sure that those tasks are running efficiently and then on the far right the orchestration u workflows are pretty straightforward when you start incorporating asset bundles across a variety of workspaces unit testing integration testing um trying to go full CI/CD from a perspective uh you know integrating with get there's a lot of complexity there and I would encourage you to just start with a notebook at a time get those running then build your workflow and then if you know assuming you're depends on your organization maybe you already have dabs kind of fully up and running and integrated to your CI/CD um then start using dabs But I would encourage you to check in frequently with your users.
You might say, um, hey data scientist, I can give you this table now. Um, or you know, I can do all this other engineering work to make it more robust and give it to you in a month. You know, they might want the data now and then let you figure out the rest of that stuff after the fact. All of this is unlocking a whole lot of different opportunities. So those low code data engineering workflows, one of our next big challenges is how can we now that we've used this process for multiple data sets, how can we create a generalized version of that pipeline so that a non-data engineer can just point to an S3 bucket that has a certain type of data in it and just be able to ingest that without a lot of data engineering support.
Automating those data science workflows, adding natural language interfaces. If you haven't checked out Genie, it's pretty cool for basic um use cases. The addition of the geospatial data types, which I think is maybe at a a presentation right after this, will be super helpful with the downstream data integrations. We're working on incorporating a stack-like search. So, I can go into data bricks and say, tell me all of the analysis that we've ever done for this region of the Earth, rather than having to work through the Unity catalog folder structure. also some space-time anomaly detection work that if you have that full pipeline with medallion architecture uh makes that space-time anomaly detection uh a lot easier if you need to do that on an ongoing basis and finally some uh rag AI for research synthesis and then to be able to compare what does our data say versus the literature and is there any divergence because that's a lot of what the bulk of the downstream everything that happens after data science is around those those last two points So, we're about out of time here.
A quick thank you. First to my customers who uh spend the time with us to help make sure we build the right things. Want to thank for getting us started. Michael Johns who helped us. He's probably presenting here in just a few minutes. Helped us with some pretty wicked teslation problems when we said we want to tessellate the entire globe. He's like, "Oh, okay." And helped us work through all the edge cases, professional services.
Dr. and Dr. or somebody majun dair wrote the majority of this code and if you haven't met Milos he wrote a lot of the mosaic libraries that we use through the H3 indexing um so big thanks to all these people and thank you all for listening to me talk for 40
Learn more about the Databricks Data and AI platform.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.