読者です 読者をやめる 読者になる 読者になる

heroku connect のデモ版が使えるようになってる

イシュー

  • heroku connect の管理コンソールが出来たっぽい

参考

f:id:magnet88jp:20150301014846p:plain

postgres にいる!

$ heroku pg:psql DATABASE_URL
---> Connecting to HEROKU_POSTGRESQL_COPPER_URL (DATABASE_URL)
psql (9.3.4, server 9.3.6)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

heroku-connect-mg-sb2::COPPER=> \dt salesforce.*;
                   List of relations
   Schema   |       Name       | Type  |     Owner      
------------+------------------+-------+----------------
 salesforce | _sf_org_id       | table | nljytownrcsiww
 salesforce | _trigger_last_id | table | nljytownrcsiww
 salesforce | _trigger_log     | table | nljytownrcsiww
 salesforce | enquete__c       | table | nljytownrcsiww
(4 rows)

heroku-connect-mg-sb2::COPPER=> select * from salesforce.enquete__c;
 id | sfid | createddate | isdeleted | answer__c | systemmodstamp | _c5_source | question__c 
----+------+-------------+-----------+-----------+----------------+------------+-------------
(0 rows)

heroku-connect-mg-sb2::COPPER=> 
  • けど、data はsyncされていない
  • 管理画面から「pull now」しても0件

    Polling Salesforce found no updated records

標準オブジェクトなら連携できる

heroku-connect-mg-sb2::COPPER=> \dt salesforce.*;
                     List of relations
   Schema   |         Name         | Type  |     Owner      
------------+----------------------+-------+----------------
 salesforce | _sf_org_id           | table | nljytownrcsiww
 salesforce | _trigger_last_id     | table | nljytownrcsiww
 salesforce | _trigger_log         | table | nljytownrcsiww
 salesforce | _trigger_log_archive | table | nljytownrcsiww
 salesforce | account              | table | nljytownrcsiww
 salesforce | enquete__c           | table | nljytownrcsiww
(6 rows)

heroku-connect-mg-sb2::COPPER=> select * from salesforce.account;
 _c5_source |     createddate     |        sfid        | isdeleted |   systemmodstamp    | id |      phone      |                name                 
------------+---------------------+--------------------+-----------+---------------------+----+-----------------+-------------------------------------
            | 2015-02-28 17:13:10 | 0011000000x9iG0AAI | f         | 2015-02-28 17:13:10 |  1 | (650) 867-3450  | GenePoint
            | 2015-02-28 17:13:10 | 0011000000x9iG1AAI | f         | 2015-02-28 17:13:10 |  2 | +44 191 4956203 | United Oil & Gas, UK
            | 2015-02-28 17:13:10 | 0011000000x9iG2AAI | f         | 2015-02-28 17:13:10 |  3 | (650) 450-8810  | United Oil & Gas, Singapore
            | 2015-02-28 17:13:10 | 0011000000x9iG3AAI | f         | 2015-02-28 17:13:10 |  4 | (512) 757-6000  | Edge Communications
            | 2015-02-28 17:13:10 | 0011000000x9iG4AAI | f         | 2015-02-28 17:13:10 |  5 | (336) 222-7000  | Burlington Textiles Corp of America
            | 2015-02-28 17:13:10 | 0011000000x9iG5AAI | f         | 2015-02-28 17:13:10 |  6 | (014) 427-4427  | Pyramid Construction Inc.
            | 2015-02-28 17:13:10 | 0011000000x9iG6AAI | f         | 2015-02-28 17:13:10 |  7 | (785) 241-6200  | Dickenson plc
            | 2015-02-28 17:13:10 | 0011000000x9iG7AAI | f         | 2015-02-28 17:13:10 |  8 | (312) 596-1000  | Grand Hotels & Resorts Ltd
            | 2015-02-28 17:13:10 | 0011000000x9iG8AAI | f         | 2015-02-28 17:13:10 |  9 | (503) 421-7800  | Express Logistics and Transport
            | 2015-02-28 17:13:10 | 0011000000x9iG9AAI | f         | 2015-02-28 17:13:10 | 10 | (520) 773-9050  | University of Arizona
            | 2015-02-28 17:13:10 | 0011000000x9iGAAAY | f         | 2015-02-28 17:13:10 | 11 | (212) 842-5500  | United Oil & Gas Corp.
            | 2015-02-28 17:13:10 | 0011000000x9iGBAAY | f         | 2015-02-28 17:13:10 | 12 | (415) 901-7000  | sForce
(12 rows)

heroku-connect-mg-sb2::COPPER=> 
  • 権限が必要?

#

heroku-connect-mg-sb2::COPPER=> select * from salesforce.enquete__c;
 id |        sfid        |     createddate     | isdeleted | answer__c  |   systemmodstamp    | _c5_source | question__c  
----+--------------------+---------------------+-----------+------------+---------------------+------------+--------------
  1 | a0010000015umdAAAQ | 2015-02-28 18:00:44 | f         | it's anser | 2015-02-28 18:00:45 |            | this is test
  2 | a0010000015ume8AAA | 2015-02-28 18:02:57 | f         | これは回答 | 2015-02-28 18:02:57 |            | これは質問
(2 rows)
  • heroku connect 前に作成していたデータは同期されない模様。(accountは同期されたからバグ?)
    • Salesforce側のデータを更新してあげると同期された。