GoogleCloudPlatform / bigquery-antipattern-recognition

Utility to identify and rewrite common anti patterns in BigQuery SQL syntax
Apache License 2.0
76 stars 26 forks source link

Unrecognized option: --info_schema_top_n_percentage_of_jobs #48

Closed sridivakar closed 7 months ago

sridivakar commented 8 months ago

Here is the error :

docker run -v ~/.config:/root/.config \
            -i artifactory.com/bigquery-antipattern-recognition:20231106  \
            --read_from_info_schema \
            --read_from_info_schema_start_time "2023-11-01 09:00:00" \
            --read_from_info_schema_end_time '2023-11-02' \
            --read_from_info_schema_timeout_in_secs 60 \
            --info_schema_table_name abc-project.xyz-dataset.INFORMATION_SCHEMA.JOBS \
            --processing_project_id abc-project \
            --info_schema_top_n_percentage_of_jobs 0.1 \
            --output_table abc-project.xyz-dataset.bq_query_antipattern
Exception in thread "main" org.apache.commons.cli.UnrecognizedOptionException: Unrecognized option: --info_schema_top_n_percentage_of_jobs
    at org.apache.commons.cli.Parser.processOption(Parser.java:264)
    at org.apache.commons.cli.Parser.parse(Parser.java:184)
    at org.apache.commons.cli.Parser.parse(Parser.java:84)
    at com.google.zetasql.toolkit.antipattern.cmd.BQAntiPatternCMDParser.<init>(BQAntiPatternCMDParser.java:60)
    at com.google.zetasql.toolkit.antipattern.parser.Main.main(Main.java:61)
franklinWhaite commented 7 months ago

Could not replicate it. If it is not too much to ask, please build again from the most recent version in the master branch. Just to be sure since the --info_schema_top_n_percentage_of_jobs argument was a recent addition.

sridivakar commented 7 months ago

It was observed with code taken on 2023-11-05, with the latest code (2023-11-15) the issue is not reproducible, hence closing the issue.