Module ImportFrom alias ImportFrom alias Import alias Import alias TryExcept body ImportFrom alias identifier handlers ExceptHandler type NameLoad body ImportFrom alias identifier ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad body Expr Str If CompareIsNot NameLoad NameLoad body Assign NameStore BinOpMod Str TupleLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad orelse Assign NameStore BinOpMod Str TupleLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Assign NameStore Dict With Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad NameStore body Assign TupleStore NameStore NameStore TupleLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr If CompareNotEq BinOpDiv NameLoad Num Num body Expr Call AttributeLoad NameLoad attr Str NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad ListLoad Str Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad kwarg body Expr Str With Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameStore body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Return Call AttributeLoad NameLoad attr NameLoad NameLoad Str NameLoad NameLoad keyword NameLoad decorator_list decorator_list
N/A __future__ print_function __future__ unicode_literals N/A contextlib N/A os N/A N/A urllib.parse quote urlquote N/A N/A N/A ImportError N/A urllib quote urlquote ImportAPI N/A object N/A import_data N/A N/A self db table format bytes_or_stream size unique_id N/A None N/A N/A Import data into Treasure Data Service

        This method expects data from a file-like object formatted with "msgpack.gz".

        Params:
            db (str): name of a database
            table (str): name of a table
            format (str): format of data type (e.g. "msgpack.gz")
            bytes_or_stream (str or file-like): a byte string or a file-like object contains the data
            size (int): the length of the data
            unique_id (str): a unique identifier of the data

        Returns: float represents the elapsed time to import data
         N/A N/A unique_id None N/A N/A path N/A /v3/table/import_with_id/%s/%s/%s/%s N/A N/A urlquote N/A str db N/A urlquote N/A str table N/A urlquote N/A str unique_id N/A urlquote N/A str format N/A N/A path N/A /v3/table/import/%s/%s/%s N/A N/A urlquote N/A str db N/A urlquote N/A str table N/A urlquote N/A str format N/A kwargs N/A N/A N/A N/A self put path bytes_or_stream size kwargs res N/A N/A N/A code body N/A N/A res status N/A N/A res read N/A N/A N/A code 100 2 N/A N/A N/A N/A self raise_error Import failed res body N/A js N/A N/A self checked_json body N/A elapsed_time N/A time N/A float N/A js N/A elapsed_time N/A time N/A import_file N/A N/A self db table format file unique_id N/A None kwargs N/A N/A Import data into Treasure Data Service, from an existing file on filesystem.

        This method will decompress/deserialize records from given file, and then
        convert it into format acceptable from Treasure Data Service ("msgpack.gz").
        This method is a warpper function to `import_data`.

        Params:
            db (str): name of a database
            table (str): name of a table
            format (str): format of data type (e.g. "msgpack", "json")
            file (str or file-like): a name of a file, or a file-like object contains the data
            unique_id (str): a unique identifier of the data

        Returns: float represents the elapsed time to import data
         N/A N/A N/A contextlib closing N/A N/A self _prepare_file file format kwargs fp N/A N/A size N/A N/A N/A os fstat N/A N/A fp fileno st_size N/A N/A N/A self import_data db table msgpack.gz fp size unique_id unique_id N/A N/A