К тексту на этой странице мог быть частично применён машинный перевод.

Создание рабочего процесса загрузки данных в Data Shuttle

Create an upload workflow with Data Shuttle to import information from a CSV or XLSX file into a Smartsheet sheet.

Доступно для:

Планы:

  • Smartsheet Advance Package

Разрешения:

  • Наблюдатель
  • Редактор
  • Администратор
  • Владелец

Узнайте, входит ли эта возможность в Smartsheet Regions или Smartsheet Gov.

Предварительные условия

Для использования Data Shuttle вы должны:

  • иметь разрешения на работу с целевой таблицей уровня Владелец, Администратор или Редактор;
  • получить от системного администратора Smartsheet разрешения на работу с премиум-приложением Data Shuttle в разделе Управление пользователями.

Перейдите на страницу Data Shuttle, чтобы связаться со своим торговым представителем и получить более подробную информацию.

If you can access Smartsheet University, you can find this information with interactive instructions in the Data Shuttle Upload Workflows course.

Запустить Data Shuttle


Key terms

  • Source: The source is where you import data from. For example, the source might be an XLSX export from another system that you want to port into Smartsheet. 
  • Target: The target is where you import the data to. Data Shuttle can import data to a sheet or a DataTable. In this article, we overview how to import data to a sheet. To learn how to upload to a DataTable, follow the steps in Create and populate a DataTable.
  • Unique identifier: Unique identifiers are unique IDs (key column values) that must not be duplicated within a specific column on a sheet.

Пример

If you use a sheet to track your contacts, you might designate Email Address as the unique identifier to avoid having the same email address listed twice in the Email Address column. Other examples of unique identifiers are part numbers, student ID numbers, or employee codes.


The basics of Data Shuttle upload workflows

Data Shuttle может загружать данные из следующих источников:

  • из систем, которые поддерживают экспорт в Google Таблицы, а также экспорт файлов в формате .xlsx или .csv;
  • из файлов, хранящихся на Google Диске, в Microsoft (OneDrive/SharePoint) и Box;
  • с общих дисков Google, Box и SharePoint.

При выборе хранилища OneDrive в качестве исходного или целевого расположения ваши сайты SharePoint появятся на панели слева, под файлами OneDrive. 

 

При создании рабочего процесса должно быть выполнено одно из следующих условий:

  • файл в формате .csv или .xlsx прикреплён в качестве вложения к таблице Smartsheet; или
  • файл в формате .csv, .xlsx или Google Таблиц расположен на Google Диске, в учётной записи, к которой вы имеете доступ.
  • При импорте файлов с Google Диска в Data Shuttle лицензированный пользователь Smartsheet должен иметь доступ к общему диску Google не ниже уровня "Наблюдатель".

Шаг 1. Создание рабочего процесса загрузки данных

  1. Выполните вход в Data Shuttle.

    You can also access the feature by going to the Navigation Bar and selecting Launcher > Data Shuttle.

  2. Нажмите на значок Brandfolder Image add button на панели навигации слева, чтобы создать новый рабочий процесс.
  3. Выберите Upload Data (Загрузка данных).

    Brandfolder Image
    Create new upload workflow

 

Pro tip: Copy from an existing workflow 

You can also make a copy of an existing workflow and edit it to create a new one: 

  1. Hover over the workflow that you’d like to copy. Then select  Brandfolder Image Data Shuttle kebab menu  on the right side of the screen on that row.
  2. Select Create a copy and give the new workflow a name.
  3. Hover over this row and select  Brandfolder Image Data Shuttle kebab menu  again to edit the workflow with any desired changes.

    Brandfolder Image
    Copy from an existing upload workflow

Шаг 2. Выбор исходного файла 

Notes regarding sources

  • For any shared drives used as a source, you must have at least Editor permissions. For OneDrive, Smartsheet only supports a connection with personal drives. 
  • Data Shuttle не поддерживает XLSX-файлы на основе OpenXML. При создании файла данных с помощью API рекомендуется использовать формат CSV, а не XLSX.
  • Размер исходного файла не должен превышать 1 ГБ.
     

