Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Documentation of query format using variables #701

Open
@Rbain2

Description

@Rbain2

Hi

I spent a long time trying to find a format of query with variable inputs. I eventually found the following which allows parameters in the select statement.
res = influx.query("""
select * from program_event_name
where account = '%s'
and region = '%s'
order by time desc limit 1""" % (
account['name'], region))

at the web site below which includes other influxdb code examples.
https://www.programcreek.com/python/example/107755/influxdb.InfluxDBClient

. This format worked perfectly. I would like to see this or a similar example of parameterized query included in the basic documentation of the library as I believe it gives a lot of extra flexibility which is not obvious to me from the existing documentation and could save developers a lot of time

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions