Files
Jailer/docs/filters.html
T

143 lines
5.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>Jailer - Filters</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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="exporting-data-Dateien/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="0" cellspacing="0">
<tbody>
<tr>
<td><img src="exporting-data-Dateien/logo.png" hspace="10"></td>
<td class="slogan" width="100%">Database&nbsp;Subsetting&nbsp;Tool</td>
<td style="text-align: right; width: 100%;">
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td><a href="http://sourceforge.net/projects/jailer/"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=197260&amp;type=1" alt="SourceForge.net Logo" style="border: 0px solid ;"></a></td>
</tr>
<tr>
<td><a href="http://www.java.net"><img src="javanet_button_90.gif" alt="java.net Member Button: 90px wide" border="0" height="25" width="90"></a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="nav1background" height="33" width="100%">&nbsp; <b><font color="#ffffff"><a href="home.htm" target="_self" class="tlink">Home</a> &nbsp;&nbsp;&nbsp; <a href="quicktour.htm" target="_self" class="tlink">Quick
Tour</a> &nbsp;&nbsp;&nbsp;<a href="exporting-data.htm" target="_self" class="tlinkA">Tutorial</a>
&nbsp;&nbsp;&nbsp;<a href="data-browsing.html" target="_self" class="tlink">Data Browser</a>
&nbsp;&nbsp;&nbsp;<a href="faq.html" target="_self" class="tlink">FAQ</a> &nbsp;&nbsp;&nbsp;<a href="api.html" target="_self" class="tlink">API</a>
&nbsp;&nbsp;&nbsp; <a href="design.htm" target="_self" class="tlink">Documentation</a>
&nbsp;&nbsp;&nbsp; <a href="http://sourceforge.net/forum/?group_id=197260" target="_self" class="tlink">Forum</a>&nbsp;&nbsp;&nbsp;
<a href="http://sourceforge.net/project/showfiles.php?group_id=197260" target="_self" class="tlink">Download</a>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;</font></b></td>
</tr>
<tr>
<td colspan="2" class="spacer" width="100%">
</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 width="100%"><br>
</td>
</tr>
</tbody>
</table>
</center>
</div>
<ul>
<li><small>Basic</small></li><ul><li><a href="exporting-data.htm" target="_self" class="llink">SQL
Export</a></li></ul>
<ul><li><a href="exporting-xml.html" target="_self" class="llink">XML
Export</a></li></ul>
<ul><li><a href="deleting-data.htm" target="_self" class="llink">Deleting
Data</a></li></ul><li><small>Advanced</small></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&nbsp;By&nbsp;Example</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>&nbsp;</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%"> <small><small>&nbsp;</small></small><br><br>
A filter assigns
a SQL expression to a table column.
<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 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 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, its 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><br>This filter 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 based on a condition on a column.
<br><br><img src="filterimg/image007.png"/>
</td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp; </p>
</td>
</tr>
<tr>
<td height="12" valign="top" width="14%"><br>
</td>
<td><br>
</td>
</tr>
</tbody>
</table>
</div>
</body></html>