Absolute and Relative References

·

This week I caught a short tale of Reitse trying to migrate a Power BI report from one Tenant to another in Fabric. It’s something that I would consider a common practice, whether it’s from a dev tenant to a prod one, or from a consultant to a client workspace. Moving things around is what we do in the digital world, whether that’s schema structure, a report, a data export, or something else. This is common.

And it should be simple, right? I’m not complaining about Fabric here, though it should be easier. I don’t know if this is a Fabric problem, per se, or maybe it’s a Power BI issue. After all, I should be able to decide and link things in a relative or an absolute manner.

I’m going through this as we test some movement of the SQL Server Central infrastructure. There is a mix of relative and absolute pathing, which breaks the test system. This is similar to the issues I’ve seen when copying files and configuration inside a local machine. Should I really have d:\git\myrepo\flyway.toml, or should this be .\flyway.toml and assume the reference will be in the repo? There’s no easy answer, whether you’re using Flyway, Docker, or any software.

This is a place where the user should think for a moment about the future and what makes sense. Every month I I attach a file from SharePoint to an email to my Finance group. Outlook always asks me if I want a copy or a reference. Often, for internal links I want a link, so that if I edit the file (or the recipient does), we edit the same file. However, in this case, this is a document of record, so I want to know what I sent, without edits. If I edit things, I want to resend it.

Often we want relative references, especially in the Cloud and Internet places, where we might move resources around, and we don’t want breakage. This is common when moving from dev to test to prod, or from one server to another. However, at times, we want absolute references. On the flip side, I want a standard in my SQL Server instances that puts my data files and backup files in standard locations. Data on the d: and e: drives, backups on the z: drive was a standard we used in one place.

I’m not advocating that you lean one way or the other, but think about the purpose of the item and the future possibilities. Sometimes an absolute reference makes sense, and sometimes a relative one works better. If in doubt, I’d pick the latter, but be sure that whatever software or system in which you work supports this.

Steve Jones

Comments

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.