To set a source

  1. Select your Source Location. Выберите исходный файл. Он может находиться в одном из указанных ниже мест.
    • Smartsheet Attachment (Вложение Smartsheet). Выполнив вход, вы можете найти таблицу, в которую вложен файл, с помощью функции поиска или обзора. You must have at least Viewer permissions for the sheet. Укажите, какое вложение следует импортировать при каждом запуске рабочего процесса: самое последнее или вложение с определённым именем.

      Если у вас возникли трудности при отправке вложений, свяжитесь с системным администратором Smartsheet и попросите проверить настройки вложений для вашей организации.

    • OneDrive или Sharepoint. Чтобы разрешить smartsheetapps.com просматривать файлы в вашей учётной записи OneDrive или Sharepoint, следуйте указаниям на экране. Пройдя аутентификацию, с помощью функции поиска или обзора найдите в сервисе OneDrive или Sharepoint файл в формате .xlsx или .csv, который собираетесь использовать.

      При выборе хранилища OneDrive в качестве исходного или целевого расположения ваши сайты SharePoint появятся на панели слева, под файлами OneDrive. 

    • Google Диск. Чтобы разрешить smartsheetapps.com просматривать файлы в вашей учётной записи сервиса Google Диск, следуйте указаниям на экране. Пройдя проверку подлинности, с помощью функции поиска или обзора найдите на Google Диске файл (.xlsx, .csv или таблицу Google), который собираетесь использовать.
       
    • Box. Чтобы разрешить smartsheetapps.com просматривать файлы в вашей учётной записи Box, следуйте указаниям на экране. Пройдя проверку подлинности, с помощью функции поиска или обзора найдите в сервисе Box файл в формате .xlsx или .csv, который собираетесь использовать. Вы можете загружать как собственные файлы Box, так и файлы, к которым вам был предоставлен доступ.
  2. Check the This file has column headers box if your file contains column headers.
  3. If your data doesn’t begin on row 1 or isn’t on tab 1 of your workbook, specify the First Row of the data and Tab Number.
  4. Нажмите Next (Далее).

    Brandfolder Image
    Select your source file

Шаг 3. Выбор целевой таблицы и действий рабочего процесса

Настройте загрузку результатов в Smartsheet.

  1. Выберите целевую таблицу, в которую будут записаны ваши данные. For this example, we cover how to upload data to a sheet.

    • If you’d like to learn how to upload to a DataTable, follow the steps in Create and populate a DataTable.
    • Если источником служат вложения Smartsheet, то в качестве целевой таблицы можно выбрать исходную или любую другую таблицу.
    Brandfolder Image
    Set your target location
  2. Select how you want to import the data into Smartsheet. Выберите один из указанных ниже вариантов.

    • Replace all target sheet rows with the data from the input file. This option scans the source sheet to find the first change. When a change is detected, Data Shuttle replaces all data in the target sheet from that row onward.
    • Merge data into the target based on a key column value. Note that you must have a unique identifier column to use this functionality. Выбрав объединение данных, необходимо также задать параметры строк: You can select any of these combinations:
      • Add rows to the sheet as they are added to the source file (Добавлять строки в таблицу по мере их добавления в исходный файл); This option adds new rows for unique identifiers not already included in the target.

        Пример

        If you have a list of contacts and use email addresses as the unique identifier and Data Shuttle finds a new email address on your source (for example: Hiro Senjima, hiro.senjima@mbfcorp.com) that isn’t already on your sheet, it would add a new row for Hiro and populate his details. If Hiro has two different email addresses, this could result in a situation where he is listed twice on your target sheet.

      • Update rows as the change in the source file (Обновлять строки по мере их изменения в исходном файле); This is part of a true “merge” functionality. If there’s an existing row of data in your sheet for a unique ID and any changes are made to that record in the source, it updates that row in the target.

        Пример

        If your Unique Identifier column is email addresses and Sally Smith (sally.smith@mbfcorp.com) changes her phone number to (111) 222-3333, Data Shuttle would look for the row where the email address is sally.smith@smartsheet.com and update the phone number for this row.

      • Delete rows that no longer match the filter criteria (Удалять строки, которые больше не соответствуют условиям фильтра). This option deletes rows that no longer match the filters you’ll set up in the next step.

        Пример

        If you set a filter to only import records from your source where the Location column has the value of United States and Hiro Senjima moves to Canada, this would delete the row with Hiro’s data from your target sheet.

    • Настройте обновление значений в раскрывающихся списках для выбранных столбцов. This option replaces the dropdown column options in your target sheet with values within your Excel or CSV file. Создание динамических раскрывающихся списков с помощью Data Shuttle
    Brandfolder Image
    Specify workflow actions and row options for your target file

