The updateFile() GraphQL mutation may be used to change files in LogScale.

For information on loading and using files, see the Lookup Files documentation page.

Syntax

Below is the syntax for the updateFile() mutation field:

updateFile(
   fileName: string!
   name: string!
   changedRows: [[string!]!]!
   headers: [string!]!
   columnChanges: [ColumnChange!]!
   limit: integer
   offset: integer
): UploadedFileSnapshot!

Given Datatypes

For the given datatype, ColumnChange, there are several parameters that may be given. Below is a list of them along with their datatypes and a description of each:

Table: ColumnChange

ParameterTypeRequired[a]DefaultDescription
changeKindColumnChangeKindyes The kind of column change. ColumnChangeKind is an enumerated list: Remove, or Add.
indexintegeryes The index of the column to change.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.


Returned Datatypes

The returned datatype UploadedFileSnapshot has its own parameters. Below is a list of them along with their datatypes and a description of each:

Table: UploadedFileSnapshot

ParameterTypeRequired[a]DefaultDescription
nameAndPathFileNameAndPathyes The name and path of the uploaded snapshot file (see FileNameAndPath Table).
headers[string]yes List of headers for the uploaded snapshot file.
lines[string]yes The contents of the file in the form of a list of lines, with each line being itself a list of column values.
totalLinesCountlongyes The total number of lines in the uploaded snapshot file.
limitintegeryes The file upload limit.
offsetintegeryes For the

getFileContents

query, this is the offset supplied to that query. For the

newFile

and

updateFile

mutations, this is always 0.
filterStringstring  Any string on which to filter the data.

[a] Some arguments may be required, as indicated in this column. For some fields, this column indicates that a result will always be returned for it.