【问题标题】:Moving data from a database to Azure blob storage将数据从数据库移动到 Azure Blob 存储
【发布时间】:2020-07-01 01:39:56
【问题描述】:

我可以使用dask.dataframe.read_sql_table 来读取数据,例如df = dd.read_sql_table(table='TABLE', uri=uri, index_col='field', npartitions=N)

在 Azure blob 存储中将其保存为 parquet 文件的下一个(最佳)步骤是什么?

根据我的小型研究,有两种选择:

【问题讨论】:

    标签: azure dask fastparquet intake


    【解决方案1】:

    $ pip install adlfs

    dd.to_parquet(
        df=df, 
        path='absf://{BLOB}/{FILE_NAME}.parquet', 
        storage_options={'account_name': 'ACCOUNT_NAME',
                         'account_key': 'ACCOUNT_KEY'},
        )
    

    【讨论】:

    • 这行得通吗?如果是,请接受您自己的答案。
    猜你喜欢
    • 2019-11-30
    • 2017-09-22
    • 2017-12-16
    • 2015-12-17
    • 1970-01-01
    • 2018-01-11
    • 2018-08-08
    • 1970-01-01
    • 2023-01-26
    相关资源
    最近更新 更多