本文整理汇总了Python中dart.client.python.dart_client.Dart.save_subscription方法的典型用法代码示例。如果您正苦于以下问题:Python Dart.save_subscription方法的具体用法?Python Dart.save_subscription怎么用?Python Dart.save_subscription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dart.client.python.dart_client.Dart
的用法示例。
在下文中一共展示了Dart.save_subscription方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Column
# 需要导入模块: from dart.client.python.dart_client import Dart [as 别名]
# 或者: from dart.client.python.dart_client.Dart import save_subscription [as 别名]
Column('brand', DataType.STRING, path='owen.context.inventory[0].brand'),
Column('commentsCount', DataType.INT, path='owen.context.inventory[0].commentsCount'),
Column('legacyOfferId', DataType.STRING, path='owen.context.custom.legacy.offerIds.offerId'),
Column('pageViewHash', DataType.STRING, path='owen.context.custom.legacy.pageViewHash'),
Column('vIdInt', DataType.STRING, path='owen.context.custom.legacy.vIdInt'),
Column('merchantId', DataType.STRING, path='owen.context.custom.legacy.merchantId'),
Column('facebookConnect', DataType.STRING, path='owen.context.custom.facebookConnect'),
Column('schemaKey', DataType.STRING, path='schema.key'),
],
))))
print 'created dataset: %s' % dataset.id
subscription = dart.save_subscription(Subscription(data=SubscriptionData(
name='owen_eu_subscription_DW-3213_v3',
dataset_id=dataset.id,
s3_path_start_prefix_inclusive='s3://example-bucket/prd/inbound/overlord/eu-all-events/2015/08/05/',
on_success_email=['[email protected]'],
on_failure_email=['[email protected]'],
)))
print 'created subscription: %s' % subscription.id
print 'awaiting subscription generation...'
subscription = dart.await_subscription_generation(subscription.id)
assert subscription.data.state == SubscriptionState.ACTIVE
print 'done.'
datastore = dart.save_datastore(Datastore(
data=DatastoreData(
name='owen_eu_parquet_DW-3213_v3',
engine_name='emr_engine',
state=DatastoreState.ACTIVE,
示例2: Column
# 需要导入模块: from dart.client.python.dart_client import Dart [as 别名]
# 或者: from dart.client.python.dart_client.Dart import save_subscription [as 别名]
Column('eventInstanceUuid', DataType.STRING, path='owen.event.eventInstanceUuid'),
Column('eventTimestamp', DataType.STRING, path='owen.event.eventTimestamp'),
Column('eventPlatform', DataType.STRING, path='owen.event.eventPlatform'),
Column('eventCategory', DataType.STRING, path='owen.event.eventCategory'),
Column('eventAction', DataType.STRING, path='owen.event.eventAction'),
Column('eventName', DataType.STRING, path='owen.event.eventName'),
Column('eventTarget', DataType.STRING, path='owen.event.eventTarget'),
Column('eventVersion', DataType.STRING, path='owen.event.eventVersion'),
],
))))
print 'created dataset: %s' % dataset.id
subscription = dart.save_subscription(Subscription(data=SubscriptionData(
name='rmn_direct_subscription_DW-3307',
dataset_id=dataset.id,
s3_path_start_prefix_inclusive='s3://example-bucket/prd/inbound/overlord/raw/rmndirect/2015/09/04/',
on_success_email=['[email protected]'],
on_failure_email=['[email protected]'],
)))
print 'created subscription: %s' % subscription.id
print 'awaiting subscription generation...'
subscription = dart.await_subscription_generation(subscription.id)
assert subscription.data.state == SubscriptionState.ACTIVE
print 'done.'
datastore = dart.save_datastore(Datastore(
data=DatastoreData(
name='rmn_direct_adhoc_DW-3307',
engine_name='emr_engine',
state=DatastoreState.ACTIVE,
示例3: Column
# 需要导入模块: from dart.client.python.dart_client import Dart [as 别名]
# 或者: from dart.client.python.dart_client.Dart import save_subscription [as 别名]
Column('visitorId', DataType.STRING),
Column('vegSlice', DataType.STRING),
Column('fruitSlice', DataType.STRING),
Column('cacheHitMiss', DataType.STRING),
],
compression=Compression.BZ2,
partitions=[
Column('year', DataType.STRING),
Column('week', DataType.STRING),
],
)))
print 'created dataset: %s' % dataset.id
subscription = dart.save_subscription(Subscription(data=SubscriptionData(
name='weblogs_rmn_subscription',
dataset_id=dataset.id,
on_failure_email=['[email protected]', '[email protected]'],
on_success_email=['[email protected]', '[email protected]'],
)))
print 'created subscription: %s' % subscription.id
print 'awaiting subscription generation...'
subscription = dart.await_subscription_generation(subscription.id)
assert subscription.data.state == SubscriptionState.ACTIVE
print 'done.'
datastore = dart.save_datastore(Datastore(
data=DatastoreData(
name='weblogs_rmn_legacy',
engine_name='emr_engine',
state=DatastoreState.TEMPLATE,
args={