<commit_before><meta name="google-site-verification" content="<KEY>" />
# Be-BigQuery
Be-BigQuery is a BigQuery client and has simple interfaces.

# Installation
```xml
<dependency>
    <groupId>com.github.kamiru78</groupId>
    <artifactId>be-bigquery</artifactId>
    <version>0.5.0</version>
</dependency>
```

## Examples
### Execute a query simply
```java
BeBigQuery bbq = new BeBigQuery("project-id"
        , "servic-account"
        , new File("path/file.p12"));
Iterable tableRows = bbq.query("select * from dataset.table where condition=11").asIterable();
for (TableRow row : tableRows) {
    for (TableCell cell : row.getF()) {
        System.out.print(cell.getV().toString() + ",");
    }
    System.out.println();
}
```

### Execute a query and get large results
```java
Iterable tableRows = bbq.query("select * from dataset.table where condition=11")
    .asIterableViaGcs("temp_dataset", "temp_gcs_buckt");
```

## Use BigQuery with Apache Spark as input data
```
// scala sample
val bbq = new BeBigQuery("project-id" , "servic-account", new File("path/file.p12"))
bbq.query("select * from dataset.table where condition=11")
    .exportToGcs("tempDataset", "tempTable", "gcsBucket", "gcsPath/*")
val textFile = sc.textFile("gs://gcsBucket/gcsPath/")
```<commit_msg>fix readme<commit_after><meta name="google-site-verification" content="<KEY>" />
# Be-BigQuery
Be-BigQuery is a BigQuery client and has simple interfaces.

# Installation
```xml
<dependency>
    <groupId>com.github.kamiru78</groupId>
    <artifactId>be-bigquery</artifactId>
    <version>0.5.0</version>
</dependency>
```

## Examples
### Execute a query simply
```java
BeBigQuery bbq = new BeBigQuery("project-id", "servic-account" , new File("path/file.p12"));
Iterable tableRows = bbq.query("select * from dataset.table where condition=11").asIterable();
for (TableRow row : tableRows) {
    for (TableCell cell : row.getF()) {
        System.out.print(cell.getV().toString() + ",");
    }
    System.out.println();
}
```

### Execute a query and get large results
```java
Iterable tableRows = bbq.query("select * from dataset.table where condition=11")
    .asIterableViaGcs("temp_dataset", "temp_gcs_buckt");
```

### Use BigQuery with Apache Spark as input data
```
// scala sample
val bbq = new BeBigQuery("project-id" , "servic-account", new File("path/file.p12"))
bbq.query("select * from dataset.table where condition=11")
    .exportToGcs("tempDataset", "tempTable", "gcsBucket", "gcsPath/*")
val textFile = sc.textFile("gs://gcsBucket/gcsPath/")
```
{'fraction_non_alphanumeric': 0.17040535222353403, 'fraction_numerical': 0.011806375442739079, 'mean_word_length': 4.6114790286975715, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1106182', 'n_tokens_mistral': 894, 'n_tokens_neox': 837, 'n_words': 193}