Switching methods for importing data file

From Displayr
Jump to: navigation, search

This page describes how to change a data set imported from a file off your local computer to a data set imported from a URL.

There are several reasons you may want to do this

  1. Transparency: Displayr will store the link from which you imported the file so your source data is documented.
  2. Updating: Files that are imported via URLs can be set to update at regular intervals.


(Requires access to Desktop Q)

  1. Download Archive Pack
  2. Open QPack in Desktop Q and save as a Q Project.
  3. Open .Q file in a text editor (Notepad may struggle with the size of this file) and search for ImportReader
    • Search for a line starting with a tag for ImportReader that lists the file you want to change. For example, if I want to change importing for hubspot_contacts.csv, I look for a line that looks like: <ImportReader qset="d2ebb10e-5a1d-4981-9bd6-a559dc815c3d" type="CSVReader" defaultEncoding="Windows-1252" dataFileLocation="C:\Users\carmen\Documents\Sales dashboard\hubspot_contacts.csv" dataFileDateTime="2017-05-01 15:05:44Z" dataFileSize="4457355" colNames="true" headerType="OneCellPerVariable" parseMode="V2" unlimitedVarNames="true" delimiter="," />
    • Replace the dataFileLocation field with the URL of the file. For example, if I now want to put a link from Dropbox, I would replace the file path with dataFileLocation="https://www.dropbox.com/s/cc2gphzpd1ckze/hubspot_contacts.csv?dl=1" (Note that for dropbox links, it should not end with dl=0).
    • It is best to only change 1 file at a time to get informative error messages.
  4. Save and close text file. Double-click on the icon to re-open file in Q. Note that this step may take a while for the data to be validated.
  5. Re-run Outputs and save as QPack
  6. Re-upload to Displayr