当前位置: 首页>>代码示例>>Python>>正文


Python Dart.save_subscription方法代码示例

本文整理汇总了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,
开发者ID:RetailMeNotSandbox,项目名称:dart,代码行数:33,代码来源:owen_eu_rcfile.py

示例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,
开发者ID:RetailMeNotSandbox,项目名称:dart,代码行数:33,代码来源:rmn_direct_parquet.py

示例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={
开发者ID:RetailMeNotSandbox,项目名称:dart,代码行数:34,代码来源:weblogs_transform.py


注:本文中的dart.client.python.dart_client.Dart.save_subscription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。