mirror of
https://github.com/dimitri/pgloader.git
synced 2026-01-25 00:51:01 +01:00
The website is moving to pgloader.org and readthedocs.io is going to be integrated. Let's see what happens. The docs build fine locally with the sphinx tools and the docs/Makefile. Having separate files for the documentation should help ease the maintenance and add new topics, such as support for Common Lisp Hackers level docs, which are currently missing.
149 lines
5.8 KiB
HTML
149 lines
5.8 KiB
HTML
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
<title>Loading IXF Data — pgloader 3.4.1 documentation</title>
|
||
<link rel="stylesheet" href="../_static/alabaster.css" type="text/css" />
|
||
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
|
||
<script type="text/javascript">
|
||
var DOCUMENTATION_OPTIONS = {
|
||
URL_ROOT: '../',
|
||
VERSION: '3.4.1',
|
||
COLLAPSE_INDEX: false,
|
||
FILE_SUFFIX: '.html',
|
||
HAS_SOURCE: true,
|
||
SOURCELINK_SUFFIX: '.txt'
|
||
};
|
||
</script>
|
||
<script type="text/javascript" src="../_static/jquery.js"></script>
|
||
<script type="text/javascript" src="../_static/underscore.js"></script>
|
||
<script type="text/javascript" src="../_static/doctools.js"></script>
|
||
<link rel="index" title="Index" href="../genindex.html" />
|
||
<link rel="search" title="Search" href="../search.html" />
|
||
<link rel="next" title="Loading From an Archive" href="archive.html" />
|
||
<link rel="prev" title="Loading DBF data" href="dbf.html" />
|
||
|
||
<link rel="stylesheet" href="../_static/custom.css" type="text/css" />
|
||
|
||
|
||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
|
||
|
||
</head>
|
||
<body>
|
||
|
||
|
||
<div class="document">
|
||
<div class="documentwrapper">
|
||
<div class="bodywrapper">
|
||
<div class="body" role="main">
|
||
|
||
<div class="section" id="loading-ixf-data">
|
||
<h1>Loading IXF Data<a class="headerlink" href="#loading-ixf-data" title="Permalink to this headline">¶</a></h1>
|
||
<p>This command instructs pgloader to load data from an IBM <cite>IXF</cite> file. Here’s
|
||
an example:</p>
|
||
<div class="highlight-default"><div class="highlight"><pre><span></span>LOAD IXF
|
||
FROM data/nsitra.test1.ixf
|
||
INTO postgresql:///pgloader
|
||
TARGET TABLE nsitra.test1
|
||
WITH truncate, create table, timezone UTC
|
||
|
||
BEFORE LOAD DO
|
||
$$ create schema if not exists nsitra; $$,
|
||
$$ drop table if exists nsitra.test1; $$;
|
||
</pre></div>
|
||
</div>
|
||
<p>The <cite>ixf</cite> format command accepts the following clauses and options.</p>
|
||
<div class="section" id="ixf-source-specification-from">
|
||
<h2>IXF Source Specification: FROM<a class="headerlink" href="#ixf-source-specification-from" title="Permalink to this headline">¶</a></h2>
|
||
<p>Filename where to load the data from. This support local files, HTTP URLs
|
||
and zip files containing a single ixf file of the same name. Fetch such a
|
||
zip file from an HTTP address is of course supported.</p>
|
||
</div>
|
||
<div class="section" id="ixf-loading-options-with">
|
||
<h2>IXF Loading Options: WITH<a class="headerlink" href="#ixf-loading-options-with" title="Permalink to this headline">¶</a></h2>
|
||
<p>When loading from a <cite>IXF</cite> file, the following options are supported:</p>
|
||
<blockquote>
|
||
<div><ul>
|
||
<li><p class="first"><em>truncate</em></p>
|
||
<p>When this option is listed, pgloader issues a <cite>TRUNCATE</cite> command against
|
||
the PostgreSQL target table before reading the data file.</p>
|
||
</li>
|
||
<li><p class="first"><em>disable triggers</em></p>
|
||
<p>When this option is listed, pgloader issues an <cite>ALTER TABLE … DISABLE
|
||
TRIGGER ALL</cite> command against the PostgreSQL target table before copying
|
||
the data, then the command <cite>ALTER TABLE … ENABLE TRIGGER ALL</cite> once the
|
||
<cite>COPY</cite> is done.</p>
|
||
<p>This option allows loading data into a pre-existing table ignoring the
|
||
<em>foreign key constraints</em> and user defined triggers and may result in
|
||
invalid <em>foreign key constraints</em> once the data is loaded. Use with
|
||
care.</p>
|
||
</li>
|
||
<li><p class="first"><em>create table</em></p>
|
||
<p>When this option is listed, pgloader creates the table using the meta
|
||
data found in the <cite>DBF</cite> file, which must contain a list of fields with
|
||
their data type. A standard data type conversion from DBF to PostgreSQL
|
||
is done.</p>
|
||
</li>
|
||
<li><p class="first"><em>table name</em></p>
|
||
<p>This options expects as its value the possibly qualified name of the
|
||
table to create.</p>
|
||
</li>
|
||
<li><p class="first"><em>timezone</em></p>
|
||
<p>This options allows to specify which timezone is used when parsing
|
||
timestamps from an IXF file, and defaults to <em>UTC</em>. Expected values are
|
||
either <cite>UTC</cite>, <cite>GMT</cite> or a single quoted location name such as
|
||
<cite>‘Universal’</cite> or <cite>‘Europe/Paris’</cite>.</p>
|
||
</li>
|
||
</ul>
|
||
</div></blockquote>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||
<div class="sphinxsidebarwrapper"><div class="relations">
|
||
<h3>Related Topics</h3>
|
||
<ul>
|
||
<li><a href="../index.html">Documentation overview</a><ul>
|
||
<li>Previous: <a href="dbf.html" title="previous chapter">Loading DBF data</a></li>
|
||
<li>Next: <a href="archive.html" title="next chapter">Loading From an Archive</a></li>
|
||
</ul></li>
|
||
</ul>
|
||
</div>
|
||
<div id="searchbox" style="display: none" role="search">
|
||
<h3>Quick search</h3>
|
||
<form class="search" action="../search.html" method="get">
|
||
<div><input type="text" name="q" /></div>
|
||
<div><input type="submit" value="Go" /></div>
|
||
<input type="hidden" name="check_keywords" value="yes" />
|
||
<input type="hidden" name="area" value="default" />
|
||
</form>
|
||
</div>
|
||
<script type="text/javascript">$('#searchbox').show(0);</script>
|
||
</div>
|
||
</div>
|
||
<div class="clearer"></div>
|
||
</div>
|
||
<div class="footer">
|
||
©2017, Dimitri Fontaine.
|
||
|
||
|
|
||
Powered by <a href="http://sphinx-doc.org/">Sphinx 1.6.5</a>
|
||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.10</a>
|
||
|
||
|
|
||
<a href="../_sources/ref/ixf.rst.txt"
|
||
rel="nofollow">Page source</a>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
</body>
|
||
</html> |