Forum Discussion
How to convert DirectLake to Import Mode?
Hello,
trying to use this article in order to migrate directlake to importmode:
https://www.linkedin.com/pulse/converting-direct-lake-model-import-daniel-otykier-h2chf/
But i can not see "Data source credentials" after deplying changed model.
Did anybody try it?
Or you have a better way?
Best,
Jacek
HI jaryszek,
Thank you Kedar_Pande, for your insights.
The issue arises because Direct Lake models do not use standard data source connections or credentials. When converting the model to Import mode with scripting, a valid data source including connection details and authentication is not automatically set up. In Power BI, the “Data source credentials” option appears only when a properly defined data source is present. Since the converted model lacks this configuration, the option is not shown. To resolve this, connect the model to a supported data source (like a Lakehouse SQL endpoint or Warehouse) with a valid query and credentials. Alternatively, recreating the model in Import mode using Power BI Desktop is a recommended and supported method to ensure proper setup.
Thank you.
3 Replies
- Kedar_Pande
Super User
Tabular Editor 3 script is the way. Connect via XMLA endpoint, run this C# script:
foreach(var table in Model.Tables)
{
foreach(var partition in table.Partitions)
{
partition.Mode = PartitionMode.Import;
partition.SourceType = PartitionSourceType.Mdx;
// Add your Snowflake query here
partition.DataSource = Model.Model.DataSources.First();
}
}Save as new model, publish. Then set Snowflake credentials in Service settings.
- jaryszek
Super User
thank you, I am not using snowflake.
partition.DataSource = Model.Model.DataSources.First();
What is a snowflake query ?
Best,
Jacek- v-saisrao-msft
Community Support
HI jaryszek,
Thank you Kedar_Pande, for your insights.
The issue arises because Direct Lake models do not use standard data source connections or credentials. When converting the model to Import mode with scripting, a valid data source including connection details and authentication is not automatically set up. In Power BI, the “Data source credentials” option appears only when a properly defined data source is present. Since the converted model lacks this configuration, the option is not shown. To resolve this, connect the model to a supported data source (like a Lakehouse SQL endpoint or Warehouse) with a valid query and credentials. Alternatively, recreating the model in Import mode using Power BI Desktop is a recommended and supported method to ensure proper setup.
Thank you.