doc/api/dataimport.rst
author Laurent Peuch <cortex@worlddomination.be>
Thu, 16 May 2019 04:42:59 +0200
changeset 12614 8ac9ac8d9143
parent 10495 5bd914ebf3ae
child 12814 75e0377ed3c2
permissions -rw-r--r--
[mod] make ViolatedConstraint actually display useful information Move from: (Pdb++) raise some_exception *** ViolatedConstraint: To: (Pdb++) raise some_exception *** ViolatedConstraint: constraint 'cstr56c2ab4b3154f21d08b067742ce5bd9d' is being violated by the query 'ALTER TABLE cw_Bibliography ADD CONSTRAINT cstr56c2ab4b3154f21d08b067742ce5bd9d CHECK(cw_item_type IN ('journalArticle', 'note', 'book', 'thesis', 'film', 'web page', 'manuscrit', 'tapuscrit'))'. You can run the inverted constraint on the database to list the problematic rows. And save hours of debugging to actually understand what is going on.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10494
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     1
.. _dataimport_module:
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     2
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     3
:mod:`cubicweb.dataimport`
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     4
==========================
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     5
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     6
.. automodule:: cubicweb.dataimport
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     7
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     8
    Utilities
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
     9
    ---------
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    10
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    11
    .. autofunction:: count_lines
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    12
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    13
    .. autofunction:: ucsvreader_pb
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    14
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    15
    .. autofunction:: ucsvreader
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    16
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    17
    .. autofunction:: callfunc_every
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    18
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    19
    .. autofunction:: lazytable
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    20
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    21
    .. autofunction:: lazydbtable
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    22
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    23
    .. autofunction:: mk_entity
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    24
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    25
    Sanitizing/coercing functions
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    26
    -----------------------------
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    27
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    28
    .. autofunction:: optional
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    29
    .. autofunction:: required
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    30
    .. autofunction:: todatetime
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    31
    .. autofunction:: call_transform_method
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    32
    .. autofunction:: call_check_method
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    33
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    34
    Integrity functions
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    35
    -------------------
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    36
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    37
    .. autofunction:: check_doubles
10495
5bd914ebf3ae [doc] fix warnings/errors in doc build
Julien Cristau <julien.cristau@logilab.fr>
parents: 10494
diff changeset
    38
    .. autofunction:: check_doubles_not_none
10494
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    39
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    40
    Object Stores
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    41
    -------------
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    42
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    43
    .. autoclass:: ObjectStore
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    44
        :members:
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    45
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    46
    .. autoclass:: RQLObjectStore
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    47
        :show-inheritance:
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    48
        :members:
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    49
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    50
    .. autoclass:: NoHookRQLObjectStore
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    51
        :show-inheritance:
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    52
        :members:
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    53
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    54
    .. autoclass:: SQLGenObjectStore
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    55
        :show-inheritance:
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    56
        :members:
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    57
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    58
    Import Controller
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    59
    -----------------
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    60
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    61
    .. autoclass:: CWImportController
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    62
        :show-inheritance:
b6f00889355c [doc] Start documenting the API
Christophe de Vienne <christophe@unlish.com>
parents:
diff changeset
    63
        :members: