mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(Google BigQuery Node): Send timeoutMs in query, pagination support (#10205)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import type { IDataObject, ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
|
||||
import { googleApiRequest } from '../transport';
|
||||
import { googleBigQueryApiRequest } from '../transport';
|
||||
|
||||
export async function searchProjects(
|
||||
this: ILoadOptionsFunctions,
|
||||
@@ -10,7 +10,7 @@ export async function searchProjects(
|
||||
pageToken: (paginationToken as string) || undefined,
|
||||
};
|
||||
|
||||
const response = await googleApiRequest.call(this, 'GET', '/v2/projects', undefined, qs);
|
||||
const response = await googleBigQueryApiRequest.call(this, 'GET', '/v2/projects', undefined, qs);
|
||||
|
||||
let { projects } = response;
|
||||
|
||||
@@ -45,7 +45,7 @@ export async function searchDatasets(
|
||||
pageToken: (paginationToken as string) || undefined,
|
||||
};
|
||||
|
||||
const response = await googleApiRequest.call(
|
||||
const response = await googleBigQueryApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/v2/projects/${projectId}/datasets`,
|
||||
@@ -87,7 +87,7 @@ export async function searchTables(
|
||||
pageToken: (paginationToken as string) || undefined,
|
||||
};
|
||||
|
||||
const response = await googleApiRequest.call(
|
||||
const response = await googleBigQueryApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/v2/projects/${projectId}/datasets/${datasetId}/tables`,
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import type { IDataObject, ILoadOptionsFunctions, INodePropertyOptions } from 'n8n-workflow';
|
||||
import { googleApiRequest } from '../transport';
|
||||
import { googleBigQueryApiRequest } from '../transport';
|
||||
|
||||
export async function getDatasets(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]> {
|
||||
const projectId = this.getNodeParameter('projectId', undefined, {
|
||||
extractValue: true,
|
||||
});
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
const { datasets } = await googleApiRequest.call(
|
||||
const { datasets } = await googleBigQueryApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/v2/projects/${projectId}/datasets`,
|
||||
@@ -33,7 +33,7 @@ export async function getSchema(this: ILoadOptionsFunctions): Promise<INodePrope
|
||||
|
||||
const returnData: INodePropertyOptions[] = [];
|
||||
|
||||
const { schema } = await googleApiRequest.call(
|
||||
const { schema } = await googleBigQueryApiRequest.call(
|
||||
this,
|
||||
'GET',
|
||||
`/v2/projects/${projectId}/datasets/${datasetId}/tables/${tableId}`,
|
||||
|
||||
Reference in New Issue
Block a user