(
credentials: dataform.IBigQuery,
options?: {
concurrencyLimit?: number;
clientProvider?: BigQueryClientProvider;
}
)
| 66 | private clientProvider: BigQueryClientProvider; |
| 67 | |
| 68 | constructor( |
| 69 | credentials: dataform.IBigQuery, |
| 70 | options?: { |
| 71 | concurrencyLimit?: number; |
| 72 | clientProvider?: BigQueryClientProvider; |
| 73 | } |
| 74 | ) { |
| 75 | this.bigQueryCredentials = credentials; |
| 76 | this.clientProvider = options?.clientProvider || createBigQueryClientProvider(credentials); |
| 77 | |
| 78 | // Bigquery allows 50 concurrent queries, and a rate limit of 100/user/second by default. |
| 79 | // These limits should be safely low enough for most projects. |
| 80 | this.pool = new PromisePoolExecutor({ |
| 81 | concurrencyLimit: options?.concurrencyLimit, |
| 82 | frequencyWindow: 1000, |
| 83 | frequencyLimit: 30 |
| 84 | }); |
| 85 | } |
| 86 | |
| 87 | public async execute( |
| 88 | statement: string, |
nothing calls this directly
no test coverage detected