# Importing regular expressions or SQL patterns from a CSV file

Available in...

* Big Data Platform
* Cloud API Services Platform
* Cloud Big Data Platform
* Cloud Data Fabric
* Cloud Data Management Platform
* Data Fabric
* Data Management Platform
* Data Services Platform
* Qlik Talend Cloud Enterprise Edition
* Qlik Talend Cloud Premium Edition
* Real-Time Big Data Platform

## About this task

The CSV file must have specific columns including the ones listed in the table below. The CSV file may contain only a few of them.

| Column name | Description | Can be empty? |
| --- | --- | --- |
| Label | The label of the pattern | No |
| Purpose | The purpose of the pattern | Yes |
| Description | The description of the pattern | Yes |
| Author | The author of the regular expression | Yes |
| Relative Path | The relative path to the root folder | Yes |
| All\_ DB\_Regexp | The regular expression applicable to all databases | Yes |
| &lt;database name&gt;\_Regexp | The regular expression applicable to this specific database | Yes |

If you are importing a set of parser rules, see the specific columns in [Exporting parser rules](https://help.qlik.com/talend/en-US/studio-user-guide/8.0/exporting-parser-rules).

## Procedure

1. In the DQ repository tree view, expand Libraries &gt; Patterns.
2. Right-click Regex and select Import patterns.

   The Import Patterns wizard opens.

   The Import PatternsImport Patterns wizard opens. ![Overview of the Import Patterns wizard.](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/Import_Patterns.png)
3. Browse to the CSV file holding the regular expressions.
4. In the Duplicate patterns handling area, select:
   | Option | Description |
   | --- | --- |
   | skip existing patterns | Import only the regular expressions that do not exist in the<br>corresponding lists in the DQ repository tree<br>view. A warning message is displayed if the imported patterns already<br>exist under the Patterns folder. |
   | rename new patterns with suffix | Identify each of the imported regular expressions with a suffix. All<br>regular expression will be imported even if they already exist under the<br>Patterns folder. |
5. Click Finish.

   A confirmation message is displayed.
6. Click OK.

   All imported regular expressions are listed under the Regex folder in the DQ repository tree view.

## Results

The regular expressions are imported under the same folders or subfolders they had in the initial repository.

Information noteImportant: If ![Warning](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/warning_small.svg) is displayed next to the name of the imported regular expression or SQL pattern in the tree view, open the expression or the pattern and correct the issue. Usually, problems come from missing quotes. Verify your regular expressions and SQL patterns and ensure that they are encapsulated in single quotes.