Skip to content

Instantly share code, notes, and snippets.

@smzn
Created August 1, 2018 11:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smzn/f98e2a961ab2f938a7681b9ac96610ad to your computer and use it in GitHub Desktop.
Save smzn/f98e2a961ab2f938a7681b9ac96610ad to your computer and use it in GitHub Desktop.
createTable
public void createTable() { //BigQueryにテーブルを作成
Field row[] = new Field[column+1];
for(int i = 0; i < column; i++) {
row[i] = Field.of("sum"+i, LegacySQLTypeName.INTEGER);
}
row[column] = Field.of("index", LegacySQLTypeName.INTEGER);
Schema schema = Schema.of(row);
StandardTableDefinition tableDefinition = StandardTableDefinition.of(schema);
bigQuery.create(TableInfo.of(tableId, tableDefinition));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment