How Can I Upload a File from My Filesystem?
To quickly push one or several files from your filesystem to Data Factory Studio (for example, a CSV file), follow these steps:
- From Storage,
create an
Object Storage Bucket.
Upload your files in a DOS bucket and
define a prefix (separated by slashes) to create a folder hierarchy in the storage.
For more information, see Configuring an Object Storage Bucket.
- From Storage,
create an
Index Unit.
Define a data model. For example, a class
representing your CSV file and properties matching the names of each column exactly.
For more information, see Configuring an Index Unit Storage.
- From
Pipeline, create an
Index Tabular Data pipeline.
In Source,
for Storage, reference the Object Storage
Bucket and its Path prefix.
In
Destination, for Target, reference the
Index Unit storage, its package, and a class.
For more
information, see Indexing Tabular Data.
What Happens When You Push a New File?
Data Factory Studio detects when new sources files are added to the S3 bucket specified in the
Pipeline > Source >
Storage, and indexes these files automatically. Similarly, it also detects all
updates made to existing source files, and reindexes these files to keep the index up to
date.
What Happens When Sources Files Are Deleted?
The behavior depends on the pipeline type.
| Pipeline Type |
Description |
|
Index Tabular Data |
Data Factory Studio detects when files are deleted, and deletes all associated items from the
index. |
|
Index Event Data |
Nothing happens, your index stays the same. Events follow the append-only
paradigm like event-logs in other databases. So unlike tabular pipelines, here Data Factory Studio does not try to reverse changes brought by removed files. If your use-case
requires removing things from the index the json-event format provides actions
like DeleteItem. For more information, see Delete Item.
|
|
Copy Object Data |
Files removed from the source files are removed from the destination
too. |
What Happens with Lines Deleted in Source Files?
Data Factory Studio detects when lines are deleted or updated in source files. Data Factory Studio deletes all associated items from the index, and recrawls the files.
How to Manage URIs (Item Identifier)?
It is better to specify URI values in your source files. For CSV files, create a dedicated
column with uri as header, and define URI values in its cells. The URI
value must be unique in the entire index unit. You can consider it as the global primary key
of the index.
To point to other elements in the index, use an attribute of Reference
type. The value of this attribute must be the URI of the target element (even if it does not
index yet in the index unit). In the following example, you specify who is Michael's
neighbor by referencing the URI value associated with Jane.
uri, name, neighbor
1, Michael, 5
5, Jane, 1
How to Copy Binary Objects in a DFS Object Storage?
- Add or import an
Object Storage Bucket. For more information, see Add a New Object Storage Bucket.
- Upload binary files manually in the
Object Storage Bucket, and specify prefixes to classify them. For
more information, see Add a New Object Storage Bucket.
Alternatively, to schedule the upload automatically, you can choose to create a
Copy Object Data pipeline. For more information, see Copying Object Data.
- You can then typically store the object file ids uploaded in the
Object Storage Bucket, in an
Index Unit attribute value. See the procedure to show images for
the Image, Result List, and Hit
Details visualizations in the Data Perspective Studio documentation.