Skip to content

constants ⚓︎

Contains constants about mappers, schemas, metadata and others

Attributes⚓︎

HEADER_RECORD_TYPE = OrderedDict({'IXFHRECL': 6, 'IXFHRECT': 1, 'IXFHID': 3, 'IXFHVERS': 4, 'IXFHPROD': 12, 'IXFHDATE': 8, 'IXFHTIME': 6, 'IXFHHCNT': 5, 'IXFHSBCP': 5, 'IXFHDBCP': 5, 'IXFHFIL1': 2}) module-attribute ⚓︎

Length in bytes of the fields in the header record.

TABLE_RECORD_TYPE = OrderedDict({'IXFTRECL': 6, 'IXFTRECT': 1, 'IXFTNAML': 3, 'IXFTNAME': 256, 'IXFTQULL': 3, 'IXFTQUAL': 256, 'IXFTSRC': 12, 'IXFTDATA': 1, 'IXFTFORM': 1, 'IXFTMFRM': 5, 'IXFTLOC': 1, 'IXFTCCNT': 5, 'IXFTFIL1': 2, 'IXFTDESC': 30, 'IXFTPKNM': 257, 'IXFTDSPC': 257, 'IXFTISPC': 257, 'IXFTLSPC': 257}) module-attribute ⚓︎

Length in bytes of the fields in the table record.

COL_DESCRIPTOR_RECORD_TYPE = OrderedDict({'IXFCRECL': 6, 'IXFCRECT': 1, 'IXFCNAML': 3, 'IXFCNAME': 256, 'IXFCNULL': 1, 'IXFCDEF': 1, 'IXFCSLCT': 1, 'IXFCKPOS': 2, 'IXFCCLAS': 1, 'IXFCTYPE': 3, 'IXFCSBCP': 5, 'IXFCDBCP': 5, 'IXFCLENG': 5, 'IXFCDRID': 3, 'IXFCPOSN': 6, 'IXFCDESC': 30, 'IXFCLOBL': 20, 'IXFCUDTL': 3, 'IXFCUDTN': 256, 'IXFCDEFL': 3, 'IXFCDEFV': 254, 'IXFCREF': 1, 'IXFCNDIM': 2}) module-attribute ⚓︎

Length in bytes of the fields in the column descriptor record.

DATA_RECORD_TYPE = OrderedDict({'IXFDRECL': 6, 'IXFDRECT': 1, 'IXFDRID': 3, 'IXFDFIL1': 4}) module-attribute ⚓︎

Length in bytes of the fields in the data record.

APPLICATION_RECORD_TYPE = OrderedDict({'IXFARECL': 6, 'IXFARECT': 1, 'IXFAPPID': 12}) module-attribute ⚓︎

Length in bytes of the fields in the application record.

IXF_DTYPES = {384: 'DATE', 388: 'TIME', 392: 'TIMESTAMP', 404: 'BLOB', 408: 'CLOB', 412: 'DBCLOB', 448: 'VARCHAR', 452: 'CHAR', 456: 'LONGVARCHAR', 464: 'VARGRAPHIC', 468: 'GRAPHIC', 472: 'LONG VARGRAPHIC', 480: 'FLOATING POINT', 484: 'DECIMAL', 492: 'BIGINT', 496: 'INTEGER', 500: 'SMALLINT', 908: 'VARBINARY', 912: 'BINARY', 916: 'BLOB_FILE', 920: 'CLOB_FILE', 924: 'DBCLOB_FILE', 996: 'DECFLOAT'} module-attribute ⚓︎

IXF data types

DB2IXF_ACCEPTED_CORRUPTION_RATE: int = int(os.getenv('DB2IXF_ACCEPTED_CORRUPTION_RATE', 1)) module-attribute ⚓︎

Accepted rate of corrupted data, attention to data loss !

MAX_SIZE_IXF_DATA_RECORD: int = 32 * 1024 module-attribute ⚓︎

See IBM Doc: Max size of the data area of a data record in ixf format is around 32 KB.

DB2IXF_BUFFER_SIZE_CLOUD_PROVIDER: int = int(os.getenv('BUFFER_SIZE_CLI_CLOUD_PROVIDER', 4 * 1024 * 1024)) module-attribute ⚓︎

Buffer size of clients of cloud providers storage services

DB2IXF_DEFAULT_BATCH_SIZE: int = int(os.getenv('DB2IXF_DEFAULT_BATCH_SIZE', int(DB2IXF_BUFFER_SIZE_CLOUD_PROVIDER / MAX_SIZE_IXF_DATA_RECORD))) module-attribute ⚓︎

Batch size (number of rows), defaults to 128

DB2IXF_RISK_FACTOR: int = int(os.getenv('DB2IXF_RISK_FACTOR', 1.9)) module-attribute ⚓︎

Risk factor of the dynamic batch size (Standard deviation of Normal dist)

DB2IXF_TIME_ZONE = os.getenv('DB2IXF_TIME_ZONE') module-attribute ⚓︎

Time zone where the db2 server is hosted or the one used when extracting the ixf file. Default None means all timestamps are considered time zone naive.