Forum Discussion

Applicable88's avatar
Applicable88
Impactful Individual
4 years ago
Solved

Using folder with csv as source, changing of data type after promoting headers not changing

Hello,

I'm using a a folder with many *.csv as a data source. To transform the unformatted files, I'm using the "load and combine" option. Hence I'm using the sample file to get all csv's formatted, because many empty, but also some cells with relevant data were on top before I could delete them to get to the headers. After I transform everything without any errors, all changes were also visible in the "main file" with no errors. 

The last step I did was "promoting headers". Afterwards the subsequent datatype changes weren't carried over to the "main file". No errors or whatssoever, the changes in the sample file just didn't mirrored in the main file. I recognize that every column in the main file just is "123 /ABC". Do I need to transform the datatypes in the main file now?

 

I hope there is a solution to this. 

Thank you very much in advance. 

Best. 

 

  • Hi Applicable88 ,

     

    You should see query in your in Power Query list called something like "TransformSampleFileFrom[yourFolderName]", or "Transform Sample File" or similar.

    You should just be able to select this query, then make Change Data Types your final transformation step and this should carry over to your main query.

    Failing this, just do it in your main query. At least then it's only being done once, not Change Data Types * number of source CSVs.

     

    Pete

2 Replies

  • Hi Applicable88 ,

     

    You should see query in your in Power Query list called something like "TransformSampleFileFrom[yourFolderName]", or "Transform Sample File" or similar.

    You should just be able to select this query, then make Change Data Types your final transformation step and this should carry over to your main query.

    Failing this, just do it in your main query. At least then it's only being done once, not Change Data Types * number of source CSVs.

     

    Pete

    • Applicable88's avatar
      Applicable88
      Impactful Individual

      BA_Pete thanks for the reply. Yes, the datatype changes in the sample data, really not carry over to main query. Every columns is ABC/123, so I need to do it manually for the main query again. 

      Cheers.