Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I have a csv file that contains two columns: tableName and description (that contains the table descriptions)
I'm trying to bulk update my table descriptions. This runs in Tabular but it doesn't load in the dataset.
using System;
using System.IO;
using System.Linq;
// Define the path to the CSV file
var csvFilePath = @"<ANONYMIZED_PATH>\TableInfo_Test.csv";
// Check if the file exists
if (!File.Exists(csvFilePath))
{
throw new FileNotFoundException("The specified CSV file was not found.", csvFilePath);
}
// Read all lines from the CSV file
var lines = File.ReadAllLines(csvFilePath);
// Skip the header and parse the CSV file
foreach (var line in lines.Skip(1))
{
var parts = line.Split(';');
// Check if the line has at least two parts
if (parts.Length < 2)
{
Console.WriteLine("Skipping line due to insufficient parts: " + line);
continue; // Skip this line if it doesn't have enough parts
}
var tableName = parts[0].Trim();
var description = parts[1].Trim();
// Find the table in the model
var table = Model.Tables.FirstOrDefault(t => t.Name.Equals(tableName, StringComparison.OrdinalIgnoreCase));
if (table != null)
{
Console.WriteLine("Updating table: " + tableName);
table.Description = description;
}
else
{
Console.WriteLine("Table not found: " + tableName);
}
}
Did anyone find a solution or something else to do this?
Thank you
From what we have found, it doesn't seem possible to use C# for the table descriptions. Thank you for the other option, I'll have to investigate some more.
Hi, @JackWren
Thank you for your prompt response.
If you find a solution, we encourage you to return to the forum, share your findings, and consider marking it as the accepted solution. Members with similar questions will greatly appreciate your contribution.
Of course, if you have any interim results, we also welcome you to share them with us.
Thank you in advance for your efforts.
Best Regards,
Leroy Lu
Hi, @JackWren
Thanks for your detailed explanation, I am more than willing to help you out.
Regarding the data import issue, I have thought of an alternative solution:
1.You can try using the Table Import Wizard tool:
For more details, please refer to:
Importing tables and data modeling | Tabular Editor Documentation
2.Secondly, after completing the import in Desktop, use it in the app:
For more details, please refer to:
Get data from comma separated value (CSV) files - Power BI | Microsoft Learn
Combine files overview - Power Query | Microsoft Learn
Combine CSV files in Power Query - Power Query | Microsoft Learn
For the issue you mentioned, it would be more advisable to post your question in Tabular Editor community to get professional support in time.
Here is the link to the forum you need:
Of course, if you have any new discoveries or questions, please feel free to get in touch with us.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
3 | |
2 | |
1 |
User | Count |
---|---|
3 | |
3 | |
3 | |
2 | |
2 |