We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using python pandas. Version 1 i used this:
def dbpop_influx(data, dbname, measurement, columns): ## constants: dbclient = DataFrameClient(host='localhost', port=8086, username='root', password='root', database=dbname) n_import_chunks = math.ceil(len(data) / 10000) data_chunks = np.array_split(data, n_import_chunks) for d in data_chunks: dbclient.write_points(d, measurement, tag_columns = columns, protocol = 'line')
Takes 29 seconds (was looking to improve that speed with multiprocessing)
Version 2 i used this:
_client = InfluxDBClient(url="http://localhost:9999", token=token, org="org") _write_client = _client.write_api(write_options=WriteOptions(batch_size=10000, flush_interval=10_000, jitter_interval=0, retry_interval=5_000)) start = time.time() _write_client.write('data', record=imp_dat[0], data_frame_measurement_name='coinmarketcap_ohlcv', data_frame_tag_columns=['quote_asset','base_asset']) print(time.time() - start)
this takes 118 seconds...
data looks like:
@bednar
The text was updated successfully, but these errors were encountered:
Randomized data to testing: https://we.tl/t-QBtxHlvfvx
Time format:
Sorry, something went wrong.
feat: Optimize serializing Pandas DataFrame for writing #92
28b1fb7
f613fc6
6a642ed
8de8ed9
Hi @bburden,
The issue is fixed in 1.8.0 milestone.
If you would like to use a dev version then install client via:
pip install git+https://github.com/influxdata/influxdb-client-python.git@master
Regards
rolincova
Successfully merging a pull request may close this issue.
Using python pandas. Version 1 i used this:
Takes 29 seconds (was looking to improve that speed with multiprocessing)
Version 2 i used this:
this takes 118 seconds...
data looks like:
@bednar
The text was updated successfully, but these errors were encountered: