<commit_before>import requests
import traceback
from endpoint_proxy import get_baseurl
from common.models.document import Document
from setup_e2e import create_table
from common.db_client import bq_client
from google.cloud import bigquery
from common.config import PROJECT_ID,DATABASE_PREFIX
BUCKET_NAME = "gs://document-upload-test"

def test_create_tabel():
  # Construct a BigQuery client object.
  client = bq_client()
  BIGQUERY_DB = "entities"
  # TODO(developer): Set dataset_id to the ID of the dataset to create.
  # dataset_id = "{}.your_dataset".format(client.project)
  dataset_id = f"{PROJECT_ID}.{DATABASE_PREFIX}"
  # Construct a full Dataset object to send to the API.
  dataset = bigquery.Dataset(dataset_id)

  # TODO(developer): Specify the geographic location where the dataset should reside.
  dataset.location = "US"

  # Send the dataset to the API for creation, with an explicit timeout.
  # Raises google.api_core.exceptions.Conflict if the Dataset already
  # exists within the project.
  dataset = client.create_dataset(dataset, timeout=30)  # Make an API request.
  print("Created dataset {}.{}".format(client.project, dataset.dataset_id))
  table_id = f"{PROJECT_ID}.{DATABASE_PREFIX}.{BIGQUERY_DB}"
  schema = [
  bigquery.SchemaField("document_class", "STRING", mode="NULLABLE"),<commit_msg>Updated database_prefix<commit_after>import requests
import traceback
from endpoint_proxy import get_baseurl
from common.models.document import Document
from setup_e2e import create_table
from common.db_client import bq_client
from google.cloud import bigquery
from common.config import PROJECT_ID,DATABASE_PREFIX
BUCKET_NAME = "gs://document-upload-test"

def test_create_tabel():
  # Construct a BigQuery client object.
  client = bq_client()
  BIGQUERY_DB = "entities"
  dataset_prefix = DATABASE_PREFIX + "data_extraction"
  # TODO(developer): Set dataset_id to the ID of the dataset to create.
  # dataset_id = "{}.your_dataset".format(client.project)
  dataset_id = f"{PROJECT_ID}.{dataset_prefix}"
  # Construct a full Dataset object to send to the API.
  dataset = bigquery.Dataset(dataset_id)

  # TODO(developer): Specify the geographic location where the dataset should reside.
  dataset.location = "US"

  # Send the dataset to the API for creation, with an explicit timeout.
  # Raises google.api_core.exceptions.Conflict if the Dataset already
  # exists within the project.
  dataset = client.create_dataset(dataset, timeout=30)  # Make an API request.
  print("Created dataset {}.{}".format(client.project, dataset.dataset_id))
  table_id = f"{PROJECT_ID}.{dataset_prefix}.{BIGQUERY_DB}"
  schema = [
  bigquery.SchemaField("document_class", "STRING", mode="NULLABLE"),
{'fraction_non_alphanumeric': 0.09383080901366826, 'fraction_numerical': 0.002216475803472479, 'mean_word_length': 5.283062645011601, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '6058249', 'n_tokens_mistral': 825, 'n_tokens_neox': 813, 'n_words': 241}