2022-07-11T02:04:30,194 Created temporary directory: /tmp/pip-ephem-wheel-cache-e0gifqdw 2022-07-11T02:04:30,200 Created temporary directory: /tmp/pip-build-tracker-qd4ov5yh 2022-07-11T02:04:30,201 Initialized build tracking at /tmp/pip-build-tracker-qd4ov5yh 2022-07-11T02:04:30,201 Created build tracker: /tmp/pip-build-tracker-qd4ov5yh 2022-07-11T02:04:30,201 Entered build tracker: /tmp/pip-build-tracker-qd4ov5yh 2022-07-11T02:04:30,203 Created temporary directory: /tmp/pip-wheel-gloextgq 2022-07-11T02:04:30,275 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2022-07-11T02:04:30,284 2 location(s) to search for versions of apache-iotdb: 2022-07-11T02:04:30,284 * https://pypi.org/simple/apache-iotdb/ 2022-07-11T02:04:30,284 * https://www.piwheels.org/simple/apache-iotdb/ 2022-07-11T02:04:30,285 Fetching project page and analyzing links: https://pypi.org/simple/apache-iotdb/ 2022-07-11T02:04:30,286 Getting page https://pypi.org/simple/apache-iotdb/ 2022-07-11T02:04:30,289 Found index url https://pypi.org/simple 2022-07-11T02:04:30,501 Found link https://files.pythonhosted.org/packages/76/14/d01b6281df00530c69bc8eae2074b9970bbe865a5e971b5cd2019e8b8250/apache-iotdb-0.9.0.tar.gz#sha256=0f7f2ea82b2bdfd974c1757dd2b93ae96754bf5aeb56c895f08f7302e76977ad (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.9.0 2022-07-11T02:04:30,502 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/84/aa/fa9401ccadb89ddce7c2b8a03baee9dbb9913c52b5936d0ec7968cabf056/apache_iotdb-0.9.0-py3-none-any.whl#sha256=1feb6b731a9af26aac7a1e6fab74e85dd960562a1dca6e4c5c9d10234a570e82 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,504 Found link https://files.pythonhosted.org/packages/01/fa/e65db378e4d8e07322ec175f37568bceb55ebb3c8397fa7b48e9f087c451/apache-iotdb-0.9.2.tar.gz#sha256=e898a8c1a62493c0c7547f89fe15d39ccb76fc4a6468dbc0f5406e2229c5233d (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.9.2 2022-07-11T02:04:30,504 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/43/8d/72fa03325e9281b613a0eabae9cc7c606ce0e8952bee0c3ca855e4579a1d/apache_iotdb-0.9.2-py3-none-any.whl#sha256=29c5ad15a61ef6200bb3cff15abed66acf87abbbdedab496978a4ee8f731f82c (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,506 Found link https://files.pythonhosted.org/packages/34/95/030c2da665358de8ba950099b3b0397dca437fcde60d5d1730d0c451d5e3/apache-iotdb-0.9.3.tar.gz#sha256=5c17a131cc2485c1788a2d8a29ee850dabd9b16ada3f13996c8a07e11ae23df4 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.9.3 2022-07-11T02:04:30,506 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/5c/d4/2e329baab32ad93730ba4b79df9b91f1d55d0d37428a5dbbe2dd4c9f3a9d/apache_iotdb-0.9.3-py3-none-any.whl#sha256=4a589b5bbbdb8fdc9d1c91320a9a3480e41768cb590d82ab317dc62f57302d6c (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,508 Found link https://files.pythonhosted.org/packages/1d/dc/138e08717f8c2e0e238f35d39b34af6cfc1c7a1332b6aa4689750f4fda26/apache-iotdb-0.10.0.tar.gz#sha256=0c95e2ec5bc4e3338a83898a329ec9609681efbee26b000350d4ac08d564b91e (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.10.0 2022-07-11T02:04:30,508 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/c3/76/46884f04945b6f02bbec4e06d83fafc16f326ca0f9b35b8c0141018990c0/apache_iotdb-0.10.0-py3-none-any.whl#sha256=1607a07d9546fbd1e1239c5faed9a85a3a021e7ad3a389df3eeedcb95708c641 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,510 Found link https://files.pythonhosted.org/packages/f6/4d/b229b9f309431e8164c9cd893431009a57efcaa059f58c1091d222601da3/apache-iotdb-0.10.1.tar.gz#sha256=b3f1651a6b290220222d0eaf66955396e9c3ce17d01be6cd698d31e0e5feb51e (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.10.1 2022-07-11T02:04:30,511 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/d6/87/2e003dcf87ffa8e73f48a62a107b989967e906670d905a05ae1c1349f396/apache_iotdb-0.10.1-py3-none-any.whl#sha256=b4b13fa0d6ed86fbcc1231cad3d220ee81b38452e87fea655641720f803d4c1d (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,512 Found link https://files.pythonhosted.org/packages/16/8b/2ec65fa81d5961bd927c02d6a209490bf325b2a164506cd3b12e846d7061/apache-iotdb-0.11.0.tar.gz#sha256=a89a080bd084ab35e87c08660a1ce604c1857e3ffcf702d39540fb35366eabd8 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.0 2022-07-11T02:04:30,513 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/47/c8/047703f7e8125b15361c766b90c6f1cbdbf797f84803f38b1732c1a386cb/apache_iotdb-0.11.0-py3-none-any.whl#sha256=4771e87dd8d933815206c063014beff8eff4c8025353723ac67603f49a119224 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,514 Found link https://files.pythonhosted.org/packages/55/a1/ef100f67e0f26fbc1d19b84115b21de942e7b7e01803706d19f841ac06c1/apache-iotdb-0.11.1.tar.gz#sha256=d80bc159ae19e04d11f0a671061a19f640f95415d9c5f3c4073dd0645c365c44 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.1 2022-07-11T02:04:30,515 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/9f/9f/dce2d782c8b64700539039ef5d66f5f7a781689538c0a176cf56099ec9d1/apache_iotdb-0.11.1-py3-none-any.whl#sha256=317a24e4870d587820f8d5be294e2e9a6ad09f70566ce4380506085c47b2fc0a (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,516 Found link https://files.pythonhosted.org/packages/69/d5/f1b9ff293fe02eb1f1cb3cba13b5d9a4b547415ab0045b2a8a3612249e12/apache-iotdb-0.11.2.tar.gz#sha256=d6bf2cf44bf4f7a3c8093da17688ae28c2f2c24eafce6f2f062a01ebc68beae9 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.2 2022-07-11T02:04:30,517 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/2b/96/a5f0c63659cc8477c53d8a8321c07ea5a0bb2430abaaab477a6185bb43a1/apache_iotdb-0.11.2-py3-none-any.whl#sha256=762d5b0c5f82869237d5375d2a8774f99654c3b693d6f77bf6e9decc78b7fd5d (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,518 Found link https://files.pythonhosted.org/packages/7d/cf/0d672a828527f59cdc66c078b0b8e356ca0a3191224a4363ce2256337d1c/apache-iotdb-0.11.3.tar.gz#sha256=db3b395fd7c61e4d42a4d8dea8455f846055ca03eb67ed256d655eab20ce0369 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.3 2022-07-11T02:04:30,519 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/d2/c7/6709b26341e59788d05a297182aa3f96c692e85421c169f657e92c3b4765/apache_iotdb-0.11.3-py3-none-any.whl#sha256=55e9a0042694ba7fa482f733a1d548c0180bccf0e35e090b85d7b9050c95162b (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,520 Found link https://files.pythonhosted.org/packages/00/a1/5b1b8a2754f4b25420d9a4461b5e2b8573bb89b43054f9303ea0558df0de/apache-iotdb-0.11.4.tar.gz#sha256=83190c258ec5befef3d4efe23825b37855825de6f84ec5b759dd53bf614ae2ff (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.11.4 2022-07-11T02:04:30,521 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/48/f4/a21fd4495f93c428de788a477665f1815b257568469c38108666125fff4b/apache_iotdb-0.11.4-py3-none-any.whl#sha256=cf1ee85db62d31642b32742aba0a026a941b85cf4bb49ec48ef09b9e241f3bf5 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,522 Found link https://files.pythonhosted.org/packages/9e/16/bb2ef45f62e9866f1be97f04e2c581247d3b145e5d8a01b7c143023c6c45/apache-iotdb-0.12.0.tar.gz#sha256=b86ddbcf62a17f7ffdc924933f052d1d1c09b25cb0160d0ab1d0fecf8007b902 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.0 2022-07-11T02:04:30,523 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/93/32/e051c3ce387e54b1f036995e92ff352895cf01a51b170752e906a7d42364/apache_iotdb-0.12.0-py3-none-any.whl#sha256=061d9407266b9d100113fa2d11890a8d5d56f8b496305c5864f08a9af35fcc12 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,524 Found link https://files.pythonhosted.org/packages/20/0c/b39e9f362fb0a1a43cb0a05a5b2d9163815f0048575e0c071bbaa50070b8/apache-iotdb-0.12.1.tar.gz#sha256=2ff51551184706b690c91b2f24e4e10694ae486d46b1674b79e58ef2410b9f61 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.1 2022-07-11T02:04:30,525 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/55/cf/219a0c3cd17537cebf6e67deeaa77b57741c9b40bcddbb7f59ac9b828401/apache_iotdb-0.12.1-py3-none-any.whl#sha256=bc5ddc6b683bf26a0b9a8c47ada13d29918503664e9e1c3fdefae73121f3a327 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,526 Found link https://files.pythonhosted.org/packages/fd/64/d83ceaaab941dd78df38cd8c35d27028a27724c2535f0e6f01a48472aa28/apache-iotdb-0.12.2.tar.gz#sha256=530b328959f7b20d09f73682d68ecde5d6d58d1048b7d10f6a3846ed6ccef954 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.2 2022-07-11T02:04:30,527 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/0b/33/60af46cbc25d7ecf9722bf311295cb0acbf2841f6eb3e3af7433ac3e199d/apache_iotdb-0.12.2-py3-none-any.whl#sha256=4a8cbbf791710bbe1bd83f55b5a6209fed0c28bf1d297dc50df44b9b1662c5a0 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,528 Found link https://files.pythonhosted.org/packages/24/7c/81a9dcfd218d4654b03d9079578659d6201aa4f9e9ccba328c0742e8e9c1/apache-iotdb-0.12.3.tar.gz#sha256=5b73fcce1c33070e14f00d4708129320dbfcd7bd8b80fb82cd74a267457b81e0 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.3 2022-07-11T02:04:30,529 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/9f/ae/e79cef98fa20cf977ea22b065fcff8d7b976922dd281f4a74a02b1a72b41/apache_iotdb-0.12.3-py3-none-any.whl#sha256=724ff3ecb4762801cbc977ea4257586757943356bfa16fbfb4cc45ddcea06897 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,530 Found link https://files.pythonhosted.org/packages/9e/11/0d12f9b906b3aac1446c09e297bcdf3a0cdfb016aae1ec77effa214999de/apache-iotdb-0.12.4.tar.gz#sha256=01b1370a1816e5934dc6fd34606b9dfe63817c94d626069aff9102e6e6b77751 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.4 2022-07-11T02:04:30,531 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/2b/cb/34f5d9137086d912e4518d751eca1ac9a8b908706c4b3176ca32911fabd2/apache_iotdb-0.12.4-py3-none-any.whl#sha256=b5aa061943bf32b9d289ffcf15e5bad8abc8ef8ee7413e035014ec27b81ad11f (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,532 Found link https://files.pythonhosted.org/packages/8a/52/93503eac47c1561edc21431f7154b694afad9d461e2af0fea36966953c24/apache-iotdb-0.12.5.tar.gz#sha256=38eb0acb7f8f66f2c40dbeeb0bcaac9914442c02d2b2b40f621080ad8532af48 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.12.5 2022-07-11T02:04:30,533 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/7a/30/1cd9bca76c1f4f9b4cd48d11f23103ade9c5a35410bbf0a8f5997bab51b0/apache_iotdb-0.12.5-py3-none-any.whl#sha256=3255a9b173ef106ff04aa683d2dc59f2c5109c0e197dc39a0d3abcc517c27393 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,534 Found link https://files.pythonhosted.org/packages/a6/cd/33de301e51132f8d0d79adc346d38685a6b871251846bad95b35ebf74ac9/apache-iotdb-0.13.0.tar.gz#sha256=42f0f028d609cd06eef653683cfecc25436d8538d40b2b49b724be921a5fe910 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.0 2022-07-11T02:04:30,535 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/71/c1/3684d3b6e6eddda5fbe994e123c6bc6569409994a44b5d3e4b130554802a/apache_iotdb-0.13.0-py3-none-any.whl#sha256=1d1ed3469afbe39ab6159f5e7965579d315828c675480dc620ec6d2bb1687e3b (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,536 Found link https://files.pythonhosted.org/packages/7e/3e/40f0d900e04598036cc65ae437a2ee9f4aa149860d434a6f4b291460582c/apache-iotdb-0.13.0.post1.tar.gz#sha256=1f971f4ef6525a5971794967ba5e9a5ee4858237d17493c0de889cb14f9f76e3 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.13.0.post1 2022-07-11T02:04:30,537 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/7c/f2/ef6f589910f1b850ad665d4958e2a26b5249bddc81d5f29a711e21a79dc1/apache_iotdb-0.13.0.post1-py3-none-any.whl#sha256=0b6f35e13caaaf2ebd7f3edd24dfe3f5802cc95c4015a3a68e1e6c686c16d4ef (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,538 Found link https://files.pythonhosted.org/packages/bb/7d/24cefdcd57e96d496fd3492fc28b3d53da6ba0fc6ee69f99dddec1cf500c/apache-iotdb-0.14.0rc1.tar.gz#sha256=c769d5fa5ff2ad1c9a0db2a72edead9f6e6c3f6389b7e91eb82508462a8f95a1 (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7), version: 0.14.0rc1 2022-07-11T02:04:30,539 Skipping link: No binaries permitted for apache-iotdb: https://files.pythonhosted.org/packages/6d/37/0e5a292ed1a695927cefec20d4ad01d3c7af78e691d5250f1646f318d4ef/apache_iotdb-0.14.0rc1-py3-none-any.whl#sha256=d12bc8fef329bcb5588881ce837bfd71e533177f7b47fcaa69ec66577e7252df (from https://pypi.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,540 Fetching project page and analyzing links: https://www.piwheels.org/simple/apache-iotdb/ 2022-07-11T02:04:30,541 Getting page https://www.piwheels.org/simple/apache-iotdb/ 2022-07-11T02:04:30,543 Found index url https://www.piwheels.org/simple 2022-07-11T02:04:30,776 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.0.post1-py3-none-any.whl#sha256=d53cf02df2cc507d9caf48167c52d69e24abab9800430de3ff8abf8159bff63b (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,777 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.13.0-py3-none-any.whl#sha256=67b7429e60cdd5e1e3a808592a87a591c028af62de8e2fec2535b4a3105f21b7 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,777 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.5-py3-none-any.whl#sha256=06bb080be5b0469037e68db56a7feb10da911a396a47d598598d8d8c50d07419 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,778 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.4-py3-none-any.whl#sha256=af5fa8000dd449fb6d98420287b2049b5e68d268fa1529fa96955b5fe7637c13 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,778 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.3-py3-none-any.whl#sha256=eb77b047b61a087b286e01afea6ee9761c9e687479a4e551be085d82612ed220 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,779 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.2-py3-none-any.whl#sha256=bb7605db211272947ba451cdad35a2b4f554167361f0c08acedbfb0723ac7ab8 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,780 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.1-py3-none-any.whl#sha256=bc5ddc6b683bf26a0b9a8c47ada13d29918503664e9e1c3fdefae73121f3a327 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,780 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.12.0-py3-none-any.whl#sha256=061d9407266b9d100113fa2d11890a8d5d56f8b496305c5864f08a9af35fcc12 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,781 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.4-py3-none-any.whl#sha256=cf1ee85db62d31642b32742aba0a026a941b85cf4bb49ec48ef09b9e241f3bf5 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,781 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.3-py3-none-any.whl#sha256=55e9a0042694ba7fa482f733a1d548c0180bccf0e35e090b85d7b9050c95162b (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,782 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.2-py3-none-any.whl#sha256=762d5b0c5f82869237d5375d2a8774f99654c3b693d6f77bf6e9decc78b7fd5d (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,782 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.1-py3-none-any.whl#sha256=317a24e4870d587820f8d5be294e2e9a6ad09f70566ce4380506085c47b2fc0a (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,783 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.11.0-py3-none-any.whl#sha256=4771e87dd8d933815206c063014beff8eff4c8025353723ac67603f49a119224 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,783 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.10.1-py3-none-any.whl#sha256=b4b13fa0d6ed86fbcc1231cad3d220ee81b38452e87fea655641720f803d4c1d (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,784 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.10.0-py3-none-any.whl#sha256=388ade65f63cb37eef343e4f294cf3488b79894ff8061a7d9b2bf42277ded9de (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,785 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.9.3-py3-none-any.whl#sha256=b535b53a5182dc94116e67edb4a34c1efb007574273e2ff4ad72ebc3b4634326 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,785 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.9.2-py3-none-any.whl#sha256=b7fad95c7f041f18a621439aa3cd19fc79d76caa85a93967163566c10b7c6348 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,786 Skipping link: No binaries permitted for apache-iotdb: https://www.piwheels.org/simple/apache-iotdb/apache_iotdb-0.9.0-py3-none-any.whl#sha256=1feb6b731a9af26aac7a1e6fab74e85dd960562a1dca6e4c5c9d10234a570e82 (from https://www.piwheels.org/simple/apache-iotdb/) (requires-python:>=3.7) 2022-07-11T02:04:30,786 Skipping link: not a file: https://www.piwheels.org/simple/apache-iotdb/ 2022-07-11T02:04:30,787 Skipping link: not a file: https://pypi.org/simple/apache-iotdb/ 2022-07-11T02:04:30,828 Given no hashes to check 1 links for project 'apache-iotdb': discarding no candidates 2022-07-11T02:04:30,860 Collecting apache-iotdb==0.14.0rc1 2022-07-11T02:04:30,864 Created temporary directory: /tmp/pip-unpack-hrxgz6lj 2022-07-11T02:04:31,405 Downloading apache-iotdb-0.14.0rc1.tar.gz (77 kB) 2022-07-11T02:04:31,822 Added apache-iotdb==0.14.0rc1 from https://files.pythonhosted.org/packages/bb/7d/24cefdcd57e96d496fd3492fc28b3d53da6ba0fc6ee69f99dddec1cf500c/apache-iotdb-0.14.0rc1.tar.gz#sha256=c769d5fa5ff2ad1c9a0db2a72edead9f6e6c3f6389b7e91eb82508462a8f95a1 to build tracker '/tmp/pip-build-tracker-qd4ov5yh' 2022-07-11T02:04:31,832 Created temporary directory: /tmp/pip-build-env-n48gz8ha 2022-07-11T02:04:31,845 Created temporary directory: /tmp/pip-standalone-pip-0ifsukvm 2022-07-11T02:04:34,225 Installing build dependencies: started 2022-07-11T02:04:34,227 Running command pip subprocess to install build dependencies 2022-07-11T02:04:43,820 Using pip 22.1.2 from /tmp/pip-standalone-pip-0ifsukvm/__env_pip__.zip/pip (python 3.7) 2022-07-11T02:04:45,546 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2022-07-11T02:04:49,601 Collecting setuptools>=40.8.0 2022-07-11T02:04:49,881 Using cached https://www.piwheels.org/simple/setuptools/setuptools-63.1.0-py3-none-any.whl (1.2 MB) 2022-07-11T02:04:50,621 Collecting wheel 2022-07-11T02:04:50,656 Using cached https://www.piwheels.org/simple/wheel/wheel-0.37.1-py2.py3-none-any.whl (35 kB) 2022-07-11T02:04:59,469 Installing collected packages: wheel, setuptools 2022-07-11T02:04:59,742 Creating /tmp/pip-build-env-n48gz8ha/overlay/bin 2022-07-11T02:04:59,746 changing mode of /tmp/pip-build-env-n48gz8ha/overlay/bin/wheel to 755 2022-07-11T02:05:04,594 Successfully installed setuptools-63.1.0 wheel-0.37.1 2022-07-11T02:05:05,261 Installing build dependencies: finished with status 'done' 2022-07-11T02:05:05,287 Getting requirements to build wheel: started 2022-07-11T02:05:05,289 Running command Getting requirements to build wheel 2022-07-11T02:05:07,175 2022-07-11T02:05:07,183 # Apache IoTDB 2022-07-11T02:05:07,184 [![Main Mac and Linux](https://github.com/apache/iotdb/actions/workflows/main-unix.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-unix.yml) 2022-07-11T02:05:07,184 [![Main Win](https://github.com/apache/iotdb/actions/workflows/main-win.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-win.yml) 2022-07-11T02:05:07,184 [![coveralls](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master) 2022-07-11T02:05:07,185 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2022-07-11T02:05:07,185 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2022-07-11T02:05:07,185 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2022-07-11T02:05:07,186 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2022-07-11T02:05:07,186 ![](https://img.shields.io/badge/platform-win10%20%7C%20macox%20%7C%20linux-yellow.svg) 2022-07-11T02:05:07,186 ![](https://img.shields.io/badge/java--language-1.8-blue.svg) 2022-07-11T02:05:07,187 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2022-07-11T02:05:07,188 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2022-07-11T02:05:07,188 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2022-07-11T02:05:07,188 architecture, high performance and rich feature set together with its deep integration with 2022-07-11T02:05:07,189 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2022-07-11T02:05:07,189 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2022-07-11T02:05:07,190 ## Python Native API 2022-07-11T02:05:07,190 ### Requirements 2022-07-11T02:05:07,191 You have to install thrift (>=0.13) before using the package. 2022-07-11T02:05:07,192 ### How to use (Example) 2022-07-11T02:05:07,193 First, download the latest package: `pip3 install apache-iotdb` 2022-07-11T02:05:07,193 *Notice: If you are installing Python API v0.13.0, DO NOT install by `pip install apache-iotdb==0.13.0`, use `pip install apache-iotdb==0.13.0.post1` instead!* 2022-07-11T02:05:07,194 You can get an example of using the package to read and write data at here: [Example](https://github.com/apache/iotdb/blob/master/client-py/SessionExample.py) 2022-07-11T02:05:07,195 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2022-07-11T02:05:07,195 (you need to add `import iotdb` in the head of the file) 2022-07-11T02:05:07,196 Or: 2022-07-11T02:05:07,196 ```python 2022-07-11T02:05:07,197 from iotdb.Session import Session 2022-07-11T02:05:07,197 ip = "127.0.0.1" 2022-07-11T02:05:07,198 port_ = "6667" 2022-07-11T02:05:07,198 username_ = "root" 2022-07-11T02:05:07,198 password_ = "root" 2022-07-11T02:05:07,199 session = Session(ip, port_, username_, password_) 2022-07-11T02:05:07,199 session.open(False) 2022-07-11T02:05:07,199 zone = session.get_time_zone() 2022-07-11T02:05:07,200 session.close() 2022-07-11T02:05:07,200 ``` 2022-07-11T02:05:07,200 ### Initialization 2022-07-11T02:05:07,201 * Initialize a Session 2022-07-11T02:05:07,202 ```python 2022-07-11T02:05:07,202 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2022-07-11T02:05:07,202 ``` 2022-07-11T02:05:07,203 * Open a session, with a parameter to specify whether to enable RPC compression 2022-07-11T02:05:07,204 ```python 2022-07-11T02:05:07,204 session.open(enable_rpc_compression=False) 2022-07-11T02:05:07,204 ``` 2022-07-11T02:05:07,205 Notice: this RPC compression status of client must comply with that of IoTDB server 2022-07-11T02:05:07,205 * Close a Session 2022-07-11T02:05:07,206 ```python 2022-07-11T02:05:07,206 session.close() 2022-07-11T02:05:07,207 ``` 2022-07-11T02:05:07,207 ### Data Definition Interface (DDL Interface) 2022-07-11T02:05:07,208 #### Storage Group Management 2022-07-11T02:05:07,208 * Set storage group 2022-07-11T02:05:07,209 ```python 2022-07-11T02:05:07,209 session.set_storage_group(group_name) 2022-07-11T02:05:07,210 ``` 2022-07-11T02:05:07,210 * Delete one or several storage groups 2022-07-11T02:05:07,211 ```python 2022-07-11T02:05:07,211 session.delete_storage_group(group_name) 2022-07-11T02:05:07,212 session.delete_storage_groups(group_name_lst) 2022-07-11T02:05:07,212 ``` 2022-07-11T02:05:07,212 #### Timeseries Management 2022-07-11T02:05:07,213 * Create one or multiple timeseries 2022-07-11T02:05:07,214 ```python 2022-07-11T02:05:07,214 session.create_time_series(ts_path, data_type, encoding, compressor, 2022-07-11T02:05:07,214 props=None, tags=None, attributes=None, alias=None) 2022-07-11T02:05:07,215 session.create_multi_time_series( 2022-07-11T02:05:07,215 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2022-07-11T02:05:07,215 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2022-07-11T02:05:07,216 ) 2022-07-11T02:05:07,216 ``` 2022-07-11T02:05:07,216 * Create aligned timeseries 2022-07-11T02:05:07,217 ```python 2022-07-11T02:05:07,217 session.create_aligned_time_series( 2022-07-11T02:05:07,218 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2022-07-11T02:05:07,218 ) 2022-07-11T02:05:07,218 ``` 2022-07-11T02:05:07,219 Attention: Alias of measurements are **not supported** currently. 2022-07-11T02:05:07,219 * Delete one or several timeseries 2022-07-11T02:05:07,220 ```python 2022-07-11T02:05:07,220 session.delete_time_series(paths_list) 2022-07-11T02:05:07,220 ``` 2022-07-11T02:05:07,221 * Check whether the specific timeseries exists 2022-07-11T02:05:07,222 ```python 2022-07-11T02:05:07,222 session.check_time_series_exists(path) 2022-07-11T02:05:07,222 ``` 2022-07-11T02:05:07,223 ### Data Manipulation Interface (DML Interface) 2022-07-11T02:05:07,223 #### Insert 2022-07-11T02:05:07,224 It is recommended to use insertTablet to help improve write efficiency. 2022-07-11T02:05:07,225 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2022-07-11T02:05:07,225 * **Better Write Performance** 2022-07-11T02:05:07,225 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2022-07-11T02:05:07,226 We have two implementations of Tablet in Python API. 2022-07-11T02:05:07,227 * Normal Tablet 2022-07-11T02:05:07,228 ```python 2022-07-11T02:05:07,228 values_ = [ 2022-07-11T02:05:07,228 [False, 10, 11, 1.1, 10011.1, "test01"], 2022-07-11T02:05:07,228 [True, 100, 11111, 1.25, 101.0, "test02"], 2022-07-11T02:05:07,229 [False, 100, 1, 188.1, 688.25, "test03"], 2022-07-11T02:05:07,229 [True, 0, 0, 0, 6.25, "test04"], 2022-07-11T02:05:07,229 ] 2022-07-11T02:05:07,230 timestamps_ = [1, 2, 3, 4] 2022-07-11T02:05:07,230 tablet_ = Tablet( 2022-07-11T02:05:07,230 device_id, measurements_, data_types_, values_, timestamps_ 2022-07-11T02:05:07,231 ) 2022-07-11T02:05:07,231 session.insert_tablet(tablet_) 2022-07-11T02:05:07,231 ``` 2022-07-11T02:05:07,232 * Numpy Tablet 2022-07-11T02:05:07,232 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2022-07-11T02:05:07,233 With less memory footprint and time cost of serialization, the insert performance will be better. 2022-07-11T02:05:07,233 **Notice** 2022-07-11T02:05:07,234 1. time and value columns in Tablet are ndarray. 2022-07-11T02:05:07,234 2. recommended to use the specific dtypes to each ndarray, see the example below 2022-07-11T02:05:07,234 (if not, the default dtypes are also ok). 2022-07-11T02:05:07,235 ```python 2022-07-11T02:05:07,235 data_types_ = [ 2022-07-11T02:05:07,235 TSDataType.BOOLEAN, 2022-07-11T02:05:07,236 TSDataType.INT32, 2022-07-11T02:05:07,236 TSDataType.INT64, 2022-07-11T02:05:07,236 TSDataType.FLOAT, 2022-07-11T02:05:07,237 TSDataType.DOUBLE, 2022-07-11T02:05:07,237 TSDataType.TEXT, 2022-07-11T02:05:07,237 ] 2022-07-11T02:05:07,237 np_values_ = [ 2022-07-11T02:05:07,238 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2022-07-11T02:05:07,238 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2022-07-11T02:05:07,238 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2022-07-11T02:05:07,239 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2022-07-11T02:05:07,239 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2022-07-11T02:05:07,239 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2022-07-11T02:05:07,240 ] 2022-07-11T02:05:07,240 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2022-07-11T02:05:07,240 np_tablet_ = NumpyTablet( 2022-07-11T02:05:07,241 "root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_ 2022-07-11T02:05:07,241 ) 2022-07-11T02:05:07,241 session.insert_tablet(np_tablet_) 2022-07-11T02:05:07,242 ``` 2022-07-11T02:05:07,242 * Insert multiple Tablets 2022-07-11T02:05:07,243 ```python 2022-07-11T02:05:07,243 session.insert_tablets(tablet_lst) 2022-07-11T02:05:07,243 ``` 2022-07-11T02:05:07,244 * Insert a Record 2022-07-11T02:05:07,245 ```python 2022-07-11T02:05:07,245 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2022-07-11T02:05:07,245 ``` 2022-07-11T02:05:07,246 * Insert multiple Records 2022-07-11T02:05:07,246 ```python 2022-07-11T02:05:07,247 session.insert_records( 2022-07-11T02:05:07,247 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2022-07-11T02:05:07,247 ) 2022-07-11T02:05:07,247 ``` 2022-07-11T02:05:07,248 * Insert multiple Records that belong to the same device. 2022-07-11T02:05:07,248 With type info the server has no need to do type inference, which leads a better performance 2022-07-11T02:05:07,249 ```python 2022-07-11T02:05:07,250 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2022-07-11T02:05:07,250 ``` 2022-07-11T02:05:07,251 #### Insert with type inference 2022-07-11T02:05:07,251 When the data is of String type, we can use the following interface to perform type inference based on the value of the value itself. For example, if value is "true" , it can be automatically inferred to be a boolean type. If value is "3.2" , it can be automatically inferred as a flout type. Without type information, server has to do type inference, which may cost some time. 2022-07-11T02:05:07,252 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2022-07-11T02:05:07,252 ```python 2022-07-11T02:05:07,253 session.insert_str_record(device_id, timestamp, measurements, string_values) 2022-07-11T02:05:07,253 ``` 2022-07-11T02:05:07,254 #### Insert of Aligned Timeseries 2022-07-11T02:05:07,254 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2022-07-11T02:05:07,255 * insert_aligned_record 2022-07-11T02:05:07,255 * insert_aligned_records 2022-07-11T02:05:07,256 * insert_aligned_records_of_one_device 2022-07-11T02:05:07,256 * insert_aligned_tablet 2022-07-11T02:05:07,256 * insert_aligned_tablets 2022-07-11T02:05:07,257 ### IoTDB-SQL Interface 2022-07-11T02:05:07,258 * Execute query statement 2022-07-11T02:05:07,258 ```python 2022-07-11T02:05:07,259 session.execute_query_statement(sql) 2022-07-11T02:05:07,259 ``` 2022-07-11T02:05:07,260 * Execute non query statement 2022-07-11T02:05:07,260 ```python 2022-07-11T02:05:07,261 session.execute_non_query_statement(sql) 2022-07-11T02:05:07,261 ``` 2022-07-11T02:05:07,261 * Execute statement 2022-07-11T02:05:07,262 ```python 2022-07-11T02:05:07,262 session.execute_statement(sql) 2022-07-11T02:05:07,263 ``` 2022-07-11T02:05:07,263 ### Schema Template 2022-07-11T02:05:07,264 #### Create Schema Template 2022-07-11T02:05:07,264 The step for creating a metadata template is as follows 2022-07-11T02:05:07,264 1. Create the template class 2022-07-11T02:05:07,264 2. Adding child Node,InternalNode and MeasurementNode can be chose 2022-07-11T02:05:07,265 3. Execute create schema template function 2022-07-11T02:05:07,265 ```python 2022-07-11T02:05:07,266 template = Template(name=template_name, share_time=True) 2022-07-11T02:05:07,266 i_node_gps = InternalNode(name="GPS", share_time=False) 2022-07-11T02:05:07,267 i_node_v = InternalNode(name="vehicle", share_time=True) 2022-07-11T02:05:07,267 m_node_x = MeasurementNode("x", TSDataType.FLOAT, TSEncoding.RLE, Compressor.SNAPPY) 2022-07-11T02:05:07,268 i_node_gps.add_child(m_node_x) 2022-07-11T02:05:07,268 i_node_v.add_child(m_node_x) 2022-07-11T02:05:07,268 template.add_template(i_node_gps) 2022-07-11T02:05:07,269 template.add_template(i_node_v) 2022-07-11T02:05:07,269 template.add_template(m_node_x) 2022-07-11T02:05:07,270 session.create_schema_template(template) 2022-07-11T02:05:07,270 ``` 2022-07-11T02:05:07,270 #### Modify Schema Template nodes 2022-07-11T02:05:07,271 Modify nodes in a template, the template must be already created. These are functions that add or delete some measurement nodes. 2022-07-11T02:05:07,271 * add node in template 2022-07-11T02:05:07,271 ```python 2022-07-11T02:05:07,271 session.add_measurements_in_template(template_name, measurements_path, data_types, encodings, compressors, is_aligned) 2022-07-11T02:05:07,272 ``` 2022-07-11T02:05:07,272 * delete node in template 2022-07-11T02:05:07,273 ```python 2022-07-11T02:05:07,273 session.delete_node_in_template(template_name, path) 2022-07-11T02:05:07,273 ``` 2022-07-11T02:05:07,274 #### Set Schema Template 2022-07-11T02:05:07,274 ```python 2022-07-11T02:05:07,274 session.set_schema_template(template_name, prefix_path) 2022-07-11T02:05:07,275 ``` 2022-07-11T02:05:07,275 #### Uset Schema Template 2022-07-11T02:05:07,276 ```python 2022-07-11T02:05:07,276 session.unset_schema_template(template_name, prefix_path) 2022-07-11T02:05:07,276 ``` 2022-07-11T02:05:07,277 #### Show Schema Template 2022-07-11T02:05:07,277 * Show all schema templates 2022-07-11T02:05:07,277 ```python 2022-07-11T02:05:07,278 session.show_all_templates() 2022-07-11T02:05:07,278 ``` 2022-07-11T02:05:07,278 * Count all nodes in templates 2022-07-11T02:05:07,279 ```python 2022-07-11T02:05:07,279 session.count_measurements_in_template(template_name) 2022-07-11T02:05:07,279 ``` 2022-07-11T02:05:07,280 * Judge whether the path is measurement or not in templates, This measurement must be in the template 2022-07-11T02:05:07,280 ```python 2022-07-11T02:05:07,280 session.count_measurements_in_template(template_name, path) 2022-07-11T02:05:07,281 ``` 2022-07-11T02:05:07,281 * Judge whether the path is exist or not in templates, This path may not belong to the template 2022-07-11T02:05:07,282 ```python 2022-07-11T02:05:07,282 session.is_path_exist_in_template(template_name, path) 2022-07-11T02:05:07,282 ``` 2022-07-11T02:05:07,283 * Show nodes under in schema template 2022-07-11T02:05:07,283 ```python 2022-07-11T02:05:07,284 session.show_measurements_in_template(template_name) 2022-07-11T02:05:07,284 ``` 2022-07-11T02:05:07,284 * Show the path prefix where a schema template is set 2022-07-11T02:05:07,285 ```python 2022-07-11T02:05:07,285 session.show_paths_template_set_on(template_name) 2022-07-11T02:05:07,285 ``` 2022-07-11T02:05:07,286 * Show the path prefix where a schema template is used (i.e. the time series has been created) 2022-07-11T02:05:07,286 ```python 2022-07-11T02:05:07,287 session.show_paths_template_using_on(template_name) 2022-07-11T02:05:07,287 ``` 2022-07-11T02:05:07,287 #### Drop Schema Template 2022-07-11T02:05:07,288 Delete an existing metadata template,dropping an already set template is not supported 2022-07-11T02:05:07,288 ```python 2022-07-11T02:05:07,288 session.drop_schema_template("template_python") 2022-07-11T02:05:07,289 ``` 2022-07-11T02:05:07,290 ### Pandas Support 2022-07-11T02:05:07,290 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2022-07-11T02:05:07,291 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2022-07-11T02:05:07,291 Example: 2022-07-11T02:05:07,292 ```python 2022-07-11T02:05:07,292 from iotdb.Session import Session 2022-07-11T02:05:07,293 ip = "127.0.0.1" 2022-07-11T02:05:07,293 port_ = "6667" 2022-07-11T02:05:07,294 username_ = "root" 2022-07-11T02:05:07,294 password_ = "root" 2022-07-11T02:05:07,294 session = Session(ip, port_, username_, password_) 2022-07-11T02:05:07,294 session.open(False) 2022-07-11T02:05:07,295 result = session.execute_query_statement("SELECT * FROM root.*") 2022-07-11T02:05:07,295 # Transform to Pandas Dataset 2022-07-11T02:05:07,296 df = result.todf() 2022-07-11T02:05:07,296 session.close() 2022-07-11T02:05:07,297 # Now you can work with the dataframe 2022-07-11T02:05:07,297 df = ... 2022-07-11T02:05:07,297 ``` 2022-07-11T02:05:07,298 ### IoTDB Testcontainer 2022-07-11T02:05:07,299 The Test Support is based on the lib `testcontainers` (https://testcontainers-python.readthedocs.io/en/latest/index.html) which you need to install in your project if you want to use the feature. 2022-07-11T02:05:07,300 To start (and stop) an IoTDB Database in a Docker container simply do: 2022-07-11T02:05:07,300 ```python 2022-07-11T02:05:07,300 class MyTestCase(unittest.TestCase): 2022-07-11T02:05:07,301 def test_something(self): 2022-07-11T02:05:07,301 with IoTDBContainer() as c: 2022-07-11T02:05:07,302 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2022-07-11T02:05:07,302 session.open(False) 2022-07-11T02:05:07,302 result = session.execute_query_statement("SHOW TIMESERIES") 2022-07-11T02:05:07,302 print(result) 2022-07-11T02:05:07,303 session.close() 2022-07-11T02:05:07,303 ``` 2022-07-11T02:05:07,304 by default it will load the image `apache/iotdb:latest`, if you want a specific version just pass it like e.g. `IoTDBContainer("apache/iotdb:0.12.0")` to get version `0.12.0` running. 2022-07-11T02:05:07,305 ### IoTDB DBAPI 2022-07-11T02:05:07,305 IoTDB DBAPI implements the Python DB API 2.0 specification (https://peps.python.org/pep-0249/), which defines a common 2022-07-11T02:05:07,305 interface for accessing databases in Python. 2022-07-11T02:05:07,306 #### Examples 2022-07-11T02:05:07,306 + Initialization 2022-07-11T02:05:07,307 The initialized parameters are consistent with the session part (except for the sqlalchemy_mode). 2022-07-11T02:05:07,307 ```python 2022-07-11T02:05:07,308 from iotdb.dbapi import connect 2022-07-11T02:05:07,308 ip = "127.0.0.1" 2022-07-11T02:05:07,308 port_ = "6667" 2022-07-11T02:05:07,309 username_ = "root" 2022-07-11T02:05:07,309 password_ = "root" 2022-07-11T02:05:07,309 conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="UTC+8",sqlalchemy_mode=False) 2022-07-11T02:05:07,310 cursor = conn.cursor() 2022-07-11T02:05:07,310 ``` 2022-07-11T02:05:07,310 + simple SQL statement execution 2022-07-11T02:05:07,311 ```python 2022-07-11T02:05:07,311 cursor.execute("SELECT * FROM root.*") 2022-07-11T02:05:07,311 for row in cursor.fetchall(): 2022-07-11T02:05:07,311 print(row) 2022-07-11T02:05:07,312 ``` 2022-07-11T02:05:07,312 + execute SQL with parameter 2022-07-11T02:05:07,313 IoTDB DBAPI supports pyformat style parameters 2022-07-11T02:05:07,313 ```python 2022-07-11T02:05:07,314 cursor.execute("SELECT * FROM root.* WHERE time < %(time)s",{"time":"2017-11-01T00:08:00.000"}) 2022-07-11T02:05:07,314 for row in cursor.fetchall(): 2022-07-11T02:05:07,314 print(row) 2022-07-11T02:05:07,314 ``` 2022-07-11T02:05:07,315 + execute SQL with parameter sequences 2022-07-11T02:05:07,315 ```python 2022-07-11T02:05:07,316 seq_of_parameters = [ 2022-07-11T02:05:07,316 {"timestamp": 1, "temperature": 1}, 2022-07-11T02:05:07,316 {"timestamp": 2, "temperature": 2}, 2022-07-11T02:05:07,317 {"timestamp": 3, "temperature": 3}, 2022-07-11T02:05:07,317 {"timestamp": 4, "temperature": 4}, 2022-07-11T02:05:07,317 {"timestamp": 5, "temperature": 5}, 2022-07-11T02:05:07,318 ] 2022-07-11T02:05:07,318 sql = "insert into root.cursor(timestamp,temperature) values(%(timestamp)s,%(temperature)s)" 2022-07-11T02:05:07,318 cursor.executemany(sql,seq_of_parameters) 2022-07-11T02:05:07,318 ``` 2022-07-11T02:05:07,319 + close the connection and cursor 2022-07-11T02:05:07,319 ```python 2022-07-11T02:05:07,320 cursor.close() 2022-07-11T02:05:07,320 conn.close() 2022-07-11T02:05:07,320 ``` 2022-07-11T02:05:07,321 ### IoTDB SQLAlchemy Dialect (Experimental) 2022-07-11T02:05:07,321 The SQLAlchemy dialect of IoTDB is written to adapt to Apache Superset. 2022-07-11T02:05:07,322 This part is still being improved. 2022-07-11T02:05:07,322 Please do not use it in the production environment! 2022-07-11T02:05:07,322 #### Mapping of the metadata 2022-07-11T02:05:07,322 The data model used by SQLAlchemy is a relational data model, which describes the relationships between different entities through tables. 2022-07-11T02:05:07,323 While the data model of IoTDB is a hierarchical data model, which organizes the data through a tree structure. 2022-07-11T02:05:07,323 In order to adapt IoTDB to the dialect of SQLAlchemy, the original data model in IoTDB needs to be reorganized. 2022-07-11T02:05:07,323 Converting the data model of IoTDB into the data model of SQLAlchemy. 2022-07-11T02:05:07,324 The metadata in the IoTDB are: 2022-07-11T02:05:07,325 1. Storage Group 2022-07-11T02:05:07,325 2. Path 2022-07-11T02:05:07,325 3. Entity 2022-07-11T02:05:07,325 4. Measurement 2022-07-11T02:05:07,326 The metadata in the SQLAlchemy are: 2022-07-11T02:05:07,326 1. Schema 2022-07-11T02:05:07,327 2. Table 2022-07-11T02:05:07,327 3. Column 2022-07-11T02:05:07,327 The mapping relationship between them is: 2022-07-11T02:05:07,328 | The metadata in the SQLAlchemy | The metadata in the IoTDB | 2022-07-11T02:05:07,328 | -------------------- | ---------------------------------------------- | 2022-07-11T02:05:07,329 | Schema | Storage Group | 2022-07-11T02:05:07,329 | Table | Path ( from storage group to entity ) + Entity | 2022-07-11T02:05:07,329 | Column | Measurement | 2022-07-11T02:05:07,330 The following figure shows the relationship between the two more intuitively: 2022-07-11T02:05:07,331 ![sqlalchemy-to-iotdb](https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/API/IoTDB-SQLAlchemy/sqlalchemy-to-iotdb.png?raw=true) 2022-07-11T02:05:07,331 #### Data type mapping 2022-07-11T02:05:07,332 | data type in IoTDB | data type in SQLAlchemy | 2022-07-11T02:05:07,332 |--------------------|-------------------------| 2022-07-11T02:05:07,332 | BOOLEAN | Boolean | 2022-07-11T02:05:07,332 | INT32 | Integer | 2022-07-11T02:05:07,333 | INT64 | BigInteger | 2022-07-11T02:05:07,333 | FLOAT | Float | 2022-07-11T02:05:07,333 | DOUBLE | Float | 2022-07-11T02:05:07,334 | TEXT | Text | 2022-07-11T02:05:07,334 | LONG | BigInteger | 2022-07-11T02:05:07,334 #### Example 2022-07-11T02:05:07,335 + execute statement 2022-07-11T02:05:07,335 ```python 2022-07-11T02:05:07,336 from sqlalchemy import create_engine 2022-07-11T02:05:07,336 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2022-07-11T02:05:07,337 connect = engine.connect() 2022-07-11T02:05:07,337 result = connect.execute("SELECT ** FROM root") 2022-07-11T02:05:07,337 for row in result.fetchall(): 2022-07-11T02:05:07,338 print(row) 2022-07-11T02:05:07,338 ``` 2022-07-11T02:05:07,338 + ORM (now only simple queries are supported) 2022-07-11T02:05:07,339 ```python 2022-07-11T02:05:07,340 from sqlalchemy import create_engine, Column, Float, BigInteger, MetaData 2022-07-11T02:05:07,340 from sqlalchemy.ext.declarative import declarative_base 2022-07-11T02:05:07,340 from sqlalchemy.orm import sessionmaker 2022-07-11T02:05:07,341 metadata = MetaData( 2022-07-11T02:05:07,341 schema='root.factory' 2022-07-11T02:05:07,342 ) 2022-07-11T02:05:07,342 Base = declarative_base(metadata=metadata) 2022-07-11T02:05:07,343 class Device(Base): 2022-07-11T02:05:07,343 __tablename__ = "room2.device1" 2022-07-11T02:05:07,343 Time = Column(BigInteger, primary_key=True) 2022-07-11T02:05:07,344 temperature = Column(Float) 2022-07-11T02:05:07,344 status = Column(Float) 2022-07-11T02:05:07,345 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2022-07-11T02:05:07,345 DbSession = sessionmaker(bind=engine) 2022-07-11T02:05:07,346 session = DbSession() 2022-07-11T02:05:07,346 res = session.query(Device.status).filter(Device.temperature > 1) 2022-07-11T02:05:07,347 for row in res: 2022-07-11T02:05:07,347 print(row) 2022-07-11T02:05:07,348 ``` 2022-07-11T02:05:07,349 ## Developers 2022-07-11T02:05:07,349 ### Introduction 2022-07-11T02:05:07,350 This is an example of how to connect to IoTDB with python, using the thrift rpc interfaces. Things are almost the same on Windows or Linux, but pay attention to the difference like path separator. 2022-07-11T02:05:07,351 ### Prerequisites 2022-07-11T02:05:07,352 Python3.7 or later is preferred. 2022-07-11T02:05:07,352 You have to install Thrift (0.11.0 or later) to compile our thrift file into python code. Below is the official tutorial of installation, eventually, you should have a thrift executable. 2022-07-11T02:05:07,353 ``` 2022-07-11T02:05:07,353 http://thrift.apache.org/docs/install/ 2022-07-11T02:05:07,353 ``` 2022-07-11T02:05:07,354 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2022-07-11T02:05:07,354 ```shell 2022-07-11T02:05:07,355 pip install -r requirements_dev.txt 2022-07-11T02:05:07,355 ``` 2022-07-11T02:05:07,356 ### Compile the thrift library and Debug 2022-07-11T02:05:07,357 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2022-07-11T02:05:07,357 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2022-07-11T02:05:07,358 This folder is ignored from git and should **never be pushed to git!** 2022-07-11T02:05:07,358 **Notice** Do not upload `iotdb/thrift` to the git repo. 2022-07-11T02:05:07,360 ### Session Client & Example 2022-07-11T02:05:07,360 We packed up the Thrift interface in `client-py/src/iotdb/Session.py` (similar with its Java counterpart), also provided an example file `client-py/src/SessionExample.py` of how to use the session module. please read it carefully. 2022-07-11T02:05:07,361 Or, another simple example: 2022-07-11T02:05:07,362 ```python 2022-07-11T02:05:07,362 from iotdb.Session import Session 2022-07-11T02:05:07,363 ip = "127.0.0.1" 2022-07-11T02:05:07,363 port_ = "6667" 2022-07-11T02:05:07,364 username_ = "root" 2022-07-11T02:05:07,364 password_ = "root" 2022-07-11T02:05:07,364 session = Session(ip, port_, username_, password_) 2022-07-11T02:05:07,364 session.open(False) 2022-07-11T02:05:07,365 zone = session.get_time_zone() 2022-07-11T02:05:07,365 session.close() 2022-07-11T02:05:07,365 ``` 2022-07-11T02:05:07,366 ### Tests 2022-07-11T02:05:07,367 Please add your custom tests in `tests` folder. 2022-07-11T02:05:07,368 To run all defined tests just type `pytest .` in the root folder. 2022-07-11T02:05:07,368 **Notice** Some tests need docker to be started on your system as a test instance is started in a docker container using [testcontainers](https://testcontainers-python.readthedocs.io/en/latest/index.html). 2022-07-11T02:05:07,370 ### Futher Tools 2022-07-11T02:05:07,370 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2022-07-11T02:05:07,371 Both can be run by `black .` or `flake8 .` respectively. 2022-07-11T02:05:07,372 ## Releasing 2022-07-11T02:05:07,372 To do a release just ensure that you have the right set of generated thrift files. 2022-07-11T02:05:07,373 Then run linting and auto-formatting. 2022-07-11T02:05:07,373 Then, ensure that all tests work (via `pytest .`). 2022-07-11T02:05:07,373 Then you are good to go to do a release! 2022-07-11T02:05:07,375 ### Preparing your environment 2022-07-11T02:05:07,375 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2022-07-11T02:05:07,376 ### Doing the Release 2022-07-11T02:05:07,377 There is a convenient script `release.sh` to do all steps for a release. 2022-07-11T02:05:07,377 Namely, these are 2022-07-11T02:05:07,378 * Remove all transient directories from last release (if exists) 2022-07-11T02:05:07,378 * (Re-)generate all generated sources via mvn 2022-07-11T02:05:07,378 * Run Linting (flake8) 2022-07-11T02:05:07,379 * Run Tests via pytest 2022-07-11T02:05:07,379 * Build 2022-07-11T02:05:07,379 * Release to pypi 2022-07-11T02:05:12,395 running egg_info 2022-07-11T02:05:13,036 writing apache_iotdb.egg-info/PKG-INFO 2022-07-11T02:05:13,630 writing dependency_links to apache_iotdb.egg-info/dependency_links.txt 2022-07-11T02:05:15,428 writing entry points to apache_iotdb.egg-info/entry_points.txt 2022-07-11T02:05:16,621 writing requirements to apache_iotdb.egg-info/requires.txt 2022-07-11T02:05:17,216 writing top-level names to apache_iotdb.egg-info/top_level.txt 2022-07-11T02:05:17,984 reading manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2022-07-11T02:05:17,991 adding license file 'LICENSE' 2022-07-11T02:05:18,003 writing manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2022-07-11T02:05:18,007 /usr/local/lib/python3.7/dist-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'website' 2022-07-11T02:05:18,007 warnings.warn(msg) 2022-07-11T02:05:18,008 /usr/local/lib/python3.7/dist-packages/setuptools/dist.py:531: UserWarning: Normalizing '0.14.0preview1' to '0.14.0rc1' 2022-07-11T02:05:18,008 warnings.warn(tmpl.format(**locals())) 2022-07-11T02:05:18,227 Getting requirements to build wheel: finished with status 'done' 2022-07-11T02:05:18,248 Created temporary directory: /tmp/pip-modern-metadata-apae2fp7 2022-07-11T02:05:18,254 Preparing metadata (pyproject.toml): started 2022-07-11T02:05:18,256 Running command Preparing metadata (pyproject.toml) 2022-07-11T02:05:20,080 2022-07-11T02:05:20,088 # Apache IoTDB 2022-07-11T02:05:20,088 [![Main Mac and Linux](https://github.com/apache/iotdb/actions/workflows/main-unix.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-unix.yml) 2022-07-11T02:05:20,089 [![Main Win](https://github.com/apache/iotdb/actions/workflows/main-win.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-win.yml) 2022-07-11T02:05:20,089 [![coveralls](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master) 2022-07-11T02:05:20,090 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2022-07-11T02:05:20,090 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2022-07-11T02:05:20,090 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2022-07-11T02:05:20,091 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2022-07-11T02:05:20,091 ![](https://img.shields.io/badge/platform-win10%20%7C%20macox%20%7C%20linux-yellow.svg) 2022-07-11T02:05:20,091 ![](https://img.shields.io/badge/java--language-1.8-blue.svg) 2022-07-11T02:05:20,092 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2022-07-11T02:05:20,093 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2022-07-11T02:05:20,093 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2022-07-11T02:05:20,093 architecture, high performance and rich feature set together with its deep integration with 2022-07-11T02:05:20,093 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2022-07-11T02:05:20,094 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2022-07-11T02:05:20,094 ## Python Native API 2022-07-11T02:05:20,095 ### Requirements 2022-07-11T02:05:20,096 You have to install thrift (>=0.13) before using the package. 2022-07-11T02:05:20,097 ### How to use (Example) 2022-07-11T02:05:20,098 First, download the latest package: `pip3 install apache-iotdb` 2022-07-11T02:05:20,098 *Notice: If you are installing Python API v0.13.0, DO NOT install by `pip install apache-iotdb==0.13.0`, use `pip install apache-iotdb==0.13.0.post1` instead!* 2022-07-11T02:05:20,099 You can get an example of using the package to read and write data at here: [Example](https://github.com/apache/iotdb/blob/master/client-py/SessionExample.py) 2022-07-11T02:05:20,099 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2022-07-11T02:05:20,100 (you need to add `import iotdb` in the head of the file) 2022-07-11T02:05:20,101 Or: 2022-07-11T02:05:20,101 ```python 2022-07-11T02:05:20,102 from iotdb.Session import Session 2022-07-11T02:05:20,102 ip = "127.0.0.1" 2022-07-11T02:05:20,103 port_ = "6667" 2022-07-11T02:05:20,103 username_ = "root" 2022-07-11T02:05:20,103 password_ = "root" 2022-07-11T02:05:20,103 session = Session(ip, port_, username_, password_) 2022-07-11T02:05:20,104 session.open(False) 2022-07-11T02:05:20,104 zone = session.get_time_zone() 2022-07-11T02:05:20,104 session.close() 2022-07-11T02:05:20,105 ``` 2022-07-11T02:05:20,105 ### Initialization 2022-07-11T02:05:20,106 * Initialize a Session 2022-07-11T02:05:20,106 ```python 2022-07-11T02:05:20,107 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2022-07-11T02:05:20,107 ``` 2022-07-11T02:05:20,108 * Open a session, with a parameter to specify whether to enable RPC compression 2022-07-11T02:05:20,108 ```python 2022-07-11T02:05:20,108 session.open(enable_rpc_compression=False) 2022-07-11T02:05:20,109 ``` 2022-07-11T02:05:20,109 Notice: this RPC compression status of client must comply with that of IoTDB server 2022-07-11T02:05:20,110 * Close a Session 2022-07-11T02:05:20,111 ```python 2022-07-11T02:05:20,111 session.close() 2022-07-11T02:05:20,111 ``` 2022-07-11T02:05:20,112 ### Data Definition Interface (DDL Interface) 2022-07-11T02:05:20,112 #### Storage Group Management 2022-07-11T02:05:20,113 * Set storage group 2022-07-11T02:05:20,113 ```python 2022-07-11T02:05:20,114 session.set_storage_group(group_name) 2022-07-11T02:05:20,114 ``` 2022-07-11T02:05:20,115 * Delete one or several storage groups 2022-07-11T02:05:20,115 ```python 2022-07-11T02:05:20,116 session.delete_storage_group(group_name) 2022-07-11T02:05:20,116 session.delete_storage_groups(group_name_lst) 2022-07-11T02:05:20,116 ``` 2022-07-11T02:05:20,117 #### Timeseries Management 2022-07-11T02:05:20,117 * Create one or multiple timeseries 2022-07-11T02:05:20,118 ```python 2022-07-11T02:05:20,118 session.create_time_series(ts_path, data_type, encoding, compressor, 2022-07-11T02:05:20,118 props=None, tags=None, attributes=None, alias=None) 2022-07-11T02:05:20,119 session.create_multi_time_series( 2022-07-11T02:05:20,119 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2022-07-11T02:05:20,120 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2022-07-11T02:05:20,120 ) 2022-07-11T02:05:20,120 ``` 2022-07-11T02:05:20,121 * Create aligned timeseries 2022-07-11T02:05:20,121 ```python 2022-07-11T02:05:20,122 session.create_aligned_time_series( 2022-07-11T02:05:20,122 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2022-07-11T02:05:20,122 ) 2022-07-11T02:05:20,123 ``` 2022-07-11T02:05:20,123 Attention: Alias of measurements are **not supported** currently. 2022-07-11T02:05:20,124 * Delete one or several timeseries 2022-07-11T02:05:20,125 ```python 2022-07-11T02:05:20,125 session.delete_time_series(paths_list) 2022-07-11T02:05:20,125 ``` 2022-07-11T02:05:20,126 * Check whether the specific timeseries exists 2022-07-11T02:05:20,126 ```python 2022-07-11T02:05:20,127 session.check_time_series_exists(path) 2022-07-11T02:05:20,127 ``` 2022-07-11T02:05:20,128 ### Data Manipulation Interface (DML Interface) 2022-07-11T02:05:20,128 #### Insert 2022-07-11T02:05:20,129 It is recommended to use insertTablet to help improve write efficiency. 2022-07-11T02:05:20,129 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2022-07-11T02:05:20,130 * **Better Write Performance** 2022-07-11T02:05:20,130 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2022-07-11T02:05:20,131 We have two implementations of Tablet in Python API. 2022-07-11T02:05:20,132 * Normal Tablet 2022-07-11T02:05:20,132 ```python 2022-07-11T02:05:20,132 values_ = [ 2022-07-11T02:05:20,133 [False, 10, 11, 1.1, 10011.1, "test01"], 2022-07-11T02:05:20,133 [True, 100, 11111, 1.25, 101.0, "test02"], 2022-07-11T02:05:20,133 [False, 100, 1, 188.1, 688.25, "test03"], 2022-07-11T02:05:20,134 [True, 0, 0, 0, 6.25, "test04"], 2022-07-11T02:05:20,134 ] 2022-07-11T02:05:20,134 timestamps_ = [1, 2, 3, 4] 2022-07-11T02:05:20,135 tablet_ = Tablet( 2022-07-11T02:05:20,135 device_id, measurements_, data_types_, values_, timestamps_ 2022-07-11T02:05:20,135 ) 2022-07-11T02:05:20,136 session.insert_tablet(tablet_) 2022-07-11T02:05:20,136 ``` 2022-07-11T02:05:20,136 * Numpy Tablet 2022-07-11T02:05:20,137 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2022-07-11T02:05:20,137 With less memory footprint and time cost of serialization, the insert performance will be better. 2022-07-11T02:05:20,138 **Notice** 2022-07-11T02:05:20,138 1. time and value columns in Tablet are ndarray. 2022-07-11T02:05:20,138 2. recommended to use the specific dtypes to each ndarray, see the example below 2022-07-11T02:05:20,138 (if not, the default dtypes are also ok). 2022-07-11T02:05:20,139 ```python 2022-07-11T02:05:20,139 data_types_ = [ 2022-07-11T02:05:20,140 TSDataType.BOOLEAN, 2022-07-11T02:05:20,140 TSDataType.INT32, 2022-07-11T02:05:20,140 TSDataType.INT64, 2022-07-11T02:05:20,141 TSDataType.FLOAT, 2022-07-11T02:05:20,141 TSDataType.DOUBLE, 2022-07-11T02:05:20,141 TSDataType.TEXT, 2022-07-11T02:05:20,142 ] 2022-07-11T02:05:20,142 np_values_ = [ 2022-07-11T02:05:20,142 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2022-07-11T02:05:20,143 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2022-07-11T02:05:20,143 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2022-07-11T02:05:20,143 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2022-07-11T02:05:20,143 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2022-07-11T02:05:20,144 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2022-07-11T02:05:20,144 ] 2022-07-11T02:05:20,144 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2022-07-11T02:05:20,145 np_tablet_ = NumpyTablet( 2022-07-11T02:05:20,145 "root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_ 2022-07-11T02:05:20,145 ) 2022-07-11T02:05:20,146 session.insert_tablet(np_tablet_) 2022-07-11T02:05:20,146 ``` 2022-07-11T02:05:20,146 * Insert multiple Tablets 2022-07-11T02:05:20,147 ```python 2022-07-11T02:05:20,147 session.insert_tablets(tablet_lst) 2022-07-11T02:05:20,148 ``` 2022-07-11T02:05:20,148 * Insert a Record 2022-07-11T02:05:20,149 ```python 2022-07-11T02:05:20,149 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2022-07-11T02:05:20,150 ``` 2022-07-11T02:05:20,150 * Insert multiple Records 2022-07-11T02:05:20,151 ```python 2022-07-11T02:05:20,151 session.insert_records( 2022-07-11T02:05:20,151 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2022-07-11T02:05:20,152 ) 2022-07-11T02:05:20,152 ``` 2022-07-11T02:05:20,152 * Insert multiple Records that belong to the same device. 2022-07-11T02:05:20,153 With type info the server has no need to do type inference, which leads a better performance 2022-07-11T02:05:20,154 ```python 2022-07-11T02:05:20,154 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2022-07-11T02:05:20,154 ``` 2022-07-11T02:05:20,155 #### Insert with type inference 2022-07-11T02:05:20,155 When the data is of String type, we can use the following interface to perform type inference based on the value of the value itself. For example, if value is "true" , it can be automatically inferred to be a boolean type. If value is "3.2" , it can be automatically inferred as a flout type. Without type information, server has to do type inference, which may cost some time. 2022-07-11T02:05:20,156 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2022-07-11T02:05:20,157 ```python 2022-07-11T02:05:20,157 session.insert_str_record(device_id, timestamp, measurements, string_values) 2022-07-11T02:05:20,158 ``` 2022-07-11T02:05:20,158 #### Insert of Aligned Timeseries 2022-07-11T02:05:20,159 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2022-07-11T02:05:20,160 * insert_aligned_record 2022-07-11T02:05:20,160 * insert_aligned_records 2022-07-11T02:05:20,160 * insert_aligned_records_of_one_device 2022-07-11T02:05:20,160 * insert_aligned_tablet 2022-07-11T02:05:20,161 * insert_aligned_tablets 2022-07-11T02:05:20,162 ### IoTDB-SQL Interface 2022-07-11T02:05:20,162 * Execute query statement 2022-07-11T02:05:20,163 ```python 2022-07-11T02:05:20,163 session.execute_query_statement(sql) 2022-07-11T02:05:20,164 ``` 2022-07-11T02:05:20,164 * Execute non query statement 2022-07-11T02:05:20,165 ```python 2022-07-11T02:05:20,165 session.execute_non_query_statement(sql) 2022-07-11T02:05:20,165 ``` 2022-07-11T02:05:20,166 * Execute statement 2022-07-11T02:05:20,167 ```python 2022-07-11T02:05:20,167 session.execute_statement(sql) 2022-07-11T02:05:20,167 ``` 2022-07-11T02:05:20,168 ### Schema Template 2022-07-11T02:05:20,168 #### Create Schema Template 2022-07-11T02:05:20,168 The step for creating a metadata template is as follows 2022-07-11T02:05:20,169 1. Create the template class 2022-07-11T02:05:20,169 2. Adding child Node,InternalNode and MeasurementNode can be chose 2022-07-11T02:05:20,169 3. Execute create schema template function 2022-07-11T02:05:20,170 ```python 2022-07-11T02:05:20,170 template = Template(name=template_name, share_time=True) 2022-07-11T02:05:20,171 i_node_gps = InternalNode(name="GPS", share_time=False) 2022-07-11T02:05:20,171 i_node_v = InternalNode(name="vehicle", share_time=True) 2022-07-11T02:05:20,172 m_node_x = MeasurementNode("x", TSDataType.FLOAT, TSEncoding.RLE, Compressor.SNAPPY) 2022-07-11T02:05:20,172 i_node_gps.add_child(m_node_x) 2022-07-11T02:05:20,173 i_node_v.add_child(m_node_x) 2022-07-11T02:05:20,173 template.add_template(i_node_gps) 2022-07-11T02:05:20,173 template.add_template(i_node_v) 2022-07-11T02:05:20,174 template.add_template(m_node_x) 2022-07-11T02:05:20,174 session.create_schema_template(template) 2022-07-11T02:05:20,175 ``` 2022-07-11T02:05:20,175 #### Modify Schema Template nodes 2022-07-11T02:05:20,175 Modify nodes in a template, the template must be already created. These are functions that add or delete some measurement nodes. 2022-07-11T02:05:20,175 * add node in template 2022-07-11T02:05:20,176 ```python 2022-07-11T02:05:20,176 session.add_measurements_in_template(template_name, measurements_path, data_types, encodings, compressors, is_aligned) 2022-07-11T02:05:20,176 ``` 2022-07-11T02:05:20,177 * delete node in template 2022-07-11T02:05:20,177 ```python 2022-07-11T02:05:20,178 session.delete_node_in_template(template_name, path) 2022-07-11T02:05:20,178 ``` 2022-07-11T02:05:20,179 #### Set Schema Template 2022-07-11T02:05:20,179 ```python 2022-07-11T02:05:20,179 session.set_schema_template(template_name, prefix_path) 2022-07-11T02:05:20,180 ``` 2022-07-11T02:05:20,180 #### Uset Schema Template 2022-07-11T02:05:20,180 ```python 2022-07-11T02:05:20,181 session.unset_schema_template(template_name, prefix_path) 2022-07-11T02:05:20,181 ``` 2022-07-11T02:05:20,182 #### Show Schema Template 2022-07-11T02:05:20,182 * Show all schema templates 2022-07-11T02:05:20,182 ```python 2022-07-11T02:05:20,182 session.show_all_templates() 2022-07-11T02:05:20,183 ``` 2022-07-11T02:05:20,183 * Count all nodes in templates 2022-07-11T02:05:20,183 ```python 2022-07-11T02:05:20,184 session.count_measurements_in_template(template_name) 2022-07-11T02:05:20,184 ``` 2022-07-11T02:05:20,185 * Judge whether the path is measurement or not in templates, This measurement must be in the template 2022-07-11T02:05:20,185 ```python 2022-07-11T02:05:20,185 session.count_measurements_in_template(template_name, path) 2022-07-11T02:05:20,185 ``` 2022-07-11T02:05:20,186 * Judge whether the path is exist or not in templates, This path may not belong to the template 2022-07-11T02:05:20,186 ```python 2022-07-11T02:05:20,187 session.is_path_exist_in_template(template_name, path) 2022-07-11T02:05:20,187 ``` 2022-07-11T02:05:20,188 * Show nodes under in schema template 2022-07-11T02:05:20,188 ```python 2022-07-11T02:05:20,188 session.show_measurements_in_template(template_name) 2022-07-11T02:05:20,188 ``` 2022-07-11T02:05:20,189 * Show the path prefix where a schema template is set 2022-07-11T02:05:20,189 ```python 2022-07-11T02:05:20,190 session.show_paths_template_set_on(template_name) 2022-07-11T02:05:20,190 ``` 2022-07-11T02:05:20,191 * Show the path prefix where a schema template is used (i.e. the time series has been created) 2022-07-11T02:05:20,191 ```python 2022-07-11T02:05:20,191 session.show_paths_template_using_on(template_name) 2022-07-11T02:05:20,192 ``` 2022-07-11T02:05:20,192 #### Drop Schema Template 2022-07-11T02:05:20,193 Delete an existing metadata template,dropping an already set template is not supported 2022-07-11T02:05:20,193 ```python 2022-07-11T02:05:20,193 session.drop_schema_template("template_python") 2022-07-11T02:05:20,193 ``` 2022-07-11T02:05:20,194 ### Pandas Support 2022-07-11T02:05:20,195 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2022-07-11T02:05:20,195 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2022-07-11T02:05:20,196 Example: 2022-07-11T02:05:20,196 ```python 2022-07-11T02:05:20,197 from iotdb.Session import Session 2022-07-11T02:05:20,197 ip = "127.0.0.1" 2022-07-11T02:05:20,198 port_ = "6667" 2022-07-11T02:05:20,198 username_ = "root" 2022-07-11T02:05:20,198 password_ = "root" 2022-07-11T02:05:20,199 session = Session(ip, port_, username_, password_) 2022-07-11T02:05:20,199 session.open(False) 2022-07-11T02:05:20,199 result = session.execute_query_statement("SELECT * FROM root.*") 2022-07-11T02:05:20,200 # Transform to Pandas Dataset 2022-07-11T02:05:20,200 df = result.todf() 2022-07-11T02:05:20,201 session.close() 2022-07-11T02:05:20,201 # Now you can work with the dataframe 2022-07-11T02:05:20,202 df = ... 2022-07-11T02:05:20,202 ``` 2022-07-11T02:05:20,203 ### IoTDB Testcontainer 2022-07-11T02:05:20,203 The Test Support is based on the lib `testcontainers` (https://testcontainers-python.readthedocs.io/en/latest/index.html) which you need to install in your project if you want to use the feature. 2022-07-11T02:05:20,204 To start (and stop) an IoTDB Database in a Docker container simply do: 2022-07-11T02:05:20,204 ```python 2022-07-11T02:05:20,205 class MyTestCase(unittest.TestCase): 2022-07-11T02:05:20,205 def test_something(self): 2022-07-11T02:05:20,206 with IoTDBContainer() as c: 2022-07-11T02:05:20,206 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2022-07-11T02:05:20,206 session.open(False) 2022-07-11T02:05:20,207 result = session.execute_query_statement("SHOW TIMESERIES") 2022-07-11T02:05:20,207 print(result) 2022-07-11T02:05:20,207 session.close() 2022-07-11T02:05:20,207 ``` 2022-07-11T02:05:20,208 by default it will load the image `apache/iotdb:latest`, if you want a specific version just pass it like e.g. `IoTDBContainer("apache/iotdb:0.12.0")` to get version `0.12.0` running. 2022-07-11T02:05:20,209 ### IoTDB DBAPI 2022-07-11T02:05:20,210 IoTDB DBAPI implements the Python DB API 2.0 specification (https://peps.python.org/pep-0249/), which defines a common 2022-07-11T02:05:20,210 interface for accessing databases in Python. 2022-07-11T02:05:20,211 #### Examples 2022-07-11T02:05:20,211 + Initialization 2022-07-11T02:05:20,211 The initialized parameters are consistent with the session part (except for the sqlalchemy_mode). 2022-07-11T02:05:20,212 ```python 2022-07-11T02:05:20,212 from iotdb.dbapi import connect 2022-07-11T02:05:20,213 ip = "127.0.0.1" 2022-07-11T02:05:20,213 port_ = "6667" 2022-07-11T02:05:20,213 username_ = "root" 2022-07-11T02:05:20,214 password_ = "root" 2022-07-11T02:05:20,214 conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="UTC+8",sqlalchemy_mode=False) 2022-07-11T02:05:20,214 cursor = conn.cursor() 2022-07-11T02:05:20,214 ``` 2022-07-11T02:05:20,215 + simple SQL statement execution 2022-07-11T02:05:20,215 ```python 2022-07-11T02:05:20,215 cursor.execute("SELECT * FROM root.*") 2022-07-11T02:05:20,216 for row in cursor.fetchall(): 2022-07-11T02:05:20,216 print(row) 2022-07-11T02:05:20,216 ``` 2022-07-11T02:05:20,217 + execute SQL with parameter 2022-07-11T02:05:20,217 IoTDB DBAPI supports pyformat style parameters 2022-07-11T02:05:20,218 ```python 2022-07-11T02:05:20,218 cursor.execute("SELECT * FROM root.* WHERE time < %(time)s",{"time":"2017-11-01T00:08:00.000"}) 2022-07-11T02:05:20,218 for row in cursor.fetchall(): 2022-07-11T02:05:20,219 print(row) 2022-07-11T02:05:20,219 ``` 2022-07-11T02:05:20,220 + execute SQL with parameter sequences 2022-07-11T02:05:20,220 ```python 2022-07-11T02:05:20,220 seq_of_parameters = [ 2022-07-11T02:05:20,220 {"timestamp": 1, "temperature": 1}, 2022-07-11T02:05:20,221 {"timestamp": 2, "temperature": 2}, 2022-07-11T02:05:20,221 {"timestamp": 3, "temperature": 3}, 2022-07-11T02:05:20,221 {"timestamp": 4, "temperature": 4}, 2022-07-11T02:05:20,222 {"timestamp": 5, "temperature": 5}, 2022-07-11T02:05:20,222 ] 2022-07-11T02:05:20,222 sql = "insert into root.cursor(timestamp,temperature) values(%(timestamp)s,%(temperature)s)" 2022-07-11T02:05:20,223 cursor.executemany(sql,seq_of_parameters) 2022-07-11T02:05:20,223 ``` 2022-07-11T02:05:20,223 + close the connection and cursor 2022-07-11T02:05:20,224 ```python 2022-07-11T02:05:20,224 cursor.close() 2022-07-11T02:05:20,224 conn.close() 2022-07-11T02:05:20,225 ``` 2022-07-11T02:05:20,225 ### IoTDB SQLAlchemy Dialect (Experimental) 2022-07-11T02:05:20,226 The SQLAlchemy dialect of IoTDB is written to adapt to Apache Superset. 2022-07-11T02:05:20,226 This part is still being improved. 2022-07-11T02:05:20,226 Please do not use it in the production environment! 2022-07-11T02:05:20,226 #### Mapping of the metadata 2022-07-11T02:05:20,227 The data model used by SQLAlchemy is a relational data model, which describes the relationships between different entities through tables. 2022-07-11T02:05:20,227 While the data model of IoTDB is a hierarchical data model, which organizes the data through a tree structure. 2022-07-11T02:05:20,227 In order to adapt IoTDB to the dialect of SQLAlchemy, the original data model in IoTDB needs to be reorganized. 2022-07-11T02:05:20,228 Converting the data model of IoTDB into the data model of SQLAlchemy. 2022-07-11T02:05:20,228 The metadata in the IoTDB are: 2022-07-11T02:05:20,229 1. Storage Group 2022-07-11T02:05:20,229 2. Path 2022-07-11T02:05:20,229 3. Entity 2022-07-11T02:05:20,230 4. Measurement 2022-07-11T02:05:20,230 The metadata in the SQLAlchemy are: 2022-07-11T02:05:20,231 1. Schema 2022-07-11T02:05:20,231 2. Table 2022-07-11T02:05:20,231 3. Column 2022-07-11T02:05:20,232 The mapping relationship between them is: 2022-07-11T02:05:20,233 | The metadata in the SQLAlchemy | The metadata in the IoTDB | 2022-07-11T02:05:20,233 | -------------------- | ---------------------------------------------- | 2022-07-11T02:05:20,233 | Schema | Storage Group | 2022-07-11T02:05:20,233 | Table | Path ( from storage group to entity ) + Entity | 2022-07-11T02:05:20,234 | Column | Measurement | 2022-07-11T02:05:20,234 The following figure shows the relationship between the two more intuitively: 2022-07-11T02:05:20,235 ![sqlalchemy-to-iotdb](https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/API/IoTDB-SQLAlchemy/sqlalchemy-to-iotdb.png?raw=true) 2022-07-11T02:05:20,235 #### Data type mapping 2022-07-11T02:05:20,236 | data type in IoTDB | data type in SQLAlchemy | 2022-07-11T02:05:20,236 |--------------------|-------------------------| 2022-07-11T02:05:20,236 | BOOLEAN | Boolean | 2022-07-11T02:05:20,237 | INT32 | Integer | 2022-07-11T02:05:20,237 | INT64 | BigInteger | 2022-07-11T02:05:20,237 | FLOAT | Float | 2022-07-11T02:05:20,238 | DOUBLE | Float | 2022-07-11T02:05:20,238 | TEXT | Text | 2022-07-11T02:05:20,238 | LONG | BigInteger | 2022-07-11T02:05:20,238 #### Example 2022-07-11T02:05:20,239 + execute statement 2022-07-11T02:05:20,240 ```python 2022-07-11T02:05:20,240 from sqlalchemy import create_engine 2022-07-11T02:05:20,240 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2022-07-11T02:05:20,241 connect = engine.connect() 2022-07-11T02:05:20,241 result = connect.execute("SELECT ** FROM root") 2022-07-11T02:05:20,241 for row in result.fetchall(): 2022-07-11T02:05:20,242 print(row) 2022-07-11T02:05:20,242 ``` 2022-07-11T02:05:20,243 + ORM (now only simple queries are supported) 2022-07-11T02:05:20,243 ```python 2022-07-11T02:05:20,243 from sqlalchemy import create_engine, Column, Float, BigInteger, MetaData 2022-07-11T02:05:20,244 from sqlalchemy.ext.declarative import declarative_base 2022-07-11T02:05:20,244 from sqlalchemy.orm import sessionmaker 2022-07-11T02:05:20,245 metadata = MetaData( 2022-07-11T02:05:20,245 schema='root.factory' 2022-07-11T02:05:20,245 ) 2022-07-11T02:05:20,246 Base = declarative_base(metadata=metadata) 2022-07-11T02:05:20,246 class Device(Base): 2022-07-11T02:05:20,247 __tablename__ = "room2.device1" 2022-07-11T02:05:20,247 Time = Column(BigInteger, primary_key=True) 2022-07-11T02:05:20,247 temperature = Column(Float) 2022-07-11T02:05:20,248 status = Column(Float) 2022-07-11T02:05:20,248 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2022-07-11T02:05:20,249 DbSession = sessionmaker(bind=engine) 2022-07-11T02:05:20,249 session = DbSession() 2022-07-11T02:05:20,250 res = session.query(Device.status).filter(Device.temperature > 1) 2022-07-11T02:05:20,251 for row in res: 2022-07-11T02:05:20,251 print(row) 2022-07-11T02:05:20,251 ``` 2022-07-11T02:05:20,252 ## Developers 2022-07-11T02:05:20,253 ### Introduction 2022-07-11T02:05:20,253 This is an example of how to connect to IoTDB with python, using the thrift rpc interfaces. Things are almost the same on Windows or Linux, but pay attention to the difference like path separator. 2022-07-11T02:05:20,254 ### Prerequisites 2022-07-11T02:05:20,255 Python3.7 or later is preferred. 2022-07-11T02:05:20,255 You have to install Thrift (0.11.0 or later) to compile our thrift file into python code. Below is the official tutorial of installation, eventually, you should have a thrift executable. 2022-07-11T02:05:20,256 ``` 2022-07-11T02:05:20,256 http://thrift.apache.org/docs/install/ 2022-07-11T02:05:20,257 ``` 2022-07-11T02:05:20,257 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2022-07-11T02:05:20,257 ```shell 2022-07-11T02:05:20,258 pip install -r requirements_dev.txt 2022-07-11T02:05:20,258 ``` 2022-07-11T02:05:20,259 ### Compile the thrift library and Debug 2022-07-11T02:05:20,260 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2022-07-11T02:05:20,260 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2022-07-11T02:05:20,261 This folder is ignored from git and should **never be pushed to git!** 2022-07-11T02:05:20,261 **Notice** Do not upload `iotdb/thrift` to the git repo. 2022-07-11T02:05:20,263 ### Session Client & Example 2022-07-11T02:05:20,263 We packed up the Thrift interface in `client-py/src/iotdb/Session.py` (similar with its Java counterpart), also provided an example file `client-py/src/SessionExample.py` of how to use the session module. please read it carefully. 2022-07-11T02:05:20,264 Or, another simple example: 2022-07-11T02:05:20,265 ```python 2022-07-11T02:05:20,265 from iotdb.Session import Session 2022-07-11T02:05:20,266 ip = "127.0.0.1" 2022-07-11T02:05:20,266 port_ = "6667" 2022-07-11T02:05:20,266 username_ = "root" 2022-07-11T02:05:20,266 password_ = "root" 2022-07-11T02:05:20,267 session = Session(ip, port_, username_, password_) 2022-07-11T02:05:20,267 session.open(False) 2022-07-11T02:05:20,267 zone = session.get_time_zone() 2022-07-11T02:05:20,268 session.close() 2022-07-11T02:05:20,268 ``` 2022-07-11T02:05:20,269 ### Tests 2022-07-11T02:05:20,270 Please add your custom tests in `tests` folder. 2022-07-11T02:05:20,270 To run all defined tests just type `pytest .` in the root folder. 2022-07-11T02:05:20,271 **Notice** Some tests need docker to be started on your system as a test instance is started in a docker container using [testcontainers](https://testcontainers-python.readthedocs.io/en/latest/index.html). 2022-07-11T02:05:20,272 ### Futher Tools 2022-07-11T02:05:20,273 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2022-07-11T02:05:20,273 Both can be run by `black .` or `flake8 .` respectively. 2022-07-11T02:05:20,274 ## Releasing 2022-07-11T02:05:20,275 To do a release just ensure that you have the right set of generated thrift files. 2022-07-11T02:05:20,275 Then run linting and auto-formatting. 2022-07-11T02:05:20,275 Then, ensure that all tests work (via `pytest .`). 2022-07-11T02:05:20,275 Then you are good to go to do a release! 2022-07-11T02:05:20,277 ### Preparing your environment 2022-07-11T02:05:20,277 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2022-07-11T02:05:20,278 ### Doing the Release 2022-07-11T02:05:20,279 There is a convenient script `release.sh` to do all steps for a release. 2022-07-11T02:05:20,279 Namely, these are 2022-07-11T02:05:20,280 * Remove all transient directories from last release (if exists) 2022-07-11T02:05:20,280 * (Re-)generate all generated sources via mvn 2022-07-11T02:05:20,281 * Run Linting (flake8) 2022-07-11T02:05:20,281 * Run Tests via pytest 2022-07-11T02:05:20,281 * Build 2022-07-11T02:05:20,281 * Release to pypi 2022-07-11T02:05:25,208 running dist_info 2022-07-11T02:05:25,876 creating /tmp/pip-modern-metadata-apae2fp7/apache_iotdb.egg-info 2022-07-11T02:05:26,516 writing /tmp/pip-modern-metadata-apae2fp7/apache_iotdb.egg-info/PKG-INFO 2022-07-11T02:05:27,122 writing dependency_links to /tmp/pip-modern-metadata-apae2fp7/apache_iotdb.egg-info/dependency_links.txt 2022-07-11T02:05:28,927 writing entry points to /tmp/pip-modern-metadata-apae2fp7/apache_iotdb.egg-info/entry_points.txt 2022-07-11T02:05:30,128 writing requirements to /tmp/pip-modern-metadata-apae2fp7/apache_iotdb.egg-info/requires.txt 2022-07-11T02:05:30,729 writing top-level names to /tmp/pip-modern-metadata-apae2fp7/apache_iotdb.egg-info/top_level.txt 2022-07-11T02:05:30,732 writing manifest file '/tmp/pip-modern-metadata-apae2fp7/apache_iotdb.egg-info/SOURCES.txt' 2022-07-11T02:05:31,495 reading manifest file '/tmp/pip-modern-metadata-apae2fp7/apache_iotdb.egg-info/SOURCES.txt' 2022-07-11T02:05:31,499 adding license file 'LICENSE' 2022-07-11T02:05:31,508 writing manifest file '/tmp/pip-modern-metadata-apae2fp7/apache_iotdb.egg-info/SOURCES.txt' 2022-07-11T02:05:31,511 creating '/tmp/pip-modern-metadata-apae2fp7/apache_iotdb-0.14.0rc1.dist-info' 2022-07-11T02:05:31,761 adding license file "LICENSE" (matched pattern "LICEN[CS]E*") 2022-07-11T02:05:31,774 /usr/local/lib/python3.7/dist-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'website' 2022-07-11T02:05:31,775 warnings.warn(msg) 2022-07-11T02:05:31,775 /usr/local/lib/python3.7/dist-packages/setuptools/dist.py:531: UserWarning: Normalizing '0.14.0preview1' to '0.14.0rc1' 2022-07-11T02:05:31,775 warnings.warn(tmpl.format(**locals())) 2022-07-11T02:05:32,004 Preparing metadata (pyproject.toml): finished with status 'done' 2022-07-11T02:05:32,022 Source in /tmp/pip-wheel-gloextgq/apache-iotdb_a919616cde65475f824283560c126e64 has version 0.14.0rc1, which satisfies requirement apache-iotdb==0.14.0rc1 from https://files.pythonhosted.org/packages/bb/7d/24cefdcd57e96d496fd3492fc28b3d53da6ba0fc6ee69f99dddec1cf500c/apache-iotdb-0.14.0rc1.tar.gz#sha256=c769d5fa5ff2ad1c9a0db2a72edead9f6e6c3f6389b7e91eb82508462a8f95a1 2022-07-11T02:05:32,025 Removed apache-iotdb==0.14.0rc1 from https://files.pythonhosted.org/packages/bb/7d/24cefdcd57e96d496fd3492fc28b3d53da6ba0fc6ee69f99dddec1cf500c/apache-iotdb-0.14.0rc1.tar.gz#sha256=c769d5fa5ff2ad1c9a0db2a72edead9f6e6c3f6389b7e91eb82508462a8f95a1 from build tracker '/tmp/pip-build-tracker-qd4ov5yh' 2022-07-11T02:05:32,043 Created temporary directory: /tmp/pip-unpack-4_ok1t46 2022-07-11T02:05:32,044 Building wheels for collected packages: apache-iotdb 2022-07-11T02:05:32,055 Created temporary directory: /tmp/pip-wheel-0xwhcbqk 2022-07-11T02:05:32,055 Destination directory: /tmp/pip-wheel-0xwhcbqk 2022-07-11T02:05:32,061 Building wheel for apache-iotdb (pyproject.toml): started 2022-07-11T02:05:32,063 Running command Building wheel for apache-iotdb (pyproject.toml) 2022-07-11T02:05:33,909 2022-07-11T02:05:33,918 # Apache IoTDB 2022-07-11T02:05:33,919 [![Main Mac and Linux](https://github.com/apache/iotdb/actions/workflows/main-unix.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-unix.yml) 2022-07-11T02:05:33,919 [![Main Win](https://github.com/apache/iotdb/actions/workflows/main-win.yml/badge.svg)](https://github.com/apache/iotdb/actions/workflows/main-win.yml) 2022-07-11T02:05:33,920 [![coveralls](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master) 2022-07-11T02:05:33,920 [![GitHub release](https://img.shields.io/github/release/apache/iotdb.svg)](https://github.com/apache/iotdb/releases) 2022-07-11T02:05:33,920 [![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) 2022-07-11T02:05:33,921 ![](https://github-size-badge.herokuapp.com/apache/iotdb.svg) 2022-07-11T02:05:33,921 ![](https://img.shields.io/github/downloads/apache/iotdb/total.svg) 2022-07-11T02:05:33,922 ![](https://img.shields.io/badge/platform-win10%20%7C%20macox%20%7C%20linux-yellow.svg) 2022-07-11T02:05:33,922 ![](https://img.shields.io/badge/java--language-1.8-blue.svg) 2022-07-11T02:05:33,922 [![IoTDB Website](https://img.shields.io/website-up-down-green-red/https/shields.io.svg?label=iotdb-website)](https://iotdb.apache.org/) 2022-07-11T02:05:33,923 Apache IoTDB (Database for Internet of Things) is an IoT native database with high performance for 2022-07-11T02:05:33,924 data management and analysis, deployable on the edge and the cloud. Due to its light-weight 2022-07-11T02:05:33,924 architecture, high performance and rich feature set together with its deep integration with 2022-07-11T02:05:33,924 Apache Hadoop, Spark and Flink, Apache IoTDB can meet the requirements of massive data storage, 2022-07-11T02:05:33,925 high-speed data ingestion and complex data analysis in the IoT industrial fields. 2022-07-11T02:05:33,925 ## Python Native API 2022-07-11T02:05:33,926 ### Requirements 2022-07-11T02:05:33,927 You have to install thrift (>=0.13) before using the package. 2022-07-11T02:05:33,928 ### How to use (Example) 2022-07-11T02:05:33,929 First, download the latest package: `pip3 install apache-iotdb` 2022-07-11T02:05:33,930 *Notice: If you are installing Python API v0.13.0, DO NOT install by `pip install apache-iotdb==0.13.0`, use `pip install apache-iotdb==0.13.0.post1` instead!* 2022-07-11T02:05:33,931 You can get an example of using the package to read and write data at here: [Example](https://github.com/apache/iotdb/blob/master/client-py/SessionExample.py) 2022-07-11T02:05:33,931 An example of aligned timeseries: [Aligned Timeseries Session Example](https://github.com/apache/iotdb/blob/master/client-py/SessionAlignedTimeseriesExample.py) 2022-07-11T02:05:33,932 (you need to add `import iotdb` in the head of the file) 2022-07-11T02:05:33,933 Or: 2022-07-11T02:05:33,933 ```python 2022-07-11T02:05:33,934 from iotdb.Session import Session 2022-07-11T02:05:33,934 ip = "127.0.0.1" 2022-07-11T02:05:33,935 port_ = "6667" 2022-07-11T02:05:33,935 username_ = "root" 2022-07-11T02:05:33,935 password_ = "root" 2022-07-11T02:05:33,935 session = Session(ip, port_, username_, password_) 2022-07-11T02:05:33,936 session.open(False) 2022-07-11T02:05:33,936 zone = session.get_time_zone() 2022-07-11T02:05:33,936 session.close() 2022-07-11T02:05:33,937 ``` 2022-07-11T02:05:33,937 ### Initialization 2022-07-11T02:05:33,938 * Initialize a Session 2022-07-11T02:05:33,938 ```python 2022-07-11T02:05:33,939 session = Session(ip, port_, username_, password_, fetch_size=1024, zone_id="UTC+8") 2022-07-11T02:05:33,939 ``` 2022-07-11T02:05:33,939 * Open a session, with a parameter to specify whether to enable RPC compression 2022-07-11T02:05:33,940 ```python 2022-07-11T02:05:33,940 session.open(enable_rpc_compression=False) 2022-07-11T02:05:33,941 ``` 2022-07-11T02:05:33,941 Notice: this RPC compression status of client must comply with that of IoTDB server 2022-07-11T02:05:33,942 * Close a Session 2022-07-11T02:05:33,943 ```python 2022-07-11T02:05:33,943 session.close() 2022-07-11T02:05:33,944 ``` 2022-07-11T02:05:33,944 ### Data Definition Interface (DDL Interface) 2022-07-11T02:05:33,945 #### Storage Group Management 2022-07-11T02:05:33,946 * Set storage group 2022-07-11T02:05:33,946 ```python 2022-07-11T02:05:33,947 session.set_storage_group(group_name) 2022-07-11T02:05:33,947 ``` 2022-07-11T02:05:33,948 * Delete one or several storage groups 2022-07-11T02:05:33,948 ```python 2022-07-11T02:05:33,948 session.delete_storage_group(group_name) 2022-07-11T02:05:33,949 session.delete_storage_groups(group_name_lst) 2022-07-11T02:05:33,949 ``` 2022-07-11T02:05:33,950 #### Timeseries Management 2022-07-11T02:05:33,950 * Create one or multiple timeseries 2022-07-11T02:05:33,951 ```python 2022-07-11T02:05:33,951 session.create_time_series(ts_path, data_type, encoding, compressor, 2022-07-11T02:05:33,951 props=None, tags=None, attributes=None, alias=None) 2022-07-11T02:05:33,952 session.create_multi_time_series( 2022-07-11T02:05:33,953 ts_path_lst, data_type_lst, encoding_lst, compressor_lst, 2022-07-11T02:05:33,953 props_lst=None, tags_lst=None, attributes_lst=None, alias_lst=None 2022-07-11T02:05:33,953 ) 2022-07-11T02:05:33,953 ``` 2022-07-11T02:05:33,954 * Create aligned timeseries 2022-07-11T02:05:33,955 ```python 2022-07-11T02:05:33,955 session.create_aligned_time_series( 2022-07-11T02:05:33,955 device_id, measurements_lst, data_type_lst, encoding_lst, compressor_lst 2022-07-11T02:05:33,956 ) 2022-07-11T02:05:33,956 ``` 2022-07-11T02:05:33,957 Attention: Alias of measurements are **not supported** currently. 2022-07-11T02:05:33,957 * Delete one or several timeseries 2022-07-11T02:05:33,958 ```python 2022-07-11T02:05:33,958 session.delete_time_series(paths_list) 2022-07-11T02:05:33,959 ``` 2022-07-11T02:05:33,959 * Check whether the specific timeseries exists 2022-07-11T02:05:33,960 ```python 2022-07-11T02:05:33,960 session.check_time_series_exists(path) 2022-07-11T02:05:33,961 ``` 2022-07-11T02:05:33,961 ### Data Manipulation Interface (DML Interface) 2022-07-11T02:05:33,962 #### Insert 2022-07-11T02:05:33,962 It is recommended to use insertTablet to help improve write efficiency. 2022-07-11T02:05:33,963 * Insert a Tablet,which is multiple rows of a device, each row has the same measurements 2022-07-11T02:05:33,963 * **Better Write Performance** 2022-07-11T02:05:33,964 * **Support null values**: fill the null value with any value, and then mark the null value via BitMap (from v0.13) 2022-07-11T02:05:33,965 We have two implementations of Tablet in Python API. 2022-07-11T02:05:33,965 * Normal Tablet 2022-07-11T02:05:33,966 ```python 2022-07-11T02:05:33,966 values_ = [ 2022-07-11T02:05:33,966 [False, 10, 11, 1.1, 10011.1, "test01"], 2022-07-11T02:05:33,967 [True, 100, 11111, 1.25, 101.0, "test02"], 2022-07-11T02:05:33,967 [False, 100, 1, 188.1, 688.25, "test03"], 2022-07-11T02:05:33,967 [True, 0, 0, 0, 6.25, "test04"], 2022-07-11T02:05:33,968 ] 2022-07-11T02:05:33,968 timestamps_ = [1, 2, 3, 4] 2022-07-11T02:05:33,968 tablet_ = Tablet( 2022-07-11T02:05:33,969 device_id, measurements_, data_types_, values_, timestamps_ 2022-07-11T02:05:33,969 ) 2022-07-11T02:05:33,969 session.insert_tablet(tablet_) 2022-07-11T02:05:33,970 ``` 2022-07-11T02:05:33,970 * Numpy Tablet 2022-07-11T02:05:33,971 Comparing with Tablet, Numpy Tablet is using [numpy.ndarray](https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html) to record data. 2022-07-11T02:05:33,971 With less memory footprint and time cost of serialization, the insert performance will be better. 2022-07-11T02:05:33,972 **Notice** 2022-07-11T02:05:33,972 1. time and value columns in Tablet are ndarray. 2022-07-11T02:05:33,972 2. recommended to use the specific dtypes to each ndarray, see the example below 2022-07-11T02:05:33,973 (if not, the default dtypes are also ok). 2022-07-11T02:05:33,973 ```python 2022-07-11T02:05:33,974 data_types_ = [ 2022-07-11T02:05:33,974 TSDataType.BOOLEAN, 2022-07-11T02:05:33,974 TSDataType.INT32, 2022-07-11T02:05:33,975 TSDataType.INT64, 2022-07-11T02:05:33,975 TSDataType.FLOAT, 2022-07-11T02:05:33,975 TSDataType.DOUBLE, 2022-07-11T02:05:33,976 TSDataType.TEXT, 2022-07-11T02:05:33,976 ] 2022-07-11T02:05:33,976 np_values_ = [ 2022-07-11T02:05:33,977 np.array([False, True, False, True], TSDataType.BOOLEAN.np_dtype()), 2022-07-11T02:05:33,977 np.array([10, 100, 100, 0], TSDataType.INT32.np_dtype()), 2022-07-11T02:05:33,977 np.array([11, 11111, 1, 0], TSDataType.INT64.np_dtype()), 2022-07-11T02:05:33,977 np.array([1.1, 1.25, 188.1, 0], TSDataType.FLOAT.np_dtype()), 2022-07-11T02:05:33,978 np.array([10011.1, 101.0, 688.25, 6.25], TSDataType.DOUBLE.np_dtype()), 2022-07-11T02:05:33,978 np.array(["test01", "test02", "test03", "test04"], TSDataType.TEXT.np_dtype()), 2022-07-11T02:05:33,978 ] 2022-07-11T02:05:33,979 np_timestamps_ = np.array([1, 2, 3, 4], TSDataType.INT64.np_dtype()) 2022-07-11T02:05:33,979 np_tablet_ = NumpyTablet( 2022-07-11T02:05:33,980 "root.sg_test_01.d_02", measurements_, data_types_, np_values_, np_timestamps_ 2022-07-11T02:05:33,980 ) 2022-07-11T02:05:33,980 session.insert_tablet(np_tablet_) 2022-07-11T02:05:33,981 ``` 2022-07-11T02:05:33,981 * Insert multiple Tablets 2022-07-11T02:05:33,982 ```python 2022-07-11T02:05:33,982 session.insert_tablets(tablet_lst) 2022-07-11T02:05:33,982 ``` 2022-07-11T02:05:33,983 * Insert a Record 2022-07-11T02:05:33,984 ```python 2022-07-11T02:05:33,984 session.insert_record(device_id, timestamp, measurements_, data_types_, values_) 2022-07-11T02:05:33,984 ``` 2022-07-11T02:05:33,985 * Insert multiple Records 2022-07-11T02:05:33,986 ```python 2022-07-11T02:05:33,986 session.insert_records( 2022-07-11T02:05:33,986 device_ids_, time_list_, measurements_list_, data_type_list_, values_list_ 2022-07-11T02:05:33,987 ) 2022-07-11T02:05:33,987 ``` 2022-07-11T02:05:33,988 * Insert multiple Records that belong to the same device. 2022-07-11T02:05:33,988 With type info the server has no need to do type inference, which leads a better performance 2022-07-11T02:05:33,989 ```python 2022-07-11T02:05:33,990 session.insert_records_of_one_device(device_id, time_list, measurements_list, data_types_list, values_list) 2022-07-11T02:05:33,990 ``` 2022-07-11T02:05:33,991 #### Insert with type inference 2022-07-11T02:05:33,991 When the data is of String type, we can use the following interface to perform type inference based on the value of the value itself. For example, if value is "true" , it can be automatically inferred to be a boolean type. If value is "3.2" , it can be automatically inferred as a flout type. Without type information, server has to do type inference, which may cost some time. 2022-07-11T02:05:33,992 * Insert a Record, which contains multiple measurement value of a device at a timestamp 2022-07-11T02:05:33,992 ```python 2022-07-11T02:05:33,993 session.insert_str_record(device_id, timestamp, measurements, string_values) 2022-07-11T02:05:33,993 ``` 2022-07-11T02:05:33,994 #### Insert of Aligned Timeseries 2022-07-11T02:05:33,995 The Insert of aligned timeseries uses interfaces like insert_aligned_XXX, and others are similar to the above interfaces: 2022-07-11T02:05:33,996 * insert_aligned_record 2022-07-11T02:05:33,996 * insert_aligned_records 2022-07-11T02:05:33,996 * insert_aligned_records_of_one_device 2022-07-11T02:05:33,996 * insert_aligned_tablet 2022-07-11T02:05:33,997 * insert_aligned_tablets 2022-07-11T02:05:33,998 ### IoTDB-SQL Interface 2022-07-11T02:05:33,998 * Execute query statement 2022-07-11T02:05:33,999 ```python 2022-07-11T02:05:33,999 session.execute_query_statement(sql) 2022-07-11T02:05:34,000 ``` 2022-07-11T02:05:34,000 * Execute non query statement 2022-07-11T02:05:34,001 ```python 2022-07-11T02:05:34,001 session.execute_non_query_statement(sql) 2022-07-11T02:05:34,001 ``` 2022-07-11T02:05:34,002 * Execute statement 2022-07-11T02:05:34,003 ```python 2022-07-11T02:05:34,003 session.execute_statement(sql) 2022-07-11T02:05:34,004 ``` 2022-07-11T02:05:34,004 ### Schema Template 2022-07-11T02:05:34,005 #### Create Schema Template 2022-07-11T02:05:34,005 The step for creating a metadata template is as follows 2022-07-11T02:05:34,005 1. Create the template class 2022-07-11T02:05:34,005 2. Adding child Node,InternalNode and MeasurementNode can be chose 2022-07-11T02:05:34,006 3. Execute create schema template function 2022-07-11T02:05:34,006 ```python 2022-07-11T02:05:34,007 template = Template(name=template_name, share_time=True) 2022-07-11T02:05:34,007 i_node_gps = InternalNode(name="GPS", share_time=False) 2022-07-11T02:05:34,007 i_node_v = InternalNode(name="vehicle", share_time=True) 2022-07-11T02:05:34,008 m_node_x = MeasurementNode("x", TSDataType.FLOAT, TSEncoding.RLE, Compressor.SNAPPY) 2022-07-11T02:05:34,008 i_node_gps.add_child(m_node_x) 2022-07-11T02:05:34,009 i_node_v.add_child(m_node_x) 2022-07-11T02:05:34,010 template.add_template(i_node_gps) 2022-07-11T02:05:34,010 template.add_template(i_node_v) 2022-07-11T02:05:34,010 template.add_template(m_node_x) 2022-07-11T02:05:34,011 session.create_schema_template(template) 2022-07-11T02:05:34,011 ``` 2022-07-11T02:05:34,012 #### Modify Schema Template nodes 2022-07-11T02:05:34,012 Modify nodes in a template, the template must be already created. These are functions that add or delete some measurement nodes. 2022-07-11T02:05:34,012 * add node in template 2022-07-11T02:05:34,012 ```python 2022-07-11T02:05:34,013 session.add_measurements_in_template(template_name, measurements_path, data_types, encodings, compressors, is_aligned) 2022-07-11T02:05:34,013 ``` 2022-07-11T02:05:34,014 * delete node in template 2022-07-11T02:05:34,014 ```python 2022-07-11T02:05:34,014 session.delete_node_in_template(template_name, path) 2022-07-11T02:05:34,015 ``` 2022-07-11T02:05:34,015 #### Set Schema Template 2022-07-11T02:05:34,016 ```python 2022-07-11T02:05:34,016 session.set_schema_template(template_name, prefix_path) 2022-07-11T02:05:34,016 ``` 2022-07-11T02:05:34,017 #### Uset Schema Template 2022-07-11T02:05:34,018 ```python 2022-07-11T02:05:34,018 session.unset_schema_template(template_name, prefix_path) 2022-07-11T02:05:34,018 ``` 2022-07-11T02:05:34,019 #### Show Schema Template 2022-07-11T02:05:34,019 * Show all schema templates 2022-07-11T02:05:34,019 ```python 2022-07-11T02:05:34,020 session.show_all_templates() 2022-07-11T02:05:34,020 ``` 2022-07-11T02:05:34,020 * Count all nodes in templates 2022-07-11T02:05:34,021 ```python 2022-07-11T02:05:34,021 session.count_measurements_in_template(template_name) 2022-07-11T02:05:34,021 ``` 2022-07-11T02:05:34,022 * Judge whether the path is measurement or not in templates, This measurement must be in the template 2022-07-11T02:05:34,022 ```python 2022-07-11T02:05:34,023 session.count_measurements_in_template(template_name, path) 2022-07-11T02:05:34,023 ``` 2022-07-11T02:05:34,024 * Judge whether the path is exist or not in templates, This path may not belong to the template 2022-07-11T02:05:34,024 ```python 2022-07-11T02:05:34,024 session.is_path_exist_in_template(template_name, path) 2022-07-11T02:05:34,025 ``` 2022-07-11T02:05:34,025 * Show nodes under in schema template 2022-07-11T02:05:34,026 ```python 2022-07-11T02:05:34,026 session.show_measurements_in_template(template_name) 2022-07-11T02:05:34,026 ``` 2022-07-11T02:05:34,027 * Show the path prefix where a schema template is set 2022-07-11T02:05:34,027 ```python 2022-07-11T02:05:34,028 session.show_paths_template_set_on(template_name) 2022-07-11T02:05:34,028 ``` 2022-07-11T02:05:34,029 * Show the path prefix where a schema template is used (i.e. the time series has been created) 2022-07-11T02:05:34,029 ```python 2022-07-11T02:05:34,029 session.show_paths_template_using_on(template_name) 2022-07-11T02:05:34,030 ``` 2022-07-11T02:05:34,031 #### Drop Schema Template 2022-07-11T02:05:34,031 Delete an existing metadata template,dropping an already set template is not supported 2022-07-11T02:05:34,031 ```python 2022-07-11T02:05:34,032 session.drop_schema_template("template_python") 2022-07-11T02:05:34,032 ``` 2022-07-11T02:05:34,033 ### Pandas Support 2022-07-11T02:05:34,034 To easily transform a query result to a [Pandas Dataframe](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html) 2022-07-11T02:05:34,034 the SessionDataSet has a method `.todf()` which consumes the dataset and transforms it to a pandas dataframe. 2022-07-11T02:05:34,035 Example: 2022-07-11T02:05:34,035 ```python 2022-07-11T02:05:34,036 from iotdb.Session import Session 2022-07-11T02:05:34,036 ip = "127.0.0.1" 2022-07-11T02:05:34,037 port_ = "6667" 2022-07-11T02:05:34,037 username_ = "root" 2022-07-11T02:05:34,037 password_ = "root" 2022-07-11T02:05:34,038 session = Session(ip, port_, username_, password_) 2022-07-11T02:05:34,038 session.open(False) 2022-07-11T02:05:34,038 result = session.execute_query_statement("SELECT * FROM root.*") 2022-07-11T02:05:34,039 # Transform to Pandas Dataset 2022-07-11T02:05:34,039 df = result.todf() 2022-07-11T02:05:34,040 session.close() 2022-07-11T02:05:34,040 # Now you can work with the dataframe 2022-07-11T02:05:34,041 df = ... 2022-07-11T02:05:34,041 ``` 2022-07-11T02:05:34,042 ### IoTDB Testcontainer 2022-07-11T02:05:34,043 The Test Support is based on the lib `testcontainers` (https://testcontainers-python.readthedocs.io/en/latest/index.html) which you need to install in your project if you want to use the feature. 2022-07-11T02:05:34,044 To start (and stop) an IoTDB Database in a Docker container simply do: 2022-07-11T02:05:34,044 ```python 2022-07-11T02:05:34,044 class MyTestCase(unittest.TestCase): 2022-07-11T02:05:34,045 def test_something(self): 2022-07-11T02:05:34,045 with IoTDBContainer() as c: 2022-07-11T02:05:34,045 session = Session("localhost", c.get_exposed_port(6667), "root", "root") 2022-07-11T02:05:34,046 session.open(False) 2022-07-11T02:05:34,046 result = session.execute_query_statement("SHOW TIMESERIES") 2022-07-11T02:05:34,046 print(result) 2022-07-11T02:05:34,046 session.close() 2022-07-11T02:05:34,047 ``` 2022-07-11T02:05:34,047 by default it will load the image `apache/iotdb:latest`, if you want a specific version just pass it like e.g. `IoTDBContainer("apache/iotdb:0.12.0")` to get version `0.12.0` running. 2022-07-11T02:05:34,048 ### IoTDB DBAPI 2022-07-11T02:05:34,049 IoTDB DBAPI implements the Python DB API 2.0 specification (https://peps.python.org/pep-0249/), which defines a common 2022-07-11T02:05:34,050 interface for accessing databases in Python. 2022-07-11T02:05:34,050 #### Examples 2022-07-11T02:05:34,050 + Initialization 2022-07-11T02:05:34,051 The initialized parameters are consistent with the session part (except for the sqlalchemy_mode). 2022-07-11T02:05:34,051 ```python 2022-07-11T02:05:34,052 from iotdb.dbapi import connect 2022-07-11T02:05:34,052 ip = "127.0.0.1" 2022-07-11T02:05:34,053 port_ = "6667" 2022-07-11T02:05:34,053 username_ = "root" 2022-07-11T02:05:34,053 password_ = "root" 2022-07-11T02:05:34,054 conn = connect(ip, port_, username_, password_,fetch_size=1024,zone_id="UTC+8",sqlalchemy_mode=False) 2022-07-11T02:05:34,054 cursor = conn.cursor() 2022-07-11T02:05:34,054 ``` 2022-07-11T02:05:34,054 + simple SQL statement execution 2022-07-11T02:05:34,055 ```python 2022-07-11T02:05:34,055 cursor.execute("SELECT * FROM root.*") 2022-07-11T02:05:34,056 for row in cursor.fetchall(): 2022-07-11T02:05:34,056 print(row) 2022-07-11T02:05:34,056 ``` 2022-07-11T02:05:34,057 + execute SQL with parameter 2022-07-11T02:05:34,057 IoTDB DBAPI supports pyformat style parameters 2022-07-11T02:05:34,058 ```python 2022-07-11T02:05:34,058 cursor.execute("SELECT * FROM root.* WHERE time < %(time)s",{"time":"2017-11-01T00:08:00.000"}) 2022-07-11T02:05:34,058 for row in cursor.fetchall(): 2022-07-11T02:05:34,059 print(row) 2022-07-11T02:05:34,059 ``` 2022-07-11T02:05:34,060 + execute SQL with parameter sequences 2022-07-11T02:05:34,060 ```python 2022-07-11T02:05:34,060 seq_of_parameters = [ 2022-07-11T02:05:34,061 {"timestamp": 1, "temperature": 1}, 2022-07-11T02:05:34,061 {"timestamp": 2, "temperature": 2}, 2022-07-11T02:05:34,061 {"timestamp": 3, "temperature": 3}, 2022-07-11T02:05:34,062 {"timestamp": 4, "temperature": 4}, 2022-07-11T02:05:34,062 {"timestamp": 5, "temperature": 5}, 2022-07-11T02:05:34,062 ] 2022-07-11T02:05:34,062 sql = "insert into root.cursor(timestamp,temperature) values(%(timestamp)s,%(temperature)s)" 2022-07-11T02:05:34,063 cursor.executemany(sql,seq_of_parameters) 2022-07-11T02:05:34,063 ``` 2022-07-11T02:05:34,063 + close the connection and cursor 2022-07-11T02:05:34,064 ```python 2022-07-11T02:05:34,064 cursor.close() 2022-07-11T02:05:34,064 conn.close() 2022-07-11T02:05:34,065 ``` 2022-07-11T02:05:34,065 ### IoTDB SQLAlchemy Dialect (Experimental) 2022-07-11T02:05:34,066 The SQLAlchemy dialect of IoTDB is written to adapt to Apache Superset. 2022-07-11T02:05:34,066 This part is still being improved. 2022-07-11T02:05:34,066 Please do not use it in the production environment! 2022-07-11T02:05:34,067 #### Mapping of the metadata 2022-07-11T02:05:34,067 The data model used by SQLAlchemy is a relational data model, which describes the relationships between different entities through tables. 2022-07-11T02:05:34,067 While the data model of IoTDB is a hierarchical data model, which organizes the data through a tree structure. 2022-07-11T02:05:34,067 In order to adapt IoTDB to the dialect of SQLAlchemy, the original data model in IoTDB needs to be reorganized. 2022-07-11T02:05:34,068 Converting the data model of IoTDB into the data model of SQLAlchemy. 2022-07-11T02:05:34,068 The metadata in the IoTDB are: 2022-07-11T02:05:34,069 1. Storage Group 2022-07-11T02:05:34,069 2. Path 2022-07-11T02:05:34,070 3. Entity 2022-07-11T02:05:34,070 4. Measurement 2022-07-11T02:05:34,070 The metadata in the SQLAlchemy are: 2022-07-11T02:05:34,071 1. Schema 2022-07-11T02:05:34,071 2. Table 2022-07-11T02:05:34,071 3. Column 2022-07-11T02:05:34,072 The mapping relationship between them is: 2022-07-11T02:05:34,073 | The metadata in the SQLAlchemy | The metadata in the IoTDB | 2022-07-11T02:05:34,073 | -------------------- | ---------------------------------------------- | 2022-07-11T02:05:34,073 | Schema | Storage Group | 2022-07-11T02:05:34,073 | Table | Path ( from storage group to entity ) + Entity | 2022-07-11T02:05:34,074 | Column | Measurement | 2022-07-11T02:05:34,074 The following figure shows the relationship between the two more intuitively: 2022-07-11T02:05:34,075 ![sqlalchemy-to-iotdb](https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/API/IoTDB-SQLAlchemy/sqlalchemy-to-iotdb.png?raw=true) 2022-07-11T02:05:34,075 #### Data type mapping 2022-07-11T02:05:34,076 | data type in IoTDB | data type in SQLAlchemy | 2022-07-11T02:05:34,076 |--------------------|-------------------------| 2022-07-11T02:05:34,076 | BOOLEAN | Boolean | 2022-07-11T02:05:34,077 | INT32 | Integer | 2022-07-11T02:05:34,077 | INT64 | BigInteger | 2022-07-11T02:05:34,077 | FLOAT | Float | 2022-07-11T02:05:34,078 | DOUBLE | Float | 2022-07-11T02:05:34,078 | TEXT | Text | 2022-07-11T02:05:34,078 | LONG | BigInteger | 2022-07-11T02:05:34,078 #### Example 2022-07-11T02:05:34,079 + execute statement 2022-07-11T02:05:34,080 ```python 2022-07-11T02:05:34,080 from sqlalchemy import create_engine 2022-07-11T02:05:34,081 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2022-07-11T02:05:34,081 connect = engine.connect() 2022-07-11T02:05:34,081 result = connect.execute("SELECT ** FROM root") 2022-07-11T02:05:34,082 for row in result.fetchall(): 2022-07-11T02:05:34,082 print(row) 2022-07-11T02:05:34,082 ``` 2022-07-11T02:05:34,083 + ORM (now only simple queries are supported) 2022-07-11T02:05:34,083 ```python 2022-07-11T02:05:34,084 from sqlalchemy import create_engine, Column, Float, BigInteger, MetaData 2022-07-11T02:05:34,084 from sqlalchemy.ext.declarative import declarative_base 2022-07-11T02:05:34,084 from sqlalchemy.orm import sessionmaker 2022-07-11T02:05:34,085 metadata = MetaData( 2022-07-11T02:05:34,085 schema='root.factory' 2022-07-11T02:05:34,086 ) 2022-07-11T02:05:34,086 Base = declarative_base(metadata=metadata) 2022-07-11T02:05:34,087 class Device(Base): 2022-07-11T02:05:34,087 __tablename__ = "room2.device1" 2022-07-11T02:05:34,087 Time = Column(BigInteger, primary_key=True) 2022-07-11T02:05:34,088 temperature = Column(Float) 2022-07-11T02:05:34,088 status = Column(Float) 2022-07-11T02:05:34,089 engine = create_engine("iotdb://root:root@127.0.0.1:6667") 2022-07-11T02:05:34,089 DbSession = sessionmaker(bind=engine) 2022-07-11T02:05:34,090 session = DbSession() 2022-07-11T02:05:34,090 res = session.query(Device.status).filter(Device.temperature > 1) 2022-07-11T02:05:34,091 for row in res: 2022-07-11T02:05:34,091 print(row) 2022-07-11T02:05:34,092 ``` 2022-07-11T02:05:34,092 ## Developers 2022-07-11T02:05:34,093 ### Introduction 2022-07-11T02:05:34,094 This is an example of how to connect to IoTDB with python, using the thrift rpc interfaces. Things are almost the same on Windows or Linux, but pay attention to the difference like path separator. 2022-07-11T02:05:34,095 ### Prerequisites 2022-07-11T02:05:34,095 Python3.7 or later is preferred. 2022-07-11T02:05:34,096 You have to install Thrift (0.11.0 or later) to compile our thrift file into python code. Below is the official tutorial of installation, eventually, you should have a thrift executable. 2022-07-11T02:05:34,096 ``` 2022-07-11T02:05:34,097 http://thrift.apache.org/docs/install/ 2022-07-11T02:05:34,097 ``` 2022-07-11T02:05:34,098 Before starting you need to install `requirements_dev.txt` in your python environment, e.g. by calling 2022-07-11T02:05:34,098 ```shell 2022-07-11T02:05:34,098 pip install -r requirements_dev.txt 2022-07-11T02:05:34,098 ``` 2022-07-11T02:05:34,100 ### Compile the thrift library and Debug 2022-07-11T02:05:34,100 In the root of IoTDB's source code folder, run `mvn clean generate-sources -pl client-py -am`. 2022-07-11T02:05:34,101 This will automatically delete and repopulate the folder `iotdb/thrift` with the generated thrift files. 2022-07-11T02:05:34,101 This folder is ignored from git and should **never be pushed to git!** 2022-07-11T02:05:34,102 **Notice** Do not upload `iotdb/thrift` to the git repo. 2022-07-11T02:05:34,103 ### Session Client & Example 2022-07-11T02:05:34,104 We packed up the Thrift interface in `client-py/src/iotdb/Session.py` (similar with its Java counterpart), also provided an example file `client-py/src/SessionExample.py` of how to use the session module. please read it carefully. 2022-07-11T02:05:34,105 Or, another simple example: 2022-07-11T02:05:34,105 ```python 2022-07-11T02:05:34,105 from iotdb.Session import Session 2022-07-11T02:05:34,106 ip = "127.0.0.1" 2022-07-11T02:05:34,106 port_ = "6667" 2022-07-11T02:05:34,107 username_ = "root" 2022-07-11T02:05:34,107 password_ = "root" 2022-07-11T02:05:34,107 session = Session(ip, port_, username_, password_) 2022-07-11T02:05:34,107 session.open(False) 2022-07-11T02:05:34,108 zone = session.get_time_zone() 2022-07-11T02:05:34,108 session.close() 2022-07-11T02:05:34,108 ``` 2022-07-11T02:05:34,110 ### Tests 2022-07-11T02:05:34,110 Please add your custom tests in `tests` folder. 2022-07-11T02:05:34,111 To run all defined tests just type `pytest .` in the root folder. 2022-07-11T02:05:34,111 **Notice** Some tests need docker to be started on your system as a test instance is started in a docker container using [testcontainers](https://testcontainers-python.readthedocs.io/en/latest/index.html). 2022-07-11T02:05:34,113 ### Futher Tools 2022-07-11T02:05:34,113 [black](https://pypi.org/project/black/) and [flake8](https://pypi.org/project/flake8/) are installed for autoformatting and linting. 2022-07-11T02:05:34,113 Both can be run by `black .` or `flake8 .` respectively. 2022-07-11T02:05:34,115 ## Releasing 2022-07-11T02:05:34,115 To do a release just ensure that you have the right set of generated thrift files. 2022-07-11T02:05:34,115 Then run linting and auto-formatting. 2022-07-11T02:05:34,116 Then, ensure that all tests work (via `pytest .`). 2022-07-11T02:05:34,116 Then you are good to go to do a release! 2022-07-11T02:05:34,117 ### Preparing your environment 2022-07-11T02:05:34,118 First, install all necessary dev dependencies via `pip install -r requirements_dev.txt`. 2022-07-11T02:05:34,119 ### Doing the Release 2022-07-11T02:05:34,119 There is a convenient script `release.sh` to do all steps for a release. 2022-07-11T02:05:34,120 Namely, these are 2022-07-11T02:05:34,120 * Remove all transient directories from last release (if exists) 2022-07-11T02:05:34,121 * (Re-)generate all generated sources via mvn 2022-07-11T02:05:34,121 * Run Linting (flake8) 2022-07-11T02:05:34,121 * Run Tests via pytest 2022-07-11T02:05:34,121 * Build 2022-07-11T02:05:34,122 * Release to pypi 2022-07-11T02:05:38,488 running bdist_wheel 2022-07-11T02:05:39,727 running build 2022-07-11T02:05:39,727 running build_py 2022-07-11T02:05:40,365 creating build 2022-07-11T02:05:40,365 creating build/lib 2022-07-11T02:05:40,367 creating build/lib/tests 2022-07-11T02:05:40,369 copying tests/test_aligned_timeseries.py -> build/lib/tests 2022-07-11T02:05:40,373 copying tests/test_one_device.py -> build/lib/tests 2022-07-11T02:05:40,378 copying tests/test_session.py -> build/lib/tests 2022-07-11T02:05:40,382 copying tests/__init__.py -> build/lib/tests 2022-07-11T02:05:40,385 copying tests/test_todf.py -> build/lib/tests 2022-07-11T02:05:40,389 copying tests/test_template.py -> build/lib/tests 2022-07-11T02:05:40,393 copying tests/tablet_performance_comparison.py -> build/lib/tests 2022-07-11T02:05:40,397 copying tests/test_tablet.py -> build/lib/tests 2022-07-11T02:05:40,401 copying tests/test_numpy_tablet.py -> build/lib/tests 2022-07-11T02:05:40,405 copying tests/test_dataframe.py -> build/lib/tests 2022-07-11T02:05:40,409 creating build/lib/iotdb 2022-07-11T02:05:40,411 copying iotdb/Session.py -> build/lib/iotdb 2022-07-11T02:05:40,418 copying iotdb/__init__.py -> build/lib/iotdb 2022-07-11T02:05:40,421 copying iotdb/IoTDBContainer.py -> build/lib/iotdb 2022-07-11T02:05:40,426 creating build/lib/iotdb/sqlalchemy 2022-07-11T02:05:40,427 copying iotdb/sqlalchemy/IoTDBSQLCompiler.py -> build/lib/iotdb/sqlalchemy 2022-07-11T02:05:40,432 copying iotdb/sqlalchemy/IoTDBTypeCompiler.py -> build/lib/iotdb/sqlalchemy 2022-07-11T02:05:40,435 copying iotdb/sqlalchemy/__init__.py -> build/lib/iotdb/sqlalchemy 2022-07-11T02:05:40,439 copying iotdb/sqlalchemy/IoTDBIdentifierPreparer.py -> build/lib/iotdb/sqlalchemy 2022-07-11T02:05:40,442 copying iotdb/sqlalchemy/IoTDBDialect.py -> build/lib/iotdb/sqlalchemy 2022-07-11T02:05:40,448 creating build/lib/iotdb/template 2022-07-11T02:05:40,449 copying iotdb/template/MeasurementNode.py -> build/lib/iotdb/template 2022-07-11T02:05:40,453 copying iotdb/template/TemplateQueryType.py -> build/lib/iotdb/template 2022-07-11T02:05:40,456 copying iotdb/template/TemplateNode.py -> build/lib/iotdb/template 2022-07-11T02:05:40,459 copying iotdb/template/Template.py -> build/lib/iotdb/template 2022-07-11T02:05:40,463 copying iotdb/template/__init__.py -> build/lib/iotdb/template 2022-07-11T02:05:40,467 copying iotdb/template/InternalNode.py -> build/lib/iotdb/template 2022-07-11T02:05:40,471 creating build/lib/iotdb/thrift 2022-07-11T02:05:40,474 copying iotdb/thrift/__init__.py -> build/lib/iotdb/thrift 2022-07-11T02:05:40,478 creating build/lib/iotdb/dbapi 2022-07-11T02:05:40,481 copying iotdb/dbapi/Cursor.py -> build/lib/iotdb/dbapi 2022-07-11T02:05:40,486 copying iotdb/dbapi/__init__.py -> build/lib/iotdb/dbapi 2022-07-11T02:05:40,490 copying iotdb/dbapi/Connection.py -> build/lib/iotdb/dbapi 2022-07-11T02:05:40,494 copying iotdb/dbapi/Exceptions.py -> build/lib/iotdb/dbapi 2022-07-11T02:05:40,500 creating build/lib/iotdb/utils 2022-07-11T02:05:40,502 copying iotdb/utils/SessionDataSet.py -> build/lib/iotdb/utils 2022-07-11T02:05:40,507 copying iotdb/utils/__init__.py -> build/lib/iotdb/utils 2022-07-11T02:05:40,511 copying iotdb/utils/NumpyTablet.py -> build/lib/iotdb/utils 2022-07-11T02:05:40,515 copying iotdb/utils/BitMap.py -> build/lib/iotdb/utils 2022-07-11T02:05:40,519 copying iotdb/utils/RowRecord.py -> build/lib/iotdb/utils 2022-07-11T02:05:40,523 copying iotdb/utils/Field.py -> build/lib/iotdb/utils 2022-07-11T02:05:40,526 copying iotdb/utils/IoTDBConstants.py -> build/lib/iotdb/utils 2022-07-11T02:05:40,530 copying iotdb/utils/Tablet.py -> build/lib/iotdb/utils 2022-07-11T02:05:40,534 copying iotdb/utils/IoTDBRpcDataSet.py -> build/lib/iotdb/utils 2022-07-11T02:05:40,539 creating build/lib/iotdb/tsfile 2022-07-11T02:05:40,540 copying iotdb/tsfile/__init__.py -> build/lib/iotdb/tsfile 2022-07-11T02:05:40,545 creating build/lib/iotdb/sqlalchemy/tests 2022-07-11T02:05:40,546 copying iotdb/sqlalchemy/tests/__init__.py -> build/lib/iotdb/sqlalchemy/tests 2022-07-11T02:05:40,549 copying iotdb/sqlalchemy/tests/test_dialect.py -> build/lib/iotdb/sqlalchemy/tests 2022-07-11T02:05:40,554 creating build/lib/iotdb/thrift/rpc 2022-07-11T02:05:40,555 copying iotdb/thrift/rpc/ttypes.py -> build/lib/iotdb/thrift/rpc 2022-07-11T02:05:40,571 copying iotdb/thrift/rpc/__init__.py -> build/lib/iotdb/thrift/rpc 2022-07-11T02:05:40,574 copying iotdb/thrift/rpc/IClientRPCService.py -> build/lib/iotdb/thrift/rpc 2022-07-11T02:05:40,593 copying iotdb/thrift/rpc/constants.py -> build/lib/iotdb/thrift/rpc 2022-07-11T02:05:40,598 creating build/lib/iotdb/thrift/common 2022-07-11T02:05:40,600 copying iotdb/thrift/common/ttypes.py -> build/lib/iotdb/thrift/common 2022-07-11T02:05:40,607 copying iotdb/thrift/common/__init__.py -> build/lib/iotdb/thrift/common 2022-07-11T02:05:40,611 copying iotdb/thrift/common/constants.py -> build/lib/iotdb/thrift/common 2022-07-11T02:05:40,616 creating build/lib/iotdb/dbapi/tests 2022-07-11T02:05:40,618 copying iotdb/dbapi/tests/__init__.py -> build/lib/iotdb/dbapi/tests 2022-07-11T02:05:40,622 copying iotdb/dbapi/tests/test_connection.py -> build/lib/iotdb/dbapi/tests 2022-07-11T02:05:40,626 copying iotdb/dbapi/tests/test_cursor.py -> build/lib/iotdb/dbapi/tests 2022-07-11T02:05:40,631 creating build/lib/iotdb/tsfile/utils 2022-07-11T02:05:40,633 copying iotdb/tsfile/utils/Pair.py -> build/lib/iotdb/tsfile/utils 2022-07-11T02:05:40,637 copying iotdb/tsfile/utils/__init__.py -> build/lib/iotdb/tsfile/utils 2022-07-11T02:05:40,641 copying iotdb/tsfile/utils/ReadWriteIOUtils.py -> build/lib/iotdb/tsfile/utils 2022-07-11T02:05:40,646 creating build/lib/iotdb/tsfile/common 2022-07-11T02:05:40,648 copying iotdb/tsfile/common/__init__.py -> build/lib/iotdb/tsfile/common 2022-07-11T02:05:40,653 creating build/lib/iotdb/tsfile/common/constant 2022-07-11T02:05:40,655 copying iotdb/tsfile/common/constant/__init__.py -> build/lib/iotdb/tsfile/common/constant 2022-07-11T02:05:40,659 copying iotdb/tsfile/common/constant/TsFileConstant.py -> build/lib/iotdb/tsfile/common/constant 2022-07-11T02:05:42,011 installing to build/bdist.linux-armv7l/wheel 2022-07-11T02:05:42,012 running install 2022-07-11T02:05:42,074 running install_lib 2022-07-11T02:05:42,712 creating build/bdist.linux-armv7l 2022-07-11T02:05:42,713 creating build/bdist.linux-armv7l/wheel 2022-07-11T02:05:42,717 creating build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,719 copying build/lib/tests/test_aligned_timeseries.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,725 copying build/lib/tests/test_one_device.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,730 copying build/lib/tests/test_session.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,735 copying build/lib/tests/__init__.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,740 copying build/lib/tests/test_todf.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,745 copying build/lib/tests/test_template.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,749 copying build/lib/tests/tablet_performance_comparison.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,755 copying build/lib/tests/test_tablet.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,759 copying build/lib/tests/test_numpy_tablet.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,764 copying build/lib/tests/test_dataframe.py -> build/bdist.linux-armv7l/wheel/tests 2022-07-11T02:05:42,770 creating build/bdist.linux-armv7l/wheel/iotdb 2022-07-11T02:05:42,773 creating build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2022-07-11T02:05:42,774 copying build/lib/iotdb/sqlalchemy/IoTDBSQLCompiler.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2022-07-11T02:05:42,779 copying build/lib/iotdb/sqlalchemy/IoTDBTypeCompiler.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2022-07-11T02:05:42,783 copying build/lib/iotdb/sqlalchemy/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2022-07-11T02:05:42,788 copying build/lib/iotdb/sqlalchemy/IoTDBIdentifierPreparer.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2022-07-11T02:05:42,793 creating build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy/tests 2022-07-11T02:05:42,795 copying build/lib/iotdb/sqlalchemy/tests/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy/tests 2022-07-11T02:05:42,800 copying build/lib/iotdb/sqlalchemy/tests/test_dialect.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy/tests 2022-07-11T02:05:42,804 copying build/lib/iotdb/sqlalchemy/IoTDBDialect.py -> build/bdist.linux-armv7l/wheel/iotdb/sqlalchemy 2022-07-11T02:05:42,810 creating build/bdist.linux-armv7l/wheel/iotdb/template 2022-07-11T02:05:42,812 copying build/lib/iotdb/template/MeasurementNode.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2022-07-11T02:05:42,817 copying build/lib/iotdb/template/TemplateQueryType.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2022-07-11T02:05:42,821 copying build/lib/iotdb/template/TemplateNode.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2022-07-11T02:05:42,825 copying build/lib/iotdb/template/Template.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2022-07-11T02:05:42,829 copying build/lib/iotdb/template/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2022-07-11T02:05:42,833 copying build/lib/iotdb/template/InternalNode.py -> build/bdist.linux-armv7l/wheel/iotdb/template 2022-07-11T02:05:42,836 copying build/lib/iotdb/Session.py -> build/bdist.linux-armv7l/wheel/iotdb 2022-07-11T02:05:42,842 copying build/lib/iotdb/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb 2022-07-11T02:05:42,847 creating build/bdist.linux-armv7l/wheel/iotdb/thrift 2022-07-11T02:05:42,849 copying build/lib/iotdb/thrift/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift 2022-07-11T02:05:42,854 creating build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-07-11T02:05:42,856 copying build/lib/iotdb/thrift/rpc/ttypes.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-07-11T02:05:42,872 copying build/lib/iotdb/thrift/rpc/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-07-11T02:05:42,875 copying build/lib/iotdb/thrift/rpc/IClientRPCService.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-07-11T02:05:42,894 copying build/lib/iotdb/thrift/rpc/constants.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/rpc 2022-07-11T02:05:42,898 creating build/bdist.linux-armv7l/wheel/iotdb/thrift/common 2022-07-11T02:05:42,899 copying build/lib/iotdb/thrift/common/ttypes.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/common 2022-07-11T02:05:42,905 copying build/lib/iotdb/thrift/common/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/common 2022-07-11T02:05:42,908 copying build/lib/iotdb/thrift/common/constants.py -> build/bdist.linux-armv7l/wheel/iotdb/thrift/common 2022-07-11T02:05:42,913 creating build/bdist.linux-armv7l/wheel/iotdb/dbapi 2022-07-11T02:05:42,914 copying build/lib/iotdb/dbapi/Cursor.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi 2022-07-11T02:05:42,918 copying build/lib/iotdb/dbapi/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi 2022-07-11T02:05:42,923 creating build/bdist.linux-armv7l/wheel/iotdb/dbapi/tests 2022-07-11T02:05:42,924 copying build/lib/iotdb/dbapi/tests/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi/tests 2022-07-11T02:05:42,928 copying build/lib/iotdb/dbapi/tests/test_connection.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi/tests 2022-07-11T02:05:42,931 copying build/lib/iotdb/dbapi/tests/test_cursor.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi/tests 2022-07-11T02:05:42,935 copying build/lib/iotdb/dbapi/Connection.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi 2022-07-11T02:05:42,938 copying build/lib/iotdb/dbapi/Exceptions.py -> build/bdist.linux-armv7l/wheel/iotdb/dbapi 2022-07-11T02:05:42,943 creating build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,944 copying build/lib/iotdb/utils/SessionDataSet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,948 copying build/lib/iotdb/utils/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,952 copying build/lib/iotdb/utils/NumpyTablet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,955 copying build/lib/iotdb/utils/BitMap.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,959 copying build/lib/iotdb/utils/RowRecord.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,962 copying build/lib/iotdb/utils/Field.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,966 copying build/lib/iotdb/utils/IoTDBConstants.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,969 copying build/lib/iotdb/utils/Tablet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,973 copying build/lib/iotdb/utils/IoTDBRpcDataSet.py -> build/bdist.linux-armv7l/wheel/iotdb/utils 2022-07-11T02:05:42,978 creating build/bdist.linux-armv7l/wheel/iotdb/tsfile 2022-07-11T02:05:42,980 copying build/lib/iotdb/tsfile/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile 2022-07-11T02:05:42,984 creating build/bdist.linux-armv7l/wheel/iotdb/tsfile/utils 2022-07-11T02:05:42,986 copying build/lib/iotdb/tsfile/utils/Pair.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/utils 2022-07-11T02:05:42,989 copying build/lib/iotdb/tsfile/utils/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/utils 2022-07-11T02:05:42,993 copying build/lib/iotdb/tsfile/utils/ReadWriteIOUtils.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/utils 2022-07-11T02:05:42,997 creating build/bdist.linux-armv7l/wheel/iotdb/tsfile/common 2022-07-11T02:05:42,999 creating build/bdist.linux-armv7l/wheel/iotdb/tsfile/common/constant 2022-07-11T02:05:43,001 copying build/lib/iotdb/tsfile/common/constant/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/common/constant 2022-07-11T02:05:43,005 copying build/lib/iotdb/tsfile/common/constant/TsFileConstant.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/common/constant 2022-07-11T02:05:43,008 copying build/lib/iotdb/tsfile/common/__init__.py -> build/bdist.linux-armv7l/wheel/iotdb/tsfile/common 2022-07-11T02:05:43,011 copying build/lib/iotdb/IoTDBContainer.py -> build/bdist.linux-armv7l/wheel/iotdb 2022-07-11T02:05:43,014 running install_egg_info 2022-07-11T02:05:44,331 running egg_info 2022-07-11T02:05:44,965 writing apache_iotdb.egg-info/PKG-INFO 2022-07-11T02:05:45,565 writing dependency_links to apache_iotdb.egg-info/dependency_links.txt 2022-07-11T02:05:47,349 writing entry points to apache_iotdb.egg-info/entry_points.txt 2022-07-11T02:05:48,540 writing requirements to apache_iotdb.egg-info/requires.txt 2022-07-11T02:05:49,136 writing top-level names to apache_iotdb.egg-info/top_level.txt 2022-07-11T02:05:49,199 reading manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2022-07-11T02:05:49,206 adding license file 'LICENSE' 2022-07-11T02:05:49,217 writing manifest file 'apache_iotdb.egg-info/SOURCES.txt' 2022-07-11T02:05:49,220 Copying apache_iotdb.egg-info to build/bdist.linux-armv7l/wheel/apache_iotdb-0.14.0rc1-py3.7.egg-info 2022-07-11T02:05:49,245 running install_scripts 2022-07-11T02:05:49,427 adding license file "LICENSE" (matched pattern "LICEN[CS]E*") 2022-07-11T02:05:49,437 creating build/bdist.linux-armv7l/wheel/apache_iotdb-0.14.0rc1.dist-info/WHEEL 2022-07-11T02:05:49,442 creating '/tmp/pip-wheel-0xwhcbqk/tmpbp1f801g/apache_iotdb-0.14.0rc1-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2022-07-11T02:05:49,450 adding 'iotdb/IoTDBContainer.py' 2022-07-11T02:05:49,463 adding 'iotdb/Session.py' 2022-07-11T02:05:49,467 adding 'iotdb/__init__.py' 2022-07-11T02:05:49,472 adding 'iotdb/dbapi/Connection.py' 2022-07-11T02:05:49,476 adding 'iotdb/dbapi/Cursor.py' 2022-07-11T02:05:49,479 adding 'iotdb/dbapi/Exceptions.py' 2022-07-11T02:05:49,482 adding 'iotdb/dbapi/__init__.py' 2022-07-11T02:05:49,485 adding 'iotdb/dbapi/tests/__init__.py' 2022-07-11T02:05:49,488 adding 'iotdb/dbapi/tests/test_connection.py' 2022-07-11T02:05:49,490 adding 'iotdb/dbapi/tests/test_cursor.py' 2022-07-11T02:05:49,494 adding 'iotdb/sqlalchemy/IoTDBDialect.py' 2022-07-11T02:05:49,497 adding 'iotdb/sqlalchemy/IoTDBIdentifierPreparer.py' 2022-07-11T02:05:49,500 adding 'iotdb/sqlalchemy/IoTDBSQLCompiler.py' 2022-07-11T02:05:49,503 adding 'iotdb/sqlalchemy/IoTDBTypeCompiler.py' 2022-07-11T02:05:49,505 adding 'iotdb/sqlalchemy/__init__.py' 2022-07-11T02:05:49,508 adding 'iotdb/sqlalchemy/tests/__init__.py' 2022-07-11T02:05:49,511 adding 'iotdb/sqlalchemy/tests/test_dialect.py' 2022-07-11T02:05:49,515 adding 'iotdb/template/InternalNode.py' 2022-07-11T02:05:49,517 adding 'iotdb/template/MeasurementNode.py' 2022-07-11T02:05:49,520 adding 'iotdb/template/Template.py' 2022-07-11T02:05:49,522 adding 'iotdb/template/TemplateNode.py' 2022-07-11T02:05:49,525 adding 'iotdb/template/TemplateQueryType.py' 2022-07-11T02:05:49,527 adding 'iotdb/template/__init__.py' 2022-07-11T02:05:49,530 adding 'iotdb/thrift/__init__.py' 2022-07-11T02:05:49,533 adding 'iotdb/thrift/common/__init__.py' 2022-07-11T02:05:49,535 adding 'iotdb/thrift/common/constants.py' 2022-07-11T02:05:49,541 adding 'iotdb/thrift/common/ttypes.py' 2022-07-11T02:05:49,568 adding 'iotdb/thrift/rpc/IClientRPCService.py' 2022-07-11T02:05:49,577 adding 'iotdb/thrift/rpc/__init__.py' 2022-07-11T02:05:49,579 adding 'iotdb/thrift/rpc/constants.py' 2022-07-11T02:05:49,606 adding 'iotdb/thrift/rpc/ttypes.py' 2022-07-11T02:05:49,614 adding 'iotdb/tsfile/__init__.py' 2022-07-11T02:05:49,618 adding 'iotdb/tsfile/common/__init__.py' 2022-07-11T02:05:49,621 adding 'iotdb/tsfile/common/constant/TsFileConstant.py' 2022-07-11T02:05:49,623 adding 'iotdb/tsfile/common/constant/__init__.py' 2022-07-11T02:05:49,627 adding 'iotdb/tsfile/utils/Pair.py' 2022-07-11T02:05:49,629 adding 'iotdb/tsfile/utils/ReadWriteIOUtils.py' 2022-07-11T02:05:49,632 adding 'iotdb/tsfile/utils/__init__.py' 2022-07-11T02:05:49,635 adding 'iotdb/utils/BitMap.py' 2022-07-11T02:05:49,638 adding 'iotdb/utils/Field.py' 2022-07-11T02:05:49,641 adding 'iotdb/utils/IoTDBConstants.py' 2022-07-11T02:05:49,646 adding 'iotdb/utils/IoTDBRpcDataSet.py' 2022-07-11T02:05:49,649 adding 'iotdb/utils/NumpyTablet.py' 2022-07-11T02:05:49,651 adding 'iotdb/utils/RowRecord.py' 2022-07-11T02:05:49,654 adding 'iotdb/utils/SessionDataSet.py' 2022-07-11T02:05:49,658 adding 'iotdb/utils/Tablet.py' 2022-07-11T02:05:49,660 adding 'iotdb/utils/__init__.py' 2022-07-11T02:05:49,664 adding 'tests/__init__.py' 2022-07-11T02:05:49,668 adding 'tests/tablet_performance_comparison.py' 2022-07-11T02:05:49,671 adding 'tests/test_aligned_timeseries.py' 2022-07-11T02:05:49,674 adding 'tests/test_dataframe.py' 2022-07-11T02:05:49,677 adding 'tests/test_numpy_tablet.py' 2022-07-11T02:05:49,680 adding 'tests/test_one_device.py' 2022-07-11T02:05:49,683 adding 'tests/test_session.py' 2022-07-11T02:05:49,686 adding 'tests/test_tablet.py' 2022-07-11T02:05:49,689 adding 'tests/test_template.py' 2022-07-11T02:05:49,693 adding 'tests/test_todf.py' 2022-07-11T02:05:49,697 adding 'apache_iotdb-0.14.0rc1.dist-info/LICENSE' 2022-07-11T02:05:49,704 adding 'apache_iotdb-0.14.0rc1.dist-info/METADATA' 2022-07-11T02:05:49,706 adding 'apache_iotdb-0.14.0rc1.dist-info/WHEEL' 2022-07-11T02:05:49,708 adding 'apache_iotdb-0.14.0rc1.dist-info/entry_points.txt' 2022-07-11T02:05:49,709 adding 'apache_iotdb-0.14.0rc1.dist-info/top_level.txt' 2022-07-11T02:05:49,713 adding 'apache_iotdb-0.14.0rc1.dist-info/RECORD' 2022-07-11T02:05:49,720 removing build/bdist.linux-armv7l/wheel 2022-07-11T02:05:49,765 /usr/local/lib/python3.7/dist-packages/setuptools/_distutils/dist.py:275: UserWarning: Unknown distribution option: 'website' 2022-07-11T02:05:49,766 warnings.warn(msg) 2022-07-11T02:05:49,766 /usr/local/lib/python3.7/dist-packages/setuptools/dist.py:531: UserWarning: Normalizing '0.14.0preview1' to '0.14.0rc1' 2022-07-11T02:05:49,767 warnings.warn(tmpl.format(**locals())) 2022-07-11T02:05:50,026 Building wheel for apache-iotdb (pyproject.toml): finished with status 'done' 2022-07-11T02:05:50,045 Created wheel for apache-iotdb: filename=apache_iotdb-0.14.0rc1-py3-none-any.whl size=114030 sha256=2f71e6b3443c4748717889729380082daa7bd8f9950d4c17909134372367bccc 2022-07-11T02:05:50,047 Stored in directory: /tmp/pip-ephem-wheel-cache-e0gifqdw/wheels/ce/05/2e/c0392c8239a81e716f39609b3c8b791e315698aaf0eeae2d23 2022-07-11T02:05:50,081 Successfully built apache-iotdb 2022-07-11T02:05:50,097 Removed build tracker: '/tmp/pip-build-tracker-qd4ov5yh'