Switching methods for importing data file
Jump to navigation Jump to 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
- Transparency: Displayr will store the link from which you imported the file so your source data is documented.
- Updating: Files that are imported via URLs can be set to update at regular intervals.
(Requires access to Desktop Q)
- Download Archive Pack
- Open QPack in Desktop Q and save as a Q Project.
- 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.
- 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.
- Re-run Outputs and save as QPack
- Re-upload to Displayr