Loading data into Microsoft OneDrive#

This guide explains how to load data into Microsoft OneDrive for further analysis.

Prerequisites#

Before you complete the procedure in this guide, perform all of the following actions:

  • Create a datastream whose data you want to load into Microsoft OneDrive. For more information on creating a datastream, see Collecting data in Adverity.

Procedure#

To load data from a datastream into Microsoft OneDrive, follow these steps:

  1. Add Microsoft OneDrive as a destination to the workspace which contains the datastream or to one of its parent workspaces.

  2. Assign the Microsoft OneDrive destination to the datastream.

    You can assign as many destinations to a datastream as you want.

    Some destinations require specific Data Mapping. If these Data Mapping requirements conflict, the destinations cannot be assigned to the same datastream.

  3. Configure load settings.

Adding Microsoft OneDrive as a destination#

To add Microsoft OneDrive as a destination to a workspace, follow these steps:

  1. Go to the Destinations page.

  2. Click + Create destination.

  3. Search for and click File OneDrive.

  4. In the Configuration page, fill in the following fields:

    Name

    (Optional) Rename the destination.

    Folder

    (Optional) Enter the name of the folder (or file path to the folder) in Microsoft OneDrive to which the data is sent. Ensure the name of the folder or filepath begins and ends with a forward slash (/). For example, if you were sending a data extract to a folder called “Data”, enter the name of the folder as /Data/.

    Drive ID

    (Optional) Select the ID of the drive in Microsoft OneDrive to which the data is sent.

    Output format

    Select the output structure of the exported file.

    File name template

    Use this setting to customize file names. Supported placeholders include:

    • {app_label}

    • {checksum_crc32}

    • {datasource_label}

    • {datastream_id}

    • {datastream_type}

    • {extension}

    • {extract_id}

    • {id}

    • {meta[*]}

    • {name}

    • {scheduled_day}

    • {scheduled_month}

    • {scheduled_year}

    • {upload_day}

    • {upload_hour}

    • {upload_minute}

    • {upload_month}

    • {upload_second}

    • {upload_year}

    For more information on metadata and placeholders, see Using placeholders.

    Note

    Whitespaces in file names and paths are not supported.

    Encyption method

    Choose the encryption method to secure exported files.

    Data Mapping

    Choose to enable Data Mapping during the data load. Choose one of the following options:

    • Disabled - Do not use Data Mapping. This option is selected by default.

    • Enabled (with metadata) - Enable Data Mapping during the data load that also adds three columns containing metadata to the loaded file.

    • Enabled (without metadata) - Enable Data Mapping during the data load without adding the new metadata columns to the loaded file.

    Force string type

    Select this checkbox to force all exported fields to be converted to the String data type.

    Format column names

    Select this checkbox to replace spaces and special characters in column names with underscores and prefix columns starting with numbers with “n”.

    Convert column names to lowercase

    Select this checkbox to convert all column names to lowercase.

    String Line Breaks

    Select how to handle line breaks in exported data:

    • Surround string with quotation marks

    • Remove line breaks by escaping them

    • Replace line breaks with spaces

  5. Click Create.

Assigning Microsoft OneDrive as a destination#

To assign the Microsoft OneDrive destination to a datastream, follow these steps:

  1. Go to the Datastreams page.

  2. Open the chosen datastream by clicking on its name.

  3. In the Load section, click + Add destination.

  4. Select the Microsoft OneDrive checkbox in the list.

  5. Click Save.

  6. For the automatically enabled destinations, in the pop-up window, click Yes, load data if you want to automatically load your previously collected data into the new destination. The following data extracts will be loaded:

    • All data extracts with the status collected if no other destinations are enabled for the datastream

    • All data extracts with the status loaded if the data extracts have already been sent to Adverity Data Storage or external destinations

    Alternatively, click Skip to continue configuring the destination settings or re-load the data extracts manually. For more information, see Re-loading a data extract.

Configuring settings for loading data into Microsoft OneDrive#

To configure the settings for loading data into Microsoft OneDrive, follow these steps:

  1. Go to the Datastreams page.

  2. Open the chosen datastream by clicking on its name.

  3. In the Load section, find the Microsoft OneDrive destination in the list, and click image1 Actions on the right.

  4. Click image2 Destination settings.

  5. Fill in the following fields:

    Filename

    Specify the target file in the destination into which to load data from the datastream. The name can contain alphanumeric characters and underscores. For example, target_file.

    To load data into sub-folders within the folder defined in the Filename field, specify a file path. For example, folder1/target_file.

    By default, Adverity saves data from each datastream in a different file named {datastream_type}_{datastream_id}_{scheduled_year}_{scheduled_month}_{scheduled_day}.

    If you specify the same target file for more than one datastream, the existing file will be overwritten with the new data.

    • To create a new Microsoft OneDrive spreadsheet containing the data you load into Microsoft OneDrive, enter a name for the new spreadsheet into this field.

    You can use the following placeholders when creating new names in the destination:

    Placeholder

    Description

    {app_label}

    The data source’s short name.

    {datasource_label}

    The data source.

    {datastream_id}

    The datastream ID.

    {datastream_type}

    The data source.

    {extension}

    The file extension of the data extract.

    {extract_id}

    The data extract ID.

    {id}

    The datastream ID.

    {meta[*]}

    Replace * with a metadata placeholder to use metadata in the table name. For example, {meta[datastream_URI]} uses the datastream URI as the table name. For more information on metadata and placeholders, see Using placeholders.

    {name}

    The automatically generated filename of the data extract.

    {scheduled_day}

    The day when the data fetch was scheduled to run.

    {scheduled_month}

    The month when the data fetch was scheduled to run.

    {scheduled_year}

    The year when the data fetch was scheduled to run.

    {upload_day}

    The day when the data extract is loaded into the Microsoft OneDrive destination.

    {upload_hour}

    The hour when the data extract is loaded into the Microsoft OneDrive destination.

    {upload_minute}

    The minute when the data extract is loaded into the Microsoft OneDrive destination.

    {upload_month}

    The month when the data extract is loaded into the Microsoft OneDrive destination.

    {upload_second}

    The second when the data extract is loaded into the Microsoft OneDrive destination.

    {upload_year}

    The year when the data extract is loaded into the Microsoft OneDrive destination.

  6. Click Save.

Advanced Microsoft OneDrive tips#

Configuration#

To configure the Microsoft OneDrive destination, follow these steps:

  1. Go to the Destinations page.

  2. Click the Microsoft OneDrive destination in the list.

  3. In the secondary menu, click Configuration.

  4. Fill in the following fields:

    Drive ID

    (Optional) Select the ID of the drive in Microsoft OneDrive to which the data is sent.

    Folder

    (Optional) Enter the name of the folder (or file path to the folder) in Microsoft OneDrive to which the data is sent. Ensure the name of the folder or filepath begins and ends with a forward slash (/). For example, if you were sending a data extract to a folder called “Data”, enter the name of the folder as /Data/.