是否可以在bigquery中将新字段添加到RECORD类型的现有字段?例如,如果我当前的架构是:
{u'fields': [{u'mode': u'NULLABLE', u'name': u'test1', u'type': u'STRING'},
{u'fields': [{u'mode': u'NULLABLE',
u'name': u'field1',
u'type': u'STRING'}],
u'mode': u'NULLABLE',
u'name': u'recordtest',
u'type': u'RECORD'}]}
Run Code Online (Sandbox Code Playgroud)
我可以更改它以添加字段"field2"到recordtest吗?所以新模式将如下所示:
{u'fields': [{u'mode': u'NULLABLE', u'name': u'test1', u'type': u'STRING'},
{u'fields': [{u'mode': u'NULLABLE',
u'name': u'field1',
u'type': u'STRING'},
{u'mode': u'NULLABLE',
u'name': u'field2',
u'type': u'STRING'}],
u'mode': u'NULLABLE',
u'name': u'recordtest',
u'type': u'RECORD'}]}
Run Code Online (Sandbox Code Playgroud)
我无法从UI中找到一种方法.但我能够使用API完成此操作.
有没有人有关于如何在 GraphRequestManager 中使用 promise 的例子?我在我的动作创建者中得到了无法读取属性然后未定义的错误。
function graphRequest(path, params, token=undefined, version=undefined, method='GET') {
return new Promise((resolve, reject) => {
new GraphRequestManager().addRequest(new GraphRequest(
path,
{
httpMethod: method,
version: version,
accessToken: token
},
(error, result) => {
if (error) {
console.log('Error fetching data: ' + error);
reject('error making request. ' + error);
} else {
console.log('Success fetching data: ');
console.log(result);
resolve(result);
}
},
)).start();
});
Run Code Online (Sandbox Code Playgroud)
}
我使用我的动作创建者调用上面的
export function accounts() {
return dispatch => {
console.log("fetching accounts!!!!!!");
dispatch(accountsFetch());
fbAPI.accounts().then((accounts) => {
dispatch(accountsFetchSuccess(accounts));
}).catch((error) …Run Code Online (Sandbox Code Playgroud) 我想用以下视图创建一个客户端:
//depot/location1/main/... //myclient/main/...
//depot/location2/main/... //myclient/main/...
Run Code Online (Sandbox Code Playgroud)
// depot/location1/main/...和// depot/location2/main /之间没有文件和目录.
但是当我执行p4同步时,它只会从// depot/location2/main/...同步...
如何从两个位置同步?
我使用正则表达式[,;\s] +来分割逗号,空格或分号分隔的字符串.如果字符串末尾没有逗号,这可以正常工作:
>>> p=re.compile('[,;\s]+')
>>> mystring='a,,b,c'
>>> p.split(mystring)
['a', 'b', 'c']
Run Code Online (Sandbox Code Playgroud)
当字符串末尾有逗号时:
>>> mystring='a,,b,c,'
>>> p.split(mystring)
['a', 'b', 'c', '']
Run Code Online (Sandbox Code Playgroud)
我想在这种情况下的输出是['a','b','c'].
关于正则表达式的任何建议?
有没有办法在批量数据流管道中的所有步骤都成功后删除bigquery表?