Skip to content

Commit

Permalink
fixed python language errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Clifford committed Aug 9, 2023
1 parent e195ae9 commit 317641c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ export const ExecuteAggregateQuerySql = (props: OwnProps) => {
const {bucket} = props

const sqlSnippet = `SELECT mean(count)
FROM 'census'
FROM census
WHERE time > now() - '10m'`

const querySnippet = `query = """SELECT mean(count)
FROM 'census'
FROM census
WHERE time > now() - '10m'"""
# Execute the query
table = client.query(query=query, database="${bucket}", language='influxql') )
table = client.query(query=query, database="${bucket}", language='influxql')
# Convert to dataframe
df = table.to_pandas().sort_values(by="time")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ export const ExecuteQuerySql = (props: OwnProps) => {
const {bucket} = props

const sqlSnippet = `SELECT *
FROM 'census'
FROM census
WHERE time >= now() - interval '1 hour'
AND ('bees' IS NOT NULL OR 'ants' IS NOT NULL)`

const query = `query = """SELECT *
FROM 'census'
FROM census
WHERE time >= now() - interval '24 hours'
AND ('bees' IS NOT NULL OR 'ants' IS NOT NULL)"""
# Execute the query
table = client.query(query=query, database="${bucket}", language='sql') )
table = client.query(query=query, database="${bucket}", language='sql')
# Convert to dataframe
df = table.to_pandas().sort_values(by="time")
Expand Down

0 comments on commit 317641c

Please sign in to comment.