Skip to content

Commit

Permalink
Merge pull request #50 from Bugazelle/dev
Browse files Browse the repository at this point in the history
[Fix] Fix -v issue
  • Loading branch information
Bugazelle authored Mar 14, 2022
2 parents 2dd2cbb + 9b86ed7 commit a2da7ad
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ timestamp,url,response_time
<pre>export_csv_to_influx \<br> --csv demo.csv \<br> --dbname demo \<br> --measurement demo \<br> --tag_columns url \<br> --field_columns response_time \<br> --user admin \<br> --password admin \<br> --server 127.0.0.1:8086 \<br> --drop_database=True<br></pre>
</td>
<td style="border-color:inherit;border-style:solid;border-width:1px;font-family:Arial, sans-serif;font-size:14px;overflow:hidden;padding:10px 5px;text-align:left;vertical-align:top;word-break:normal">
<pre> // The Read/Write API Token cannot create database. Before you using the --drop_database, make sure your toke have the access <br> // See the bug here: https://github.com/influxdata/influxdb/issues/23170 <br> export_csv_to_influx \<br> --csv demo.csv \<br> --org my-org \<br> --bucket my-bucket \<br> --measurement demo \<br> --tag_columns url \<br> --field_columns response_time \<br> --token YourToken \<br> --server 127.0.0.1:8086 \<br> --drop_database=True<br></pre>
<pre> // The Read/Write API Token cannot create bucket. Before you using the --drop_database, make sure your toke have the access <br> // See the bug here: https://github.com/influxdata/influxdb/issues/23170 <br> export_csv_to_influx \<br> --csv demo.csv \<br> --org my-org \<br> --bucket my-bucket \<br> --measurement demo \<br> --tag_columns url \<br> --field_columns response_time \<br> --token YourToken \<br> --server 127.0.0.1:8086 \<br> --drop_database=True<br></pre>
</td>
</tr>
<tr>
Expand Down
2 changes: 2 additions & 0 deletions src/ExportCsvToInflux/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
from .exporter_object import ExporterObject
from .base_object import BaseObject
from .__version__ import __version__
from .config_object import Configuration
from .command_object import export_csv_to_influx
2 changes: 1 addition & 1 deletion src/ExportCsvToInflux/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.2.1'
__version__ = '0.2.2'
2 changes: 1 addition & 1 deletion src/ExportCsvToInflux/command_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def export_csv_to_influx():
# Parse: Parse the server name, and judge the influx version
parser.add_argument('-s', '--server', nargs='?', default='localhost:8086', const='localhost:8086',
help='InfluxDB Server address. Default: localhost:8086')
parser.add_argument('-v', '--version', action="version", version=__version__)
user_namespace = UserNamespace()
parser.parse_known_args(namespace=user_namespace)
influx_object = InfluxObject(db_server_name=user_namespace.server)
Expand Down Expand Up @@ -99,7 +100,6 @@ def export_csv_to_influx():
help='Write duplicated points. Default: False.')
parser.add_argument('--csv_charset', '--csv_charset', nargs='?', default=None, const=None,
help='The csv charset. Default: None, which will auto detect')
parser.add_argument('-v', '--version', action="version", version=__version__)

args = parser.parse_args(namespace=user_namespace)
exporter = ExporterObject()
Expand Down

0 comments on commit a2da7ad

Please sign in to comment.