Export of DataBlocks

Introduction

Datasets from DataBlocks can be exported to the various Connectors (remote servers or database) of the selected Project or public Projects, or downloaded to your workstation (via the local Connector).

You can export from

  • the list of DataBlocks, by clicking on the export icon export.

  • the DataBlock page, by clicking on the menu icon, under the "Export" menu.

It is possible to load an Export template to automatically fill in the export configuration form, and to set up a custom export.

Exporting a DataBlock

It is possible to export a DataBlock either from the DataBlock list or from the DataBlock action menu +. You can use an export template to fill in the settings form automatically.

The duration of the export varies according to the parameters and the volume of data exported.

Export template

You can select an export template to fill in the export form automatically.
Only templates linked to connectors to which you have access are available. ++ You can modify the form or click immediately on Export.

General parameters

  • Connector : Connector used to perform the export.
    Only Connectors on which the logged-in user has sufficient rights are available in the list. All the Connectors of the current Project and of the public Projects of which the user is a member are available in the list, with the exception of HTTP type Connectors.
    The "Local" Connector allows data to be exported locally and then downloaded.

  • Output format*: Format of the export file. Information This option is only available for Connectors authorising a file type export (CSV, Parquet, Json, XML, Excel).

Configuration

The configuration and writing parameters depend on the Connector type and output format selected.

The section Configuring an export details the options available.

Write parameters

It is possible to configure a path or filename dynamically or define it manually.
The uuid option automatically generates a unique identifier when exporting.

Dynamic path and filename

The path and/or filename can be generated dynamically during export.
To do this, use the language elements available in the path/file fields.

Language element Detail Example

%uuid

Generation of a unique name

475cf59e-990d-48bc-9df0-1ff4e43227e4

%date

Date/time information (1). The default time is YYYY-MM-DD

2023-10-30

%date{yyyy-MM-dd_HH-mm}

date/time information (1) formatted according to the write mask defined +. (About dates)

2023-10-30_16-17

%dbcode

DataBlock code (unique and stable over time)

LIBELLE_DATABLOCK_5678

%dblabel

DataBlock label

My DataBlock

%projectcode

Project code (unique and stable over time)

MY_PROJECT_9123

%projectlabel

Project label

My Project

(1) The dates and times generated are universal times, implying a time difference of 1 or 2 hours from Paris time, for example.

Examples of patterns

Specified path Value obtained

%projectlabel/%dblabel/%date{dd-MM-yyyy}

Project label/DataBlock label/29-02-2020

%dblabel/%date{yyyy}/%date{MM}/%date{dd}

DataBlock_Label/2020/02/29

%projectlabel/%dblabel/%date{yyyy]/%date{MM-dd_HH-mm}

Project Label/DataBlock Label/2020/02-29_12-59

%uuid

475cf59e-990d-48bc-9df0-1ff4e43227e4

Options by connector type

Local export

The Local DataChain connector allows you to export files that can be downloaded to your workstation. It does not allow you to specify a path: once the file has been generated, you can download it: it will be stored according to your browser settings.

Export settings vary depending on the output format of the file selected.

Local mode export options

Fields Detail CSV XML JSON PARQUET EXCEL

Keep original labels

Check to retain DataBlock column labels

YES

YES

YES

YES

YES

Compress

Check to compress the file (ZIP) to reduce the final size.

YES

YES

YES

YES

YES

Encoding

Format in which Unicode characters are encoded

YES

Separator

Character used to separate different values

YES

Character string identifier (1)

Character added around a string value if the character used as a separator is present in the value.

YES

On all strings

If ticked, the identifier is added to all character string values.

YES

Escape character (1)

Character added in front of characters identical to the identifier when they are contained in values

YES

Keep blanks left / right

Check to preserve spaces around values (by default only spaces between values in the same cell are preserved)

YES

Export headers

Select to create a header line

YES

YES

Number of partitions

Number of files to generate (preferable for large volume exports)

YES

YES

YES

YES

YES

root and line tags

Text to be used in tags (default ROWS and ROW)

YES

Cell coordinates

Target cell from which to start writing data

YES

File name

Value used as file name (UID or specified value)

YES

YES

YES

YES

YES

(1) Example of using the escape character on the identifier

  • Input value: This is an example.

  • Output value: "This is an example".

Export to a remote server

Remote server connectors can be used to export files. S3 connectors automatically delete and replace data.

Export settings vary depending on the output format of the file selected.

Options for exporting to a remote server (HDFS, SFTP, S3)

Fields Detail CSV XML JSON PARQUET EXCEL

Keep original labels

Check to retain DataBlock column labels

YES

YES

YES

YES

YES

Compress

Check to compress the file (ZIP) to reduce the final size

YES

YES

YES

YES

YES

Encoding

Format in which Unicode characters are encoded

YES

Separator

Character used to separate different values

YES

string identifier (1)

character added around a string value if the character used as a separator is present in the value

YES

Sur toutes les chaines de caractères

Si coché, l’identificateur est ajouté sur toutes les chaînes de valeurs de type chaîne de caractère.

OUI

Caractère d’échappement (1)

Caractère ajouté devant les caractères identiques à l’identificateur lorsqu’ils sont contenus dans les valeurs

OUI

Garder les blancs à gauche / à droite

Cocher pour préserver les espaces situés autours des valeurs (par défaut seul les espaces entre les valeurs d’une même cellule sont conservés)

OUI

Exporter les entêtes

Sélectionner pour créer une ligne d’entête

OUI

OUI

Nombre de partitions

Nombre de fichiers a générer (à privilégier pour les exports de volume important)

OUI

OUI

OUI

OUI

OUI

Tags de racine et de ligne

Texte à utiliser dans les balises (par défaut ROWS et ROW)

OUI

Cell coordinates

Target cell from which to start writing data

YES

Path

Location of data in the server (use the magnifying glass at the end of the line to explore and select the folder).

YES

YES

YES

YES

YES

File name

Value used as file name (UID or specified value)

YES

YES

YES

YES

YES

Export to a database

The Database Connectors (SQL, NoSQL or GraphBase) allow you to export data in the form of data entries.
The Graph Base Connectors (NEO4J) do not allow you to specify a schema.

Export parameters vary according to the type of database and the write mode selected.

Parameters for Database Connectors (SQL, NoSQL or Graph Database)

Fields Detail SQL NOSQL Base Graphe (NEO4J)

Keep original labels (2)

Check to keep the DataBlock column labels. Uncheck to use standard column codes.

YES

YES

YES

Schema

Schema label if applicable

YES

Target

Target label (UID or specified value)

YES

YES

YES

Node

Node label (only for the "Overwrite" option)

YES

Write mode

Specifies export behaviour in the database (Add / Replace)

YES

YES

YES

(2) Warning Caution, if this option is chosen when exporting to databases, some special characters may cause an error when exporting.

Quick Reference

Making an export pie.svg

Steps Objective Action Benchmarks

1

Access to GenericsData module Generics Data logo

Click on the icon in the left-hand menu of DataChain.

Logo Generics Data

2

Access to the list of DataBlocks

Click on icon DataBlocks

genericsData-color.svg

4

Search for DataBlock

Use of available search functions

5

Access to the Export function

Click on the icon

upload.svg

6

Export pop-up window

Enter export parameters

7

Carry out export

Export* button