Step 4: Build filters (optional)

Creating filters is optional, but you can use them to determine the data you want to bring into Smartsheet. Например, вы можете создать фильтр, чтобы импортировать только строки со статусом "Выполняется".

 

Filters are helpful when working with large data sets that exceed the sheet limit of 20,000 rows. Если число строк в вашем наборе данных превышает ограничения Smartsheet, для работы с ним можно использовать DataTable. Дополнительные сведения о максимальных размерах таблиц и импортируемых файлов см. в статье Требования к системе и рекомендации по использованию Smartsheet.

Фильтры задаются с учётом регистра. Значения в них должны в точности совпадать со значениями в вашем файле.

  1. На вкладке Filter (Фильтр) выберите Add another filter (Добавить новый фильтр).

    Brandfolder Image
    Add filters to your upload workflow
  2. В режиме настройки фильтра выберите исходный столбец, оператор сравнения (например, равно или содержит) и значение.
  3. В поле Filter logic (Логика фильтра) объедините фильтры с помощью оператора AND или OR. 
    • С помощью идентификаторов фильтров (число рядом с фильтром) можно установить отношения между фильтрами. The filter ID is the number next to each filter.

      Brandfolder Image
      Filter your data
  4. Нажмите Next (Далее).

 

Настройка сложной логики фильтрации

Скобки наряду с операторами AND и OR позволяют задать более сложную логику фильтрации.

Пример

Пример. Выражение (1 AND 2) OR 3 позволяет включить все данные, где (Отдел = "Обслуживание" И Размер мини-приложения = "Большое") ИЛИ Отдел = "Маркетинг".

В этом примере будут импортированы только большие мини-приложения для отдела обслуживания, а также все мини-приложения для отдела маркетинга.


Step 5: Map columns between source and target

Designate which columns from the source file should map to the target columns. Here are a few things to note:

  • Your source and target column names don’t need to match.

  • If there are column names from the source that match the column names in the target sheet, they map automatically. You can add or edit any of these mappings. 

  • You don’t need to map all columns of the source or target. 

  • You must select the Unique Identifier column if you merged data into the target based on a key column value. Refer to the key terms for more information. 

  • If you experience issues with formatting of your fields after import, you can select the Column Type formatter to change the column format. This option is a hidden column menu between Source field and Sheet Column.

  • If you modify the underlying sheet, select the Refresh button to update the source and target columns. При этом будут перезаписаны все изменения, сделанные вручную, поэтому перед запуском такой команды проверьте, верно ли настроено сопоставление столбцов.

When mapping, you see the columns of your source file and the sheet columns.

  1. Чтобы настроить сопоставление столбца вручную, щёлкните раскрывающийся список рядом с входным столбцом и с помощью прокрутки выберите сопоставление для столбца Smartsheet, указанного справа.

  2. After you've completed all mapping, select Next.

    Brandfolder Image
    Map your columns

Шаг 6. Планирование рабочего процесса

Рабочий процесс может запускаться автоматически при выполнении одного из двух условий: при добавлении вложения (Run on Attachment) или по расписанию (Run on Schedule).

  • Запуск при добавлении вложения
  • Запуск по расписанию

You can choose one, both, or neither set. If you don’t choose a setting, you must run your workflow manually. 

Brandfolder Image
Schedule your upload workflow

Запуск при добавлении вложения

Use this option if your source is a Smartsheet attachment. Note that you can't use it if the target is DataTable.

 

Когда выбран этот режим, при добавлении вложения в исходную таблицу рабочий процесс будет оценивать его и запускаться, если вложение соответствует критериям. The criteria for matching depend on whether it aligns with the indicated name you set on the source page. If you select Most Recent, it consistently imports new data if the columns in your attachment match the column names in the mapping step.

Запуск по расписанию

If you select Run on attachment, you can still choose Run on schedule. Note that you can also activate them separately.

