我发现,对于一个特定的工作表文档,我试图作为外部表引用,标题行在执行查询*时被包含在数据中。我决定删除表并使用定义文件重新创建它,这肯定会暴露文档中的选项。尽管没有在模块中定义,但它似乎没有创建任何模式。
我已经使用包含3列和冻结标题行的简单工作表以及以下test.def文件重新创建了该问题:
{
"autodetect": false,
"schema": {
"fields": [
{"name": "c1", "type": "STRING", "mode": "nullable"},
{"name": "c2", "type": "STRING", "mode": "nullable"},
{"name": "c3", "type": "STRING", "mode": "nullable"},
]
},
"sourceFormat": "GOOGLE_SHEETS",
"sourceUris": [
"https://docs.google.com/spreadsheets/..."
],
"googleSheetsOptions": {
"skipLeadingRows": 1
}
}
然后我尝试使用:
创建文件bq mk myproject:mydataset.mytable < test.def
表已创建,但没有架构 - 我做错了什么?
奇怪:(
中号
答案 0 :(得分:0)
好的,所以正确的语法是:
app.controller('authController', function($scope, $http, $rootScope, $location){
$scope.user = {username: '', password: ''};
$scope.error_message = '';
$scope.login = function(){
$http.post('/auth/login', $scope.user).success(function(data){
if(data.state == 'success'){
$rootScope.authenticated = true;
$rootScope.current_user = data.user.username;
$location.path('/');
}
else{
$scope.error_message = data.message;
}
});
};
$scope.register = function(){
$http.post('/auth/signup', $scope.user).success(function(data){
if(data.state == 'success'){
$rootScope.authenticated = true;
$rootScope.current_user = data.user.username;
$location.path('/');
}
else{
$scope.error_message = data.message;
}
});
};
});
这也允许您告诉谷歌跳过工作表上的前导行(从BQ UI无法写入)
中号