mirror of
https://github.com/Wisser/Jailer.git
synced 2026-05-24 11:39:31 -05:00
204 lines
9.2 KiB
HTML
204 lines
9.2 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><img src="logo.png" hspace="10" /></td> <td class="slogan" width="100%">
|
|
|
|
|
|
|
|
<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. The column values will be replaced by the result of
|
|
the expression when the export file is written. ${old-value} is a
|
|
synonym for the filtered column.<br />
|
|
<br />
|
|
With the filter EMPLOYEE.NAME := lower(${old-value})<br />
|
|
<br />
|
|
<img width="472" height="300" src="filterimg/image001.png" /><br />
|
|
<br />
|
|
The employee names will be exported with all letters
|
|
lowercase:<br />
|
|
<br />
|
|
<img src="filterimg/image002.png" />
|
|
|
|
<h4>Literal filter</h4>A literal filter is also evaluated during
|
|
the export phase. The result will be written literally into the
|
|
export file. During the import phase, it will be evaluated as a SQL
|
|
expression. To define a literal filter, add the prefix "literal:"
|
|
to the filter expression. The filter:<br />
|
|
<br />
|
|
<img width="564" height="242" 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. Import filters are especially useful for filtering
|
|
primary key columns. Filters on primary key columns are
|
|
automatically applied to the corresponding foreign key columns.
|
|
With an import filter, it's guaranteed that a 'null'-value remains
|
|
null and that a foreign key value is mapped to the same value as
|
|
the primary key even if the filter expression is not a
|
|
deterministic function.<br />
|
|
(More precisely, if the filter expressions and the types of any two filters on two different columns are exactly the same, then both filters will map same values to exactly the same target values.)<br><br />
|
|
This filter uses a sequence to generate new EMPNOs during the
|
|
import phase:<br />
|
|
<br />
|
|
<img width="1023" height="402" src="filterimg/image005.png" /><br />
|
|
<br />
|
|
<br />
|
|
|
|
<h3>Filter templates</h3>Templates allow defining filters based on
|
|
a condition on a column.<br />
|
|
<br />
|
|
<img width="1066" height="550" 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 "<i>null</i>" filter on it (resp. on all columns of a composite foreign key) causes only the foreign key columns of those rows to be filled with "<i>null</i>", whose parent row is not exported as well.<br>
|
|
In the same way, only the foreign key columns of those rows are set to "<i>null</i>" when deleting, which are not deleted themselves but their parent.
|
|
<br /><br />
|
|
The extraction model editor offers the corresponding checkbox "Set foreign key to null ...".
|
|
<br /><br/>
|
|
<img width="1227" height="359" 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>
|