Skip to content

python3没有现成的创建指定库/表的接口 #12

@charmby

Description

@charmby

script = f"""
dataPath = "{self.db_client.db_url}"
db = database(dataPath)

        bar_columns = ["symbol", "exchange", "datetime", "interval", "volume", "turnover", "open_interest", "open_price", "high_price", "low_price", "close_price"]
        bar_type = [SYMBOL, SYMBOL, NANOTIMESTAMP, SYMBOL, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE, DOUBLE]
        bar = table(1:0, bar_columns, bar_type)

        db.createPartitionedTable(
            bar,
            "bar",
            partitionColumns=["datetime"],
            sortColumns=["symbol", "exchange", "interval", "datetime"],
            keepDuplicates=LAST)
        """
        self.db_client.execute(script)

我通过如上脚本进行执行的时候,一直报错,但是我看接口的参数我都传了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions