Forum Discussion
Change data source from CSV files to a MySQL Database.
- 6 years ago
Hi Anonymous ,
When making this type of transformation what you need to assure is that the final table is the same.
My steps for this type oif changes are ussually:
- Make a new query with the MySQL database
- Check if the final result is the same number of columns, name of columns, formatting
- If there are some additional calculations made on top of the CSV files my reference is that step not the final result
- Then go to advance mode and copy the code from this query to the one of the CSV files.
For example let assume you have the transformation below (using current language and not M):
- Open Folder
- Filter Files
- Add Custom column for treatment of CSV
- Additional calculation based on columns of previous step
In this case I would create the the query for the final result to match the 3rd step and then replace those 3 steps by the one on the new query.
Again if you have the same column names and formats should work fine.
Hi Anonymous ,
I will first export the original pbix file as a template file.
Open template file and transform data.
Click "Advanced Editor" and modify the source.
(You can also connect to the database first, select and copy all the codes in the advanced editor, and replace the codes in the advanced editor of the template file).
You can click Apply button in Query Editor to apply change.
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.