- classmethod create_from_options(options, name)source
Factory using an options dictionary.
Parametersoptions –
Dictionary of options containing: template: A Python dict-interpolation string. Required. prolog: written before the per-record output. epilog: written after the per-record output. mode: one of the following, default is ‘text’
text: text file mode, newlines between records. nonewline: text file mode, no added newlines. binary: binary file mode, no added newlines.
name – The name of this transformer, for use in error messages.
ReturnsSimpleTextConnector object described by the specified options.
RaisesInvalidConfiguration – If the config is invalid.
- finalize_export()source
Write epliog and close file after every record is written.
- initialize_export(filename, bulkload_state)source
Open file and write prolog.
- write_dict(dictionary)source
Write one record for the specified entity.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-04-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-04-04 UTC."],[[["The `SimpleTextConnector` class handles writing data in a simple text format as defined in a `bulkloader.yaml` file, specifically for export operations, not import."],["It supports three modes of operation: 'text' with newlines between records, 'nonewline' without added newlines, and 'binary' for binary file writing without added newlines."],["Configuration for `SimpleTextConnector` is done through an options dictionary that can specify the template for dict interpolation, and prolog and epilog content to be written before and after record data."],["The class provides methods for initializing the export by opening a file and writing the prolog, finalizing the export by writing the epilog and closing the file, and writing individual records from a dictionary."]]],[]]