Create a File type data source
- UpdatedJan 30, 2025
- 4 minutes to read
- Yokohama
- Data Management
Create a File type data source record to define what data an import set should import.
Before you begin
About this task
Procedure
- Navigate to All > System Import Sets > Administration > Data Sources.
- Click New.
-
Complete the form.
Field Description Name A unique name for this data source. Import set table label A label for the import set staging table to use. Import set table name The ServiceNow AI Platform uses the label you entered to construct a unique table name. This prevents namespace collision with an already existing table. Type File. Format Only the default XML-based file format (.xlsx) is supported, unless saved as "Strict Open XML Document." Zipped Selected if the import file is compressed. Use Batch Import If selected, specifies that loading data should be batched when you click Load data or Test load 20 records. Batch Size Specifies how big the batches should be. Appears only when the Use Batch Import field is selected. The glide.import_set_load_usebatch and glide.import_set_load_batch_size properties affects these fields. The priority order for the properties and fields are as follows: If the property is set, use the property value. If not, use the field value. If neither property is set, use the default batch size of 1000.- For example, if glide.import_set_load_usebatch = true and glide.import_set_load_batch_size = 200, use 200 as the batch size, regardless of the field values.
- For example, if glide.import_set_load_usebatch = true and the glide.import_set_load_batch_size property is not set, use the default batch size of 1000.
- For example, if the glide.import_set_load_usebatch property is not set and the Use Batch Import field = true, use the Batch Size field value (or the default of 1000 if the Batch Size field value is not set)
- For example, if the glide.import_set_load_usebatch property = false and the Use Batch Import field = true, do not use batch import, since the property is set to false.
File retrieval method The retrieval method for this file. File path The path to the file to import. You can include a system property value in this field using the format ${system.property.name}. When the connection is made, the variable is replaced with the value of the specified property.Note: For files retrieved using HTTP or HTTPS, the glide.ds.file.http.variable_replacement property must be true to use system property expansion.For example, you can specify the File path value /countries.csv?key=${datasource.apikey}. When the connection is made, the value of the datasource.apikey system property is passed as the value for the key parameter.
Note: For HTTP and HTTPS protocols, the file path is automatically URL encoded. Do not specify a URL-encoded file path when using either of these protocols.CSV delimiter The delimiter character for the CSV file. Parsing script The script used to parse a single line of input. As you type the script, script auto-complete presents the choices available to you. For more information, see File type data sources. Sheet number The Excel sheet number to load data. Header row The Excel row number to load the column labels. Path for each row The path expression used to select JSON objects, which will become rows in the import set table. The path should be // for JSON objects. Discard Arrays Selected to discard JSON arrays as a value. Unselected to serialize JSON arrays as a value. Expand node children Selected if child elements of the XML node or JSON object should be converted into additional columns. Unselected if the parent column value should be an XML or JSON fragment. For JSON, note that selecting this option expands objects only, not arrays. For nested array support, see JSON file import examples. Data in single column Selected to store data in a single column. Xpath for each row XPath expression that selects the nodes which become rows in the import table. The children of the selected nodes will become the columns in the rows. SCP authentication method Choice to authenticate with a username and password or with a public key. Note: You cannot authenticate to data sources with a public-private key pair. Use a username and password authentication instead.Server Name of the server from which the tables will be imported. Port Port to use to connect to the specified server. This field appears if you select HTTP or HTTPS as the file retrieval method. Username User name for authentication on the JDBC server. Password Password for authentication on the JDBC server. Private keyfile Keyfile when using legacy SCP public-private keyfiles. Note:- You cannot authenticate to data sources with a public-private key pair. Use username and password authentication instead.
- Do not use this legacy option. Although it is available for use, it is not supported.
System keystore Selected to validate the certificate from the FTPS server against all saved certificates. This certificate may be any type supported by the instance. If not selected, the instance uses the Java default certificate to validate the FTPS server. This field is available only for data sources with a File retrieval method value of FTPS. All FTPS file retrieval methods are supported, including Auth TLS, Auth SSL, Implicit SSL, and Implicit TLS. - Click Submit.
What to do next