Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Analyze analytics SQL to extract referenced tables/columns and time bounds.

## Support

BigQuery and Redshift are currently supported.

## Install

Base install:
Expand All @@ -22,20 +26,14 @@ Redshift extras (only needed for `build_schema`):
pip install analytics-query-analyzer[redshift]
```

## Support

BigQuery is currently supported and tested.

## Schema format

Schemas follow sqlglot conventions, with nested fields represented as nested dicts.

## Usage

### analyze

Extract table/column references from a query.

Schema format follows sqlglot conventions, with nested fields represented as nested dicts.

```python
from analytics_query_analyzer import analyze
from sqlglot import dialects
Expand Down Expand Up @@ -124,7 +122,7 @@ timespans = analyze_timespan(

### build_schema

Fetch a schema dictionary from BigQuery.
Fetch a schema dictionary from BigQuery or Redshift.

```python
from analytics_query_analyzer import build_schema
Expand Down