In this blog, we will be looking at a proper column naming convention in Microsoft Fabric Lakehouse. Let's get started.
Microsoft Fabric Lakehouse
Microsoft Fabric Lakehouse offers a user-friendly cloud-based data platform where you can seamlessly prepare, manage, and explore data. It simplifies the process of connecting to different data sources, transforming data, and creating machine learning models.
When it comes to naming conventions for columns in Microsoft Fabric Lakehouse, there are some important things to keep in mind. Column names in a Lakehouse must contain no spaces between words. This means that if you intend to, for example, upload a CSV flat file data and ingest it into Lakehouse House in Fabric. The column names must not have extra spaces such as this: ‘Order Date’, ‘Sales Amount’ etc. In a case where you have extra spaces between each word in the column name, such a particular column will not be available in the Lakehouse upon successful ingestion of the data into the lakehouse.
In this demo, we want to upload a small-sized CSL flat file into the Column_Naming lakehouse created. Notice that the OrderDate does not have any space between the two words. In addition, the Cost_Price, Retail_Price, and Units columns do have two words with hyphens.
In the Dataflow Gen2, we have all the columns visible.
Then, we choose the destination to ingest the data, which is Column_Naming Lakehouse.
Vert importantly, we have the message under the column mapping that some column names contain unsupported characters, which in this case is the extra space between column name words.
We can instruct Fabric to fix them. However, if we choose not to fix them as we would do in this blog, we are not going to see the following columns that do contain unsupported characters such as Account Manager, Product Name, and Shipping Cost.
In the screenshot below, we can see that only the columns that do not have extra space and columns that are hyphenated are visible in the Lakehouse.