mirror of
https://github.com/Wisser/Jailer.git
synced 2026-05-18 23:19:13 -05:00
201 lines
9.1 KiB
HTML
201 lines
9.1 KiB
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
|
|
<title>Jailer - Filters</title>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
|
|
<meta name="description" content="Data Export Tool" />
|
|
<link rel="shortcut icon" href="favicon.ico" />
|
|
<meta name="keywords" content="data export referential integrity java jdbc dbms" />
|
|
<link rel="stylesheet" type="text/css" href="styles.css" />
|
|
</head>
|
|
|
|
<body left-margin="0" top-margin="0">
|
|
<div align="left">
|
|
<table style="text-align: left; position: absolute; left: 0pt; top: 0pt;" border="0"
|
|
cellpadding="0" cellspacing="0" height="407" width="100%">
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="2" class="bannerbackground" height="33" width="100%">
|
|
<table border="0" cellpadding="4" cellspacing="0" width="100%">
|
|
<tbody>
|
|
<tr>
|
|
<td><a href="https://github.com/Wisser/Jailer"><img src="logo.png" hspace="10" /></td> <td class="slogan" width="100%"></a>
|
|
|
|
|
|
|
|
<td style="text-align: right; width: 100%;">
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tbody>
|
|
<tr>
|
|
<td><a href="https://github.com/Wisser/Jailer"><img src="GitHub-Mark-64px.png" title="GitHub" /></a> </td></tr><tr style="height: 100%;"><td> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="2" class="nav1background" width="100%">
|
|
<b><font color="#FFFFFF"><a href="home.htm" target="_self" class=
|
|
"tlink"> Home </a> <a href="quicktour.htm" target="_self"
|
|
class="tlink"> Quick Tour </a> <a href="exporting-data.htm"
|
|
target="_self" class="tlinkA"> Tutorial </a> <a href=
|
|
"data-browsing.html" target="_self" class="tlink"> Data Browser </a> <a class="tlink" href="videos.html" target="_self"> Videos </a>
|
|
<a href="faq.html" target="_self" class="tlink"> FAQ </a>
|
|
<a href="api.html" target="_self" class="tlink"> API </a>
|
|
<a href="design.htm" target="_self" class=
|
|
"tlink"> Documentation </a> <a href=
|
|
"http://sourceforge.net/forum/?group_id=197260" target="_self" class=
|
|
"tlink"> Forum </a> <a href=
|
|
"http://sourceforge.net/project/showfiles.php?group_id=197260" target="_self"
|
|
class="tlink"> Download </a>
|
|
</font></b></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="2" class="spacer" width="100%"></td> </tr><tr><td class="lmenucontainer"> </td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td class="lmenucontainer" height="100%" valign="top" width="14%">
|
|
<div align="center">
|
|
<center>
|
|
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
|
<tbody>
|
|
<tr>
|
|
<td height="6px" width="100%"> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</center>
|
|
</div>
|
|
|
|
<ul>
|
|
<li><a href="preparation.htm" target="_self" class="mlink">Preparation</a> </li><br>
|
|
<li>Basic</li>
|
|
|
|
<ul>
|
|
<li><a href="exporting-data.htm" target="_self" class="llink">Exporting Data</a> </li>
|
|
</ul>
|
|
|
|
<ul>
|
|
<li><a href="deleting-data.htm" target="_self" class="llink">Deleting
|
|
Data</a> </li>
|
|
</ul>
|
|
<br>
|
|
<li>Advanced</li>
|
|
|
|
<ul>
|
|
<li><a href="filters.html" target="_self" class=
|
|
"llinkA">Filters</a> </li>
|
|
</ul>
|
|
|
|
<ul>
|
|
<li><a href="subset-by-example.html" target="_self" class=
|
|
"llink">Subset By Example</a> </li>
|
|
<li><a href="exporting-xml.html" target="_self" class="llink">XML Export</a> </li>
|
|
</ul>
|
|
</ul>
|
|
|
|
<table border="0" cellpadding="5" cellspacing="0" width="100%">
|
|
<tbody>
|
|
<tr>
|
|
<td class="content2background"><img style="width: 160px; height: 1px;"
|
|
alt="" src="architecture-Dateien/vgradp.gif" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<p> </p>
|
|
</td>
|
|
|
|
<td class="contentbackground" height="418" valign="top" width="86%">
|
|
<div align="right">
|
|
<table border="0" cellpadding="0" cellspacing="0" height="542" width="98%">
|
|
<tbody>
|
|
<tr>
|
|
<td class="content" height="520" valign="top" width="100%">
|
|
|
|
<br />
|
|
A filter assigns an SQL expression to a table column.
|
|
<br /><br />
|
|
<h3>Export filter</h3>An export filter is evaluated during the export phase. <br>
|
|
The column values are replaced by the result of the expression when the export file is written.<br>
|
|
${old-value} is a synonym for the filtered column.<br />
|
|
<br />
|
|
With the filter EMPLOYEE.NAME := lower(${old-value})<br />
|
|
<br />
|
|
<img src="filterimg/image001.png" /><br />
|
|
<br />
|
|
... the names of the employees are exported with lowercase letters:<br />
|
|
<br />
|
|
<img src="filterimg/image002.png" />
|
|
|
|
<h4>Literal filter</h4>A literal filter is also evaluated during the export phase.<br>
|
|
The result is written literally to the export file.<br>
|
|
In the import phase, it is evaluated as an SQL expression.<br>
|
|
To define a literal filter, add the prefix "literal:" to the filter expression.<br><br>
|
|
The filter:<br />
|
|
<br />
|
|
<img src="filterimg/image003.png" /><br />
|
|
<br />
|
|
replaces employee names with numbers from a sequence in the target
|
|
database.<br />
|
|
<br />
|
|
<img src="filterimg/image004.png" /><br />
|
|
<br />
|
|
|
|
<h3>Import filter</h3>An import filter is evaluated during the import phase.<br>
|
|
Import filters are especially useful for filtering primary key columns. <br> <br>
|
|
Filters on primary key columns are automatically applied to the corresponding foreign key columns. <br>
|
|
An import filter ensures that a "null" value remains null and that a foreign key value maps to the same <br>
|
|
value as the primary key, even if the filter expression is not a deterministic function. <br>
|
|
(More precisely, if the filter expressions and types of any two filters are exactly the same for two different columns, <br>
|
|
then both filters will map each value to exactly the same target value.)
|
|
<br><br />
|
|
This filter on <i>EMPNO</i> uses a sequence to generate new EMPNOs during the
|
|
import phase:<br />
|
|
<br />
|
|
<img src="filterimg/image005.png" /><br />
|
|
<br />
|
|
<br />
|
|
|
|
<h3>Filter templates</h3>Templates allow defining filters of the same kind for a set of columns that satisfy a given condition.<br />
|
|
<br />
|
|
<img src="filterimg/image007.png" />
|
|
<br />
|
|
<br /><br />
|
|
|
|
<h3 id="nullfilter">"<i>null</i>" filter on foreign key columns</h3>
|
|
If a foreign key of a table is nullable, a "null" filter on it (resp. on all columns of a compound foreign key) <br>
|
|
causes the foreign key columns of exactly those rows, whose parent rows are not exported as well, to be populated with <i>null</i>. <br><br>
|
|
Likewise, when deleting, only the foreign key columns of those rows are set to <i>null</i> that are not deleted themselves, but their parent rows are.
|
|
<br /><br />
|
|
The extraction model editor offers the corresponding checkbox "Set foreign key to null ...".
|
|
<br /><br/>
|
|
<img src="nullfilter.png" />
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<p> </p>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td height="12" valign="top" width="14%"><br /></td>
|
|
|
|
<td><br /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</body>
|
|
</html>
|