When you enable Run on schedule, Data Shuttle looks at the source location on a recurring basis and automatically updates the target sheet with any changes found. Source locations include shared drives such as Google Drive, OneDrive/SharePoint, and Box.

  1. Активируйте переключатель Run on Schedule (Запускать по расписанию). 
  2. Чтобы настроить периодичность запуска, заполните следующие поля.
    • Days of the week (Дни недели). Дни недели, в которые необходимо запускать рабочий процесс. 
    • Start time (Время начала). Время запуска рабочего процесса.
    • Execute every (Интервал повтора). Периодичность запуска (например, каждые 15 минут). For example, every 15 minutes.
    • End time (Время окончания). Время остановки рабочего процесса.
  3. Нажмите Next (Далее).

    Data Shuttle uses UTC.

Запуск вручную

This option isn't a selectable, but you can manually run any Data Shuttle workflow once it's built, even if it has if it has Run on attachment or Run on schedule set.

 

Once you publish a workflow, you can manually run your workflow from the dashboard by hovering over the desired workflow and selecting Run.

You can see the workflow execution status in the Last Run (UTC) column on the dashboard.

Brandfolder Image
Run upload workflow manually

Step 7: Use input expressions (optional)

Выражения DataShuttle позволяют применять к данным, импортированным в таблицу с помощью Data Shuttle, формулы Smartsheet. You may often forgo this step and instead create column formulas once you’ve uploaded the data to your target sheet.

Пример

Предположим, что у вас есть несколько исходных файлов, данные из которых поступают в одну и ту же таблицу Smartsheet. Вы хотите видеть, из какого источника была импортирована та или иная строка. Если один набор данных поступает из Netsuite, а другой — из Oracle, вы можете создать входное выражение и получить информацию об источнике данных во время их загрузки с помощью Data Shuttle.

Добавление сведений об источнике данных 

  1. Your target sheet must already contain the column you use for the input expression. In this example, the column is Source.

    Brandfolder Image
    Your target sheet
  2. При создании рабочего процесса в Data Shuttle не назначайте сопоставление для столбца Источник.

    Brandfolder Image
    The source column shouldn't be mapped
  3. На вкладке Expressions (Выражения) выберите Add another expression (Добавить выражение).
  4. В поле Unique Field Name (Уникальное имя поля) укажите имя нового столбца. В этом примере используется имя Источник.
  5. В поле Function Syntax (Синтаксис функции) введите формулу. В этом примере используется формула =”Netsuite”.

    Brandfolder Image
    Add an expression to include a new function to your target sheet.
  6. Вернитесь на вкладку сопоставления и сопоставьте поле, содержащее выражение, с соответствующим столбцом. В этом примере это будет поле "Источник" и столбец "Источник".

    Brandfolder Image
    Map Source onto Source

After you finish building the workflow and publishing it, when Data Shuttle runs, the formula is placed into the uploaded rows. В этом примере при выборе ячейки в столбце "Источник" вы увидите формулу =" Netsuite".

Brandfolder Image
Data showing the source location

В качестве выражений можно использовать любые другие функции Smartsheet, включая те, которые ссылаются на значения других столбцов.

Примеры

  • Сегодня This formula would be placed in the TODAY() function, updating whenever someone opens the sheet.
  • =RIGHT(Location@row,3). =RIGHT(Местоположение@row,3) [В столбец будут подставляться три символа из соответствующей строки столбца "Местоположение".]

Шаг 8. Публикация рабочего процесса

You can share your workflows with other users in your Smartsheet plan. When you share a workflow, those users become Workflow Managers. As Workflow Managers, they can edit, run, archive, and share the workflow as long as they have at least Editor permissions on both the source and target files. Admins can also add or remove Workflow Managers for any workflow in their plan.

  1. In the Sharing settings tab, type the name of the user you want to share the workflow to in the text field provided.
  2. Нажмите Next (Далее).
Brandfolder Image
Share your upload workflow

Шаг 9. Публикация рабочего процесса

  1. Finish your work on the Input Expressions page and select Next.
  2. Введите название рабочего процесса и нажмите кнопку Publish (Опубликовать). Теперь вы сможете в любой момент запустить, изменить или удалить этот рабочий процесс.

    • If you set the Data Shuttle workflow to Run on a schedule, it will run at the designated time.
    • If you chose Run on attachment or neither option, you may need to run the workflow manually by selecting Run when hovering over your workflow in the Data Shuttle dashboard.
    Brandfolder Image
    Give your workflow a name and publish it