locked
Change Source

    Question

  • Hi all,

    This seems like a dumb question, but still... I've built a query that takes data from a csv file and does some filters and transforms. It works fine, but I now want to take the same query and point it to a different csv file with the same structure and can't see how to do this. When I look at my list of steps, it's as though the first step that imports the data from the file is hidden and I can't see any properties anywhere where the original file name can be edited. Is this possible?

    Thanks,

    Chris


    Check out my MS BI blog I also do SSAS, PowerPivot, MDX and DAX consultancy and run public SQL Server and BI training courses in the UK

    Monday, March 04, 2013 4:28 PM

Answers

  • Hi Chris,

    In the "Query Settings" pane, you can right click at any blank place and select "View formulas" to open the "View formulas" window. In that UI, you can change the Csv file to a different one and click done.

    Typically, it should be something as below. You can change the csv file path or name.

        Source = Csv.Document(File.Contents("\\someplace\somecsvfile.csv")),

    Hope this is helpful to you.

    Regards

    Qunshu


    Clarification: Microsoft doesn't own any liability & responsibility for any of my posting.

    Monday, March 04, 2013 6:38 PM
  • Hi Chris,

    Qunshu's approach should work with current bits.

    In addition, the fact that you can't modify the file path using the Edit Settings on the Source step in your query (in the Steps pane) is a known issue and we will address it in one of our next updates.

    Thanks,

    M.

    Monday, March 04, 2013 6:47 PM

All replies

  • Hi Chris,

    In the "Query Settings" pane, you can right click at any blank place and select "View formulas" to open the "View formulas" window. In that UI, you can change the Csv file to a different one and click done.

    Typically, it should be something as below. You can change the csv file path or name.

        Source = Csv.Document(File.Contents("\\someplace\somecsvfile.csv")),

    Hope this is helpful to you.

    Regards

    Qunshu


    Clarification: Microsoft doesn't own any liability & responsibility for any of my posting.

    Monday, March 04, 2013 6:38 PM
  • Hi Chris,

    Qunshu's approach should work with current bits.

    In addition, the fact that you can't modify the file path using the Edit Settings on the Source step in your query (in the Steps pane) is a known issue and we will address it in one of our next updates.

    Thanks,

    M.

    Monday, March 04, 2013 6:47 PM
  • Monday, March 04, 2013 8:08 PM
  • I have the some problem, but in addition to that I am not able to edit the Query settings. For some reason this pane does not come available no matter what I click. Any ideas?
    Friday, June 07, 2013 2:09 PM
  • Got is fixed, or worked around, thanks to Miguel. I renamed the table which is not supported yet. Till further notice we need to use table1, table2 et cetera default naming convention.
    Monday, June 10, 2013 6:36 PM