<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Datomic Knowledgebase - Recent questions and answers in Cloud</title>
<link>https://ask.datomic.com/index.php/qa/datomic/cloud</link>
<description>Powered by Question2Answer</description>
<item>
<title>Answered: import-cloud fails with &quot;No reader function for tag object&quot;</title>
<link>https://ask.datomic.com/index.php/999/import-cloud-fails-with-no-reader-function-for-tag-object?show=1034#a1034</link>
<description>&lt;p&gt;One hack I tried to get around this bug is to remove the key-value pair that irreversibly encodes the credentials provider in the db-local files.  The relevant file appears to be&lt;/p&gt;
&lt;p&gt;&lt;code&gt;./datomic/&amp;lt;system&amp;gt;/&amp;lt;db&amp;gt;/db-root-0000000000&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;This file seems to be a simple EDN file.&lt;/p&gt;
&lt;p&gt;But even if I remove the &lt;code&gt;:creds-provider&lt;/code&gt; key (which should not be required after the db is imported), I still can't connect to the imported db.  The &lt;code&gt;d/connect&lt;/code&gt; process gets much further along after a log of &lt;code&gt;Loading.....&lt;/code&gt;, but still ultimately fails with the same error.&lt;/p&gt;
&lt;p&gt;Maybe the creds providers is encoded somewhere else ...&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/999/import-cloud-fails-with-no-reader-function-for-tag-object?show=1034#a1034</guid>
<pubDate>Fri, 13 Sep 2024 13:37:11 +0000</pubDate>
</item>
<item>
<title>Answered: is there a &quot;un-divert&quot; to undo divert-system</title>
<link>https://ask.datomic.com/index.php/1021/is-there-a-un-divert-to-undo-divert-system?show=1023#a1023</link>
<description>&lt;p&gt;@Phil&lt;/p&gt;
&lt;p&gt;No we do not currently have a feature to un-divert and switch back to the original endpoint.  I have logged this request with the dev team, but currently you would need to kill the process and start a new connection.  You can alternatively call divert again to a new &lt;code&gt;storage-dir&lt;/code&gt; location, but you cannot un-divert so that client calls go to the original endpoint.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br&gt;
Jaret&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1021/is-there-a-un-divert-to-undo-divert-system?show=1023#a1023</guid>
<pubDate>Wed, 05 Jun 2024 11:39:51 +0000</pubDate>
</item>
<item>
<title>Answered: Equivalents for d/with; transaction function test scaffold story when using cloud</title>
<link>https://ask.datomic.com/index.php/949/equivalents-transaction-function-scaffold-story-using-cloud?show=950#a950</link>
<description>&lt;p&gt;Hi Mike! &lt;/p&gt;
&lt;p&gt;The peer api is not usable in Cloud, but after thinking about your situation I have a few points. &lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The client api has d/with: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/client-api/datomic.client.api.html#var-with&quot;&gt;https://docs.datomic.com/client-api/datomic.client.api.html#var-with&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;I would recommend doing this kind of testing using Datomic local.  &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/datomic-local.html&quot;&gt;https://docs.datomic.com/cloud/datomic-local.html&lt;/a&gt;. (added benefit you can actually import your DB and test against it with import-cloud + utilize an in-memory DB locally).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Does that cover your need for testing in Cloud?&lt;/p&gt;
&lt;p&gt;All that being said, I have captured your question and use case here for our on-going consideration of apis for Cloud/Pro.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br&gt;
Jaret&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/949/equivalents-transaction-function-scaffold-story-using-cloud?show=950#a950</guid>
<pubDate>Wed, 01 Nov 2023 16:34:58 +0000</pubDate>
</item>
<item>
<title>Answered: Why do values of :db.type/uri return as com.cognitect.transit.impl.URIImpl?</title>
<link>https://ask.datomic.com/index.php/943/why-values-type-uri-return-com-cognitect-transit-impl-uriimpl?show=944#a944</link>
<description>&lt;p&gt;I've reproduced this problem and we are working on a fix for a future release.  Will updated when I have more details.  &lt;/p&gt;
&lt;p&gt;Cheers,&lt;br&gt;
Jaret&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/943/why-values-type-uri-return-com-cognitect-transit-impl-uriimpl?show=944#a944</guid>
<pubDate>Tue, 10 Oct 2023 12:04:08 +0000</pubDate>
</item>
<item>
<title>Answered: Why does :db/ensure appear as an attribute in my entities?</title>
<link>https://ask.datomic.com/index.php/681/why-does-db-ensure-appear-as-an-attribute-in-my-entities?show=938#a938</link>
<description>&lt;p&gt;I just described the same question in &lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/db-ensure-doesnt-seem-virtual/2296&quot;&gt;https://forum.datomic.com/t/db-ensure-doesnt-seem-virtual/2296&lt;/a&gt; with my own example.&lt;/p&gt;
&lt;p&gt;Based on the long silence, I'm guessing, it's just a mistake, imprecision or ambiguity in the documentation, that the &lt;code&gt;:db/ensure&lt;/code&gt; is described as virtual.&lt;/p&gt;
&lt;p&gt;It would be really helpful to clarify this in the docs, because people will just keep wasting time on wondering about it.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/681/why-does-db-ensure-appear-as-an-attribute-in-my-entities?show=938#a938</guid>
<pubDate>Sat, 15 Jul 2023 04:50:52 +0000</pubDate>
</item>
<item>
<title>Is `(pull $db2 ?e [*])` supported officially?</title>
<link>https://ask.datomic.com/index.php/937/is-pull-db2-e-supported-officially</link>
<description>&lt;p&gt;The &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/query/query-data-reference.html?search=p#pull-expressions&quot;&gt;documentation&lt;/a&gt; only mentions the syntax without a &lt;code&gt;src-var&lt;/code&gt;:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;pull-expr                  = ['pull' variable pattern]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;but found that this syntax also works:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;pull-expr                  = ['pull' src-var variable pattern]&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I have a self-contained code example here, which demonstrates a use-case, where an entity is split between 2 Datomic databases, for privacy reasons:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/pull-db-entity-pattern-is-undocumented/2299&quot;&gt;https://forum.datomic.com/t/pull-db-entity-pattern-is-undocumented/2299&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Is this variant of the &lt;code&gt;pull-expr&lt;/code&gt; in Datalog queries are not supported officially?&lt;/p&gt;
&lt;p&gt;Should I use it in production or does it have some undefined behaviour, compared to its binary arity variant?&lt;/p&gt;
&lt;p&gt;Or the documentation is just incomplete?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/937/is-pull-db2-e-supported-officially</guid>
<pubDate>Sat, 15 Jul 2023 04:42:45 +0000</pubDate>
</item>
<item>
<title>Datomic Cloud IAM role drift on setup - is this normal?</title>
<link>https://ask.datomic.com/index.php/935/datomic-cloud-iam-role-drift-on-setup-is-this-normal</link>
<description>&lt;p&gt;hi, just set up DC for the first time (ran the two AWS cloudformation templates). The storage stack is showing drift on the IAM managed policy &lt;code&gt;datomic-admin-...&lt;/code&gt;, shows 'MODIFIED', in red. Is this normal upon setup? (checking the changes in the 'versions' tab, the difference is addition of autoscaling and s3 actions to the policy; the second version, presumably causing the 'drift', was added during the provisioning). Is this just a setup artifact nothing to worry about? &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/935/datomic-cloud-iam-role-drift-on-setup-is-this-normal</guid>
<pubDate>Wed, 12 Jul 2023 09:34:33 +0000</pubDate>
</item>
<item>
<title>Answered: How create more one production compute?</title>
<link>https://ask.datomic.com/index.php/930/how-create-more-one-production-compute?show=931#a931</link>
<description>&lt;p&gt;Hi @Tatiana,&lt;/p&gt;
&lt;p&gt;If you are looking to add more compute to a Datomic Cloud system you have a few options:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;You can increase the compute size of your compute nodes.  &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/operation/growing-your-system.html&quot;&gt;https://docs.datomic.com/cloud/operation/growing-your-system.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;You can add more compute nodes via ASG (however, you will not see much benefits to scaling compute this way on a single DB system).&lt;/li&gt;
&lt;li&gt;This is probably, what you want... you can launch a query group against the same storage stack.  (&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/operation/growing-your-system.html#task-specific-query-groups&quot;&gt;https://docs.datomic.com/cloud/operation/growing-your-system.html#task-specific-query-groups&lt;/a&gt;) with more docs here explaining that query groups are a kind of compute group: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/whatis/architecture.html#compute-groups&quot;&gt;https://docs.datomic.com/cloud/whatis/architecture.html#compute-groups&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let me know if you have questions or more information on what specifically you are hoping to scale.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br&gt;
Jaret&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/930/how-create-more-one-production-compute?show=931#a931</guid>
<pubDate>Wed, 05 Jul 2023 14:35:00 +0000</pubDate>
</item>
<item>
<title>Answered: Can a tuple value be added when one of the parts of the tuple is an lookup-ref?</title>
<link>https://ask.datomic.com/index.php/891/can-tuple-value-added-when-one-the-parts-the-tuple-lookup-ref?show=892#a892</link>
<description>&lt;p&gt;You don't have to specify the composite key's value usually, just its constituent attributes, because those imply the composite key and Datomic will add it to the resulting transaction automatically. &lt;/p&gt;
&lt;p&gt;So this should be sufficient:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/transact
 (db/get-connection)
 {:tx-data [{:molecule-part/molecule [:molecule/legacy-id 717],
             :molecule-part/number 1}]})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That being said, if you want to update an existing entity, you do have to provide an attribute in a transaction, which is a &lt;code&gt;:db.unique/identity&lt;/code&gt;, so you would need the &lt;code&gt;:molecule-part/number+molecule [1 [:molecule/legacy-id 717]]&lt;/code&gt; map entry, which doesn't work.&lt;/p&gt;
&lt;p&gt;As discussed here:&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/troubles-with-upsert-on-composite-tuples/1355/6&quot;&gt;https://forum.datomic.com/t/troubles-with-upsert-on-composite-tuples/1355/6&lt;/a&gt;&lt;br&gt;
you would need to create a &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/transactions/transaction-functions.html#custom&quot;&gt;custom transaction function&lt;/a&gt;, which resolves the lookup refs used in your unique tuple attr and return entity IDs instead.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/891/can-tuple-value-added-when-one-the-parts-the-tuple-lookup-ref?show=892#a892</guid>
<pubDate>Sun, 30 Apr 2023 15:38:18 +0000</pubDate>
</item>
<item>
<title>Answered: Backup Datomic Cloud to another account</title>
<link>https://ask.datomic.com/index.php/884/backup-datomic-cloud-to-another-account?show=888#a888</link>
<description>&lt;p&gt;Hi J,&lt;/p&gt;
&lt;p&gt;There is currently no backup solution for Datomic Cloud.  Nor is there an ability to import from s3.  This is an area we are very interested in providing a solution for and frankly has been an area the community has desired for a long time. We are actively working on features around this issue. &lt;/p&gt;
&lt;p&gt;I want to clarify what Cloud does have:&lt;/p&gt;
&lt;p&gt;All data in Datomic Cloud is stored in S3 (as well as other highly durable storages), which provides very high durability guarantees, making secondary data loss prevention (i.e. backup) unnecessary.&lt;/p&gt;
&lt;p&gt;However, we understand that in certain circumstances it may be desirable to ‘roll back’ a database. Datomic Cloud does not yet include the ability to ‘revert’ a database to a prior state.  Nor does it have the ability to move a database across system or across account.  We are working on features in this area and while I cannot provide a timeline for the features I do want to say we understand the need you have expressed.&lt;/p&gt;
&lt;p&gt;If you have any questions or would like to discuss operational concerns like this in Cloud I would be happy to have a call and you can reach me and our team at support@datomic.com to setup such a call.&lt;/p&gt;
&lt;p&gt;Cheers,&lt;br&gt;
Jaret&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/884/backup-datomic-cloud-to-another-account?show=888#a888</guid>
<pubDate>Fri, 14 Apr 2023 19:03:29 +0000</pubDate>
</item>
<item>
<title>Answered: Could not find artifact com.datomic:ion:jar:0.9.48 in central</title>
<link>https://ask.datomic.com/index.php/546/could-not-find-artifact-com-datomic-ion-jar-0-9-48-in-central?show=886#a886</link>
<description>&lt;p&gt;For those who have stumbled upon this very same issue, here are the permissions you need:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
    &quot;Version&quot;: &quot;2012-10-17&quot;,
    &quot;Statement&quot;: [
        {
            &quot;Sid&quot;: &quot;VisualEditor0&quot;,
            &quot;Effect&quot;: &quot;Allow&quot;,
            &quot;Action&quot;: [
                &quot;s3:GetObject&quot;,
                &quot;s3:GetBucketCORS&quot;,
                &quot;s3:ListBucket&quot;,
                &quot;s3:GetBucketLocation&quot;
            ],
            &quot;Resource&quot;: [
                &quot;arn:aws:s3:::*/*&quot;,
                &quot;arn:aws:s3:::datomic-releases-1fc2183a &quot;
            ]
        },
        {
            &quot;Sid&quot;: &quot;VisualEditor1&quot;,
            &quot;Effect&quot;: &quot;Allow&quot;,
            &quot;Action&quot;: &quot;s3:GetBucketLocation&quot;,
            &quot;Resource&quot;: &quot;arn:aws:s3:::*&quot;
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Further steps would be to:&lt;br&gt;
 1. Create a dedicated Policy in AWS IAM&lt;br&gt;
 2. Create a dedicated User in AWS IAM specifically for Clojure CLI (e.g. &lt;code&gt;tools.deps&lt;/code&gt;)&lt;br&gt;
 3. Grant the User the previously created Policy (&quot;Permissions&quot; tab &amp;gt; &quot;Permission policies&quot;)&lt;br&gt;
 4. Create an Access key for the User (&quot;Security credentials&quot; tab &amp;gt; &quot;Access keys&quot;)&lt;br&gt;
 5. Save the generated AWS Access Key ID and AWS Secret Access Key&lt;br&gt;
 6. Add an S3 repo server to your local Maven config as per &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/reference/deps_and_cli#_maven_s3_repos&quot;&gt;Deps and CLI docs&lt;/a&gt;, using &lt;code&gt;datomic-cloud&lt;/code&gt; as a server &lt;code&gt;id&lt;/code&gt;, so that &lt;code&gt;tools.deps&lt;/code&gt; are able to pick them up&lt;/p&gt;
&lt;p&gt;All these steps will help you to run &lt;code&gt;clojure -P&lt;/code&gt; (with whatever aliases you use in your project, e.g. &lt;code&gt;ion-dev&lt;/code&gt; or simply &lt;code&gt;dev&lt;/code&gt;) without the above error.&lt;/p&gt;
&lt;p&gt;P.S. It also makes sense to grant this permission to all other Administrators or PowerUsers via the same Policy.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/546/could-not-find-artifact-com-datomic-ion-jar-0-9-48-in-central?show=886#a886</guid>
<pubDate>Tue, 04 Apr 2023 11:40:53 +0000</pubDate>
</item>
<item>
<title>Request Entity Too Large - clojure.lang.ExceptionInfo: Response body did not conform to Datomic client protocol</title>
<link>https://ask.datomic.com/index.php/882/request-clojure-exceptioninfo-response-conform-protocol</link>
<description>&lt;p&gt;There seems to be a bug in Datomic 990-9202 that breaks the d/tx-range function.&lt;/p&gt;
&lt;p&gt;Earlier I could use the tx-range function the fetch data from my database.&lt;/p&gt;
&lt;p&gt;But after upgrading to Datomic 990-9202 I get and exception when a transaction has too much data. &lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
clojure.lang.ExceptionInfo: Response body did not conform to Datomic client protocol&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cognitect.anomalies/category: :cognitect.anomalies/incorrect
 cognitect.anomalies/message: &quot;Response body did not conform to Datomic client protocol&quot;
                 http-result: {:status 413,
                               :headers
                               {&quot;apigw-requestid&quot; &quot;Vg4UxisCDoEEJsQ=&quot;,
                                &quot;server&quot; &quot;Jetty(9.4.44.v20210927)&quot;,
                                &quot;connection&quot; &quot;keep-alive&quot;,
                                &quot;content-length&quot; &quot;38&quot;,
                                &quot;date&quot; &quot;Tue, 19 Jul 2022 12:17:47 GMT&quot;,
                                &quot;content-type&quot; &quot;application/json&quot;},
                               :body &quot;{\&quot;message\&quot;:\&quot;Request Entity Too Large\&quot;}&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/882/request-clojure-exceptioninfo-response-conform-protocol</guid>
<pubDate>Tue, 21 Mar 2023 12:26:20 +0000</pubDate>
</item>
<item>
<title>Answered: How can I connect to Datomic after upgrade to 990-9202, the bastion disappeared?</title>
<link>https://ask.datomic.com/index.php/880/how-connect-datomic-after-upgrade-9202-bastion-disappeared?show=881#a881</link>
<description>&lt;p&gt;I got it working!&lt;/p&gt;
&lt;p&gt;You don't need the the socks proxy anymore with the datomic client since the bastion is replaced with an  AWS api gateway.&lt;/p&gt;
&lt;p&gt;Go to your AWS console and look at the api gatewats&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://eu-central-1.console.aws.amazon.com/apigateway/main/apis&quot;&gt;https://eu-central-1.console.aws.amazon.com/apigateway/main/apis&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click on datomic-YOUR-SYSTEM-NAME-client-api&lt;/p&gt;
&lt;p&gt;Use the Invoke URL as the value for the endpoint in your configuration when connecting to datomic.&lt;/p&gt;
&lt;p&gt;{:server-type :ion&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;      :region &quot;eu-central-1&quot; ;; e.g. us-east-1
      :system SYSTEM_NAME
      :endpoint  INVOKE_URL}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/880/how-connect-datomic-after-upgrade-9202-bastion-disappeared?show=881#a881</guid>
<pubDate>Mon, 20 Mar 2023 14:23:59 +0000</pubDate>
</item>
<item>
<title>Answered: Could not find artifact com.datomic:datomic-free:jar:1.0.6610</title>
<link>https://ask.datomic.com/index.php/871/could-not-find-artifact-com-datomic-datomic-free-jar-1-0-6610?show=874#a874</link>
<description>&lt;p&gt;Hi Matt,&lt;/p&gt;
&lt;p&gt;You're correct in pointing to &lt;a rel=&quot;nofollow&quot; href=&quot;https://ask.datomic.com/index.php/453/datomic-free-releases-arent-uploaded-public-clojars-anymore&quot;&gt;https://ask.datomic.com/index.php/453/datomic-free-releases-arent-uploaded-public-clojars-anymore&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt; Datomic 0.9.5697, datomic-free is the last version of Datomic-free uploaded. Dev-local is the successor to datomic-free and is documented at: &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/dev-local.html&quot;&gt;https://docs.datomic.com/cloud/dev-local.html&lt;/a&gt; and you can get the latest dev-local here: &lt;a rel=&quot;nofollow&quot; href=&quot;https://cognitect.com/dev-tools&quot;&gt;https://cognitect.com/dev-tools&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;The problems raised in that thread for use cases of dev-local are all captured and being worked on for future releases of Dev local.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;br&gt;
Jaret&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/871/could-not-find-artifact-com-datomic-datomic-free-jar-1-0-6610?show=874#a874</guid>
<pubDate>Thu, 02 Mar 2023 15:21:54 +0000</pubDate>
</item>
<item>
<title>Answered: d/with crashes when called rapidly in dev-local</title>
<link>https://ask.datomic.com/index.php/866/d-with-crashes-when-called-rapidly-in-dev-local?show=868#a868</link>
<description>&lt;p&gt;Thanks for the report!  I've made a ticket for Dev to review after the break.  &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/866/d-with-crashes-when-called-rapidly-in-dev-local?show=868#a868</guid>
<pubDate>Tue, 27 Dec 2022 12:30:15 +0000</pubDate>
</item>
<item>
<title>What's the state of the art in distributed Datomic?</title>
<link>https://ask.datomic.com/index.php/863/whats-the-state-of-the-art-in-distributed-datomic</link>
<description>&lt;p&gt;I'd like to get an idea of the state of the art in distributed Datomic.  FWIW, my wish list includes the ability for selected processing nodes to have local images and/or participate in federated global images, linked by CRDTs, etc. And a pony.&lt;/p&gt;
&lt;p&gt;-r&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/863/whats-the-state-of-the-art-in-distributed-datomic</guid>
<pubDate>Sun, 18 Dec 2022 00:37:33 +0000</pubDate>
</item>
<item>
<title>Querying 2000+ entities, by passing in uuids (Really slow)</title>
<link>https://ask.datomic.com/index.php/862/querying-2000-entities-by-passing-in-uuids-really-slow</link>
<description>&lt;p&gt;Passing in over 2000 uuids to mysql for a fairly simple query takes milliseconds to retrieve relevant data. However we're running into an issue with datomic where it takes noticeable longer. Is there a specific syntax to use when processing such long lists, or is the linked example the only way? &lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/on-prem/query/query.html#collection-binding&quot;&gt;https://docs.datomic.com/on-prem/query/query.html#collection-binding&lt;/a&gt;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/862/querying-2000-entities-by-passing-in-uuids-really-slow</guid>
<pubDate>Wed, 14 Dec 2022 09:24:29 +0000</pubDate>
</item>
<item>
<title>Inconsistency between d/pull and d/q + pull for non-existent entities</title>
<link>https://ask.datomic.com/index.php/860/inconsistency-between-pull-and-pull-for-existent-entities</link>
<description>&lt;p&gt;Inconsistency between d/pull and d/q + pull for non-existent entities&lt;/p&gt;
&lt;p&gt;Datomic returns a map with the &lt;code&gt;:db/id&lt;/code&gt; of the entity being pulled, even if the entity doesn't exist in the database. For example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/pull (d/db conn) '[*] 9999999999)
=&amp;gt; #:db{:id 9999999999}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This behavior is somewhat confusing, especially when using &lt;code&gt;d/pull&lt;/code&gt; with time filters. I was expecting &lt;code&gt;d/pull&lt;/code&gt; to return &lt;code&gt;nil&lt;/code&gt; or &lt;code&gt;#:db{:id nil}&lt;/code&gt; if the entity wasn't created at the given point in time. However, Datomic always returns a map with the entity ID:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/pull (as-of (d/db conn) 1) '[*] 9999999999)
=&amp;gt; #:db{:id 9999999999}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Surprisingly, I see the expected behavior if I pull the entity information from a query using &lt;code&gt;d/q&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/q '{:find [(pull ?e [*])]
        :in   [?e]}
      (d/db conn) 9999999999)
=&amp;gt; [[#:db{:id nil}]]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is that difference in behavior expected? How can I determine if an entity existed at any point in time using &lt;code&gt;d/pull&lt;/code&gt;?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/860/inconsistency-between-pull-and-pull-for-existent-entities</guid>
<pubDate>Sat, 10 Dec 2022 15:55:29 +0000</pubDate>
</item>
<item>
<title>How do you add relationship properties, e.g. the time a person met another person?</title>
<link>https://ask.datomic.com/index.php/854/how-you-relationship-properties-time-person-another-person</link>
<description>&lt;p&gt;I have some experience with Neo4j / cypher. In cypher relationships are first-class citizens, so they can have properties, which I really like.&lt;/p&gt;
&lt;p&gt;How do I do something similar with datalog? Do I have to have a &quot;mapping entity&quot; in between two entities that have a relationship?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/854/how-you-relationship-properties-time-person-another-person</guid>
<pubDate>Mon, 07 Nov 2022 08:35:28 +0000</pubDate>
</item>
<item>
<title>Answered: Is there a way to create permanent aliases for reverse relationships?</title>
<link>https://ask.datomic.com/index.php/739/there-way-create-permanent-aliases-reverse-relationships?show=740#a740</link>
<description>&lt;p&gt;No, we currently do not allow you to make a permanent alias.  However, you could write a function to present this alias or are you saying that your example pull pattern does not work for displaying the alias in the results?  Finally, this example was counterintuitive to me too, but perhaps that is because to my eyes the relationship between part and whole seems backwards.  Is this exactly your schema or an example to try to capture the problem you were trying to solve for?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/739/there-way-create-permanent-aliases-reverse-relationships?show=740#a740</guid>
<pubDate>Fri, 02 Sep 2022 14:59:50 +0000</pubDate>
</item>
<item>
<title>Notifying clients of database changes in Datomic Cloud?</title>
<link>https://ask.datomic.com/index.php/719/notifying-clients-of-database-changes-in-datomic-cloud</link>
<description>&lt;p&gt;In your 2013 blog post &lt;a rel=&quot;nofollow&quot; href=&quot;https://blog.datomic.com/2013/10/the-transaction-report-queue.html&quot;&gt;The Transaction Report Queue&lt;/a&gt;, you write:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;In Datomic, you can monitor all transactions.  Any peer process in the&lt;br&gt;
system can request a transaction report queue of every transaction&lt;br&gt;
against a particular database.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Is there a change data capture or related mechanism in Datomic Cloud, where changes to the database can be pushed to a client?&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Andrew&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/719/notifying-clients-of-database-changes-in-datomic-cloud</guid>
<pubDate>Sat, 04 Jun 2022 15:18:15 +0000</pubDate>
</item>
<item>
<title>Answered: Is there an easy way to migrate data from Datomic to DocumentDB (AWS MongDB version) ?</title>
<link>https://ask.datomic.com/index.php/648/there-easy-migrate-data-datomic-documentdb-mongdb-version?show=697#a697</link>
<description>&lt;p&gt;I have not seen any specialized tool to migrate from Datomic to MongoDB, no.&lt;/p&gt;
&lt;p&gt;As always with MongoDB and similar tools, you have to know quite well exactly which queries and updates you want to perform, and how you want the exported data to be structured. If you know this, then it would be possible to create a batch job that exported the data from Datomic (make sure you use one single same db-reference/version in all the queries to get all data in sync).&lt;/p&gt;
&lt;p&gt;I guess the best way would be to export the various documents with a query that has a pull-expression describing all the data &quot;inside&quot; this Document, convert this to MongoDB update data and the convert the data to JSON (this usually has to be made somewhat custom), and then import it into the Document database.&lt;/p&gt;
&lt;p&gt;The data models and programming models are very different in Datomic and MongoDB, but I guess you are well aware of this.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/648/there-easy-migrate-data-datomic-documentdb-mongdb-version?show=697#a697</guid>
<pubDate>Mon, 10 Jan 2022 22:21:29 +0000</pubDate>
</item>
<item>
<title>Answered: How to retract entities that reference a retracted entity</title>
<link>https://ask.datomic.com/index.php/692/how-to-retract-entities-that-reference-a-retracted-entity?show=696#a696</link>
<description>&lt;p&gt;I can see some different ways to solve this problem:&lt;/p&gt;
&lt;p&gt;The first one is to make a &lt;strong&gt;special custom retraction function&lt;/strong&gt; that, given a user entity eid, also looks up the other entities that should be retracted according to some rule. This requires quite a lot of discipline in the programming of the update logic.&lt;/p&gt;
&lt;p&gt;The second solution is to add a special component attribute, only used for removing related data, preferably multiarity. When a message that refers a used is created or somehow delivered to that user, you also add a link from the user back to the message.  Now, when the user entity is removed, the special component attribute linked form the user to message also removes the users messages.&lt;/p&gt;
&lt;p&gt;The third solution is to introduce a certain reference attribute (a very generic name could be &lt;code&gt;:entity/owns&lt;/code&gt;) that is not a component attribute, but can be introspected with a special retract-entity function (on the peer side), that looks up all the links of this special attribute and see whether related entities should be removed as well, given a root eid.&lt;/p&gt;
&lt;p&gt;A fourth solution is to introduce a special attribute that can mark attributes like &lt;code&gt;:message/user&lt;/code&gt; and give a retract-strategy. When your custom retract-entity function creates retraction data for a certain entity, it also looks for attributes in this entity tagged with some certain retract strategy. Like a more advanced &lt;code&gt;:db/isComponent&lt;/code&gt; attribute.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/692/how-to-retract-entities-that-reference-a-retracted-entity?show=696#a696</guid>
<pubDate>Mon, 10 Jan 2022 22:10:44 +0000</pubDate>
</item>
<item>
<title>Answered: What is the recommended way of dumping the whole datomic schema?</title>
<link>https://ask.datomic.com/index.php/677/what-is-the-recommended-way-dumping-the-whole-datomic-schema?show=680#a680</link>
<description>&lt;p&gt;Recommendations may vary depending on what you want to accomplish? &lt;/p&gt;
&lt;p&gt;If exploring an unknown schema is a goal the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/JarrodCTaylor/schema-cartographer&quot;&gt;schema cartographer&lt;/a&gt; may be helpful. &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/677/what-is-the-recommended-way-dumping-the-whole-datomic-schema?show=680#a680</guid>
<pubDate>Fri, 05 Nov 2021 12:54:04 +0000</pubDate>
</item>
<item>
<title>Answered: Broken Web Link</title>
<link>https://ask.datomic.com/index.php/675/broken-web-link?show=678#a678</link>
<description>&lt;p&gt;Hi @ToBeJazz&lt;/p&gt;
&lt;p&gt;These examples were moved into the Datomic Samples (&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/dev-local.html#samples&quot;&gt;https://docs.datomic.com/cloud/dev-local.html#samples&lt;/a&gt;) available in Dev-local.  The link in the docs should likely now point to &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/cognitect-labs/day-of-datomic-cloud/blob/master/tutorial/filters.repl&quot;&gt;https://github.com/cognitect-labs/day-of-datomic-cloud/blob/master/tutorial/filters.repl&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I will address the docs and update! Thanks for pointing this out.&lt;/p&gt;
&lt;p&gt;-Jaret&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/675/broken-web-link?show=678#a678</guid>
<pubDate>Tue, 02 Nov 2021 12:37:14 +0000</pubDate>
</item>
<item>
<title>Answered: Data model for simple shopping app</title>
<link>https://ask.datomic.com/index.php/643/data-model-for-simple-shopping-app?show=671#a671</link>
<description>&lt;p&gt;I think I found my answer and modelled it in the same way as the course registration example in &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/schema/schema-reference.html#composite-tuples&quot;&gt;https://docs.datomic.com/cloud/schema/schema-reference.html#composite-tuples&lt;/a&gt;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/643/data-model-for-simple-shopping-app?show=671#a671</guid>
<pubDate>Thu, 07 Oct 2021 14:32:00 +0000</pubDate>
</item>
<item>
<title>Answered: Datom &quot;value&quot; - content?</title>
<link>https://ask.datomic.com/index.php/668/datom-value-content?show=669#a669</link>
<description>&lt;p&gt;The value of any given attribute is determined by the schema definition for that attribute. The valid types for an attribute can be found &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/schema/schema-reference.html#schema-map-grammar&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A value can certainly be an entity id. You would expect &lt;code&gt;:db.type/ref&lt;/code&gt; to have a value referencing another entity. &lt;/p&gt;
&lt;p&gt;&lt;code&gt;:green&lt;/code&gt; in Clojure is a &lt;a rel=&quot;nofollow&quot; href=&quot;https://clojure.org/guides/learn/syntax#_symbols_and_idents&quot;&gt;keyword&lt;/a&gt;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/668/datom-value-content?show=669#a669</guid>
<pubDate>Thu, 30 Sep 2021 20:53:32 +0000</pubDate>
</item>
<item>
<title>Answered: noHistory and transaction data</title>
<link>https://ask.datomic.com/index.php/655/nohistory-and-transaction-data?show=658#a658</link>
<description>&lt;p&gt;Hi Mitchell,&lt;/p&gt;
&lt;p&gt;Yes, the transaction will still be present in the log.  The log is a recording of all transaction data in historic order, organized for efficient access.  But I would be highly skeptical of this affecting your overall performance/size significantly, and only in reads of the log.  Could you help me understand what your underlying concern here is when you say &quot;database growth issues&quot;?&lt;/p&gt;
&lt;p&gt;Perhaps it would be useful to have a call to discuss the specifics of your use case.  If that's something you'd be interested in I can setup a call with members of our team, just shoot me an e-mail via support@cognitect.com or jaret@cognitect.com.&lt;/p&gt;
&lt;p&gt;Cheers!&lt;br&gt;
-Jaret&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/655/nohistory-and-transaction-data?show=658#a658</guid>
<pubDate>Fri, 27 Aug 2021 13:36:24 +0000</pubDate>
</item>
<item>
<title>Answered: Highly available deployments when desired capacity is 1</title>
<link>https://ask.datomic.com/index.php/650/highly-available-deployments-when-desired-capacity-is-1?show=652#a652</link>
<description>&lt;p&gt;In Slack, Jaret Binford answered:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;That &lt;strong&gt;min during update&lt;/strong&gt; is for CloudFormation updates (eg. updating to a new Datomic release.) Not Code Deploy.  Code Deploy deploys to running instances.  If you want HA during a Code Deploy you would need to have the &lt;strong&gt;desired instances&lt;/strong&gt; set to 2.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This aligns with the config's description that I had failed to read properly:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&lt;strong&gt;Minimum number of instances during update&lt;/strong&gt;: Minimum number of instances that must be in service within Auto Scaling group &lt;strong&gt;while AWS CloudFormation updates old instances&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So the setting is about compute group updates, not our app's updates.&lt;/p&gt;
&lt;p&gt;Jaret wrote further:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;If &lt;strong&gt;min during update&lt;/strong&gt; is 1, CF should scale up to 2 during an upgrade and then kill the previous instance as long as the &lt;strong&gt;maximum&lt;/strong&gt; allows for that.&lt;/p&gt;
&lt;/blockquote&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/650/highly-available-deployments-when-desired-capacity-is-1?show=652#a652</guid>
<pubDate>Fri, 20 Aug 2021 13:46:30 +0000</pubDate>
</item>
<item>
<title>How to authenticate and authorize access to API Gateway endpoints for datomic?</title>
<link>https://ask.datomic.com/index.php/651/authenticate-authorize-access-gateway-endpoints-datomic</link>
<description>&lt;p&gt;I'm currently evaluating Datomic and I've deployed a production topology using a split stack. DatomicCloudVersion is 9095 and DatomicCFTVersion is 884. The CloudFormation stack created two API Gateway endpoints: &lt;code&gt;datomic-[system]-client-api&lt;/code&gt; and &lt;code&gt;datomic-[system]-ions&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;From my local computer I can get a client by using &lt;code&gt;datomic-[system]-client-api&lt;/code&gt; endpoint:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/client {:system &quot;my-system&quot;
           :server-type :ion
           :region &quot;us-east-1&quot;
           :endpoint &quot;https://[endpoint-id].execute-api.us-east-1.amazonaws.com/&quot;})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Above, &lt;code&gt;https://[endpoint-id].execute-api.us-east-1.amazonaws.com/&lt;/code&gt; is the client-api API Gateway endpoint. It works, but the endpoint is open to the world. I then added an IAM authorizer to &lt;code&gt;datomic-[system]-client-api&lt;/code&gt; and used an authorized IAM user to make a request to the now authenticated endpoint:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;awscurl --service execute-api -X GET https://[endpoint-id].execute-api.us-east-1.amazonaws.com --profile datomic
{:s3-auth-path &quot;long s3 path&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;awscurl&lt;/code&gt; is just a tool to make authenticated calls to AWS services. As you can see, I can get a response from the endpoint by using my local profile named &quot;datomic&quot;. If I try using regular curl without the v4 AWS signature it fails:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;curl -X GET https://[endpoint-id].execute-api.us-east-1.amazonaws.com
{&quot;message&quot;:&quot;Forbidden&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Works as expected. The problem is now I can't get a client using:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/client {:system &quot;my-system&quot;
           :server-type :ion
           :region &quot;us-east-1&quot;
           :creds-profile &quot;datomic&quot;
           :endpoint &quot;https://[endpoint-id].execute-api.us-east-1.amazonaws.com/&quot;})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The response I get is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:status 403,
:headers
{&quot;apigw-requestid&quot; &quot;EUsyNi9aIAMEPlg=&quot;,
&quot;connection&quot; &quot;keep-alive&quot;,
&quot;content-length&quot; &quot;23&quot;,
&quot;date&quot; &quot;Thu, 19 Aug 2021 17:01:40 GMT&quot;,
&quot;content-type&quot; &quot;application/json&quot;},
:body &quot;{\&quot;message\&quot;:\&quot;Forbidden\&quot;}&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It is as if the &lt;code&gt;d/client&lt;/code&gt; call is ignoring the profile or not generating the proper signature. I tried setting the &lt;code&gt;AWS_PROFILE&lt;/code&gt; environment variable as well, to no avail.&lt;/p&gt;
&lt;p&gt;Is using an IAM Authorizer not the proper way to go? How can I protect both the client-api and ions endpoints? Finally, what's the difference between the client-api and ions endpoints?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/651/authenticate-authorize-access-gateway-endpoints-datomic</guid>
<pubDate>Thu, 19 Aug 2021 17:05:29 +0000</pubDate>
</item>
<item>
<title>Datomic returns empty results where &quot;Insufficient bindings, will cause db scan&quot; exception is expected</title>
<link>https://ask.datomic.com/index.php/644/datomic-returns-insufficient-bindings-exception-expected</link>
<description>&lt;p&gt;Hello&lt;/p&gt;
&lt;p&gt;If we change &lt;code&gt;#uuid&quot;...&quot;&lt;/code&gt; to &lt;code&gt;&quot;&quot;&lt;/code&gt; (from uuid to string), we get the exception (desired behavior)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -Sdeps '{:deps {com.datomic/dev-local {:mvn/version &quot;0.9.232&quot;}}}' -M \
  -e &quot;(require '[datomic.client.api :as d])&quot; \
  -e '(def client (d/client {:server-type :dev-local :system &quot;hello&quot;}))' \
  -e '(d/create-database client {:db-name &quot;hello&quot;})' \
  -e '(def conn (d/connect client {:db-name &quot;hello&quot;}))' \
  -e &quot;(d/q '[:find ?e :where [?e _ #uuid\&quot;00000000-0000-0000-0000-000000000000\&quot;]] (d/db conn))&quot;
=&amp;gt; #'user/client
=&amp;gt; true
=&amp;gt; #'user/conn
=&amp;gt; []
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Occour on (old) versions of datomic-free too&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;clj -Sdeps '{:deps {com.datomic/datomic-free {:mvn/version &quot;0.9.5697&quot;}}}' \
  -M --report stderr \
  -e &quot;(require '[datomic.api :as d])&quot; \
  -e '(d/create-database &quot;datomic:mem://hello&quot;)' \
  -e '(def conn (d/connect &quot;datomic:mem://hello&quot;))' \
  -e &quot;(d/q '[:find ?e :where [?e _ #uuid\&quot;00000000-0000-0000-0000-000000000000\&quot;]] (d/db conn))&quot;
WARNING: requiring-resolve already refers to: #'clojure.core/requiring-resolve in namespace: datomic.common, being replaced by: #'datomic.common/requiring-resolve
=&amp;gt; true
=&amp;gt; #'user/conn
=&amp;gt; #{}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/644/datomic-returns-insufficient-bindings-exception-expected</guid>
<pubDate>Wed, 07 Jul 2021 14:30:05 +0000</pubDate>
</item>
<item>
<title>Answered: Query values for more than one entity in a single datomic query (Roam Alpha Api)</title>
<link>https://ask.datomic.com/index.php/640/query-values-more-than-entity-single-datomic-query-roam-alpha?show=642#a642</link>
<description>&lt;p&gt;I believe you want something similar to the following:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/q '[:find ?e ?stri
       :in $ [?block-id ...]
       :where [?e :block/uid ?block-id]
              [?e :block/string ?stri]] 
     db [&quot;YjpbFUsTx&quot; &quot;TgpgOssBM&quot;])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/query/query-data-reference.html#collection-binding&quot;&gt;https://docs.datomic.com/cloud/query/query-data-reference.html#collection-binding&lt;/a&gt;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/640/query-values-more-than-entity-single-datomic-query-roam-alpha?show=642#a642</guid>
<pubDate>Fri, 02 Jul 2021 02:45:50 +0000</pubDate>
</item>
<item>
<title>Answered: Failure to transact a DB after delete and re-create</title>
<link>https://ask.datomic.com/index.php/630/failure-to-transact-a-db-after-delete-and-re-create?show=639#a639</link>
<description>&lt;p&gt;Prefer generating or appending unique (e.g., UUID) names to databases that are intended to be short-lived. Deleting and creating a database of the same name in a tight cycle is not a behavior that Datomic makes guarantees for or is designed around. &lt;/p&gt;
&lt;p&gt;My guess is the deployment step is helpful only because it takes time which is allowing proper cleanup of the previous database to occur. &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/630/failure-to-transact-a-db-after-delete-and-re-create?show=639#a639</guid>
<pubDate>Fri, 25 Jun 2021 17:48:00 +0000</pubDate>
</item>
<item>
<title>ClassCastException, d/with  inside transact function</title>
<link>https://ask.datomic.com/index.php/638/classcastexception-d-with-inside-transact-function</link>
<description>&lt;p&gt;Calling a transaction function that uses d/with in a dev-local, filesystem (i.e., not :storage-dir :mem) throws a ClassCastException on internal Datomic code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;com.datomic/dev-local {:mvn/version &quot;0.9.232&quot;}&lt;/li&gt;
&lt;li&gt;client-cloud 0.8.105&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Example with exception using file system dev-local.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def client (d/client {:server-type :dev-local
                         :storage-dir &quot;/tmp/cce-bug3&quot;
                         :system      &quot;test&quot;}))
=&amp;gt; #'user/client
(d/create-database client {:db-name &quot;test&quot;})
=&amp;gt; true
(def conn (d/connect client {:db-name &quot;test&quot;}))
=&amp;gt; #'user/conn
(d/transact conn {:tx-data [{:db/ident       :user/name
                               :db/valueType   :db.type/string
                               :db/cardinality :db.cardinality/one}]})
=&amp;gt;
{:db-before #datomic.core.db.Db{:id &quot;test&quot;,
                                :basisT 5,
                                :indexBasisT 0,
                                :index-root-id nil,
                                :asOfT nil,
                                :sinceT nil,
                                :raw nil},
 :db-after #datomic.core.db.Db{:id &quot;test&quot;,
                               :basisT 6,
                               :indexBasisT 0,
                               :index-root-id nil,
                               :asOfT nil,
                               :sinceT nil,
                               :raw nil},
 :tx-data [#datom[13194139533318 50 #inst&quot;2021-05-09T00:49:46.400-00:00&quot; 13194139533318 true]
           #datom[73 10 :user/name 13194139533318 true]
           #datom[73 40 23 13194139533318 true]
           #datom[73 41 35 13194139533318 true]
           #datom[0 13 73 13194139533318 true]],
 :tempids {}}
(defn my-tx-fn
    [db argm]
    (let [tx-report (d/with db {:tx-data [{:user/name &quot;asd&quot;}]})]
      []))
=&amp;gt; #'user/my-tx-fn
(d/transact conn {:tx-data [(list 'user/my-tx-fn {})]})
Execution error (ClassCastException) at datomic.dev-local.tx/datom-lookup-valfn (tx.clj:397).
class datomic.core.db.Datum cannot be cast to class java.lang.Number (datomic.core.db.Datum is in unnamed module of loader 'app'; java.lang.Number is in module java.base of loader 'bootstrap')
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Working memdb example.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def client-memdb (d/client {:server-type :dev-local
                               :storage-dir :mem
                               :system      &quot;test&quot;}))
=&amp;gt; #'user/client-memdb
(d/create-database client-memdb {:db-name &quot;test&quot;})
=&amp;gt; true
(def conn-memdb (d/connect client-memdb {:db-name &quot;test&quot;}))
=&amp;gt; #'user/conn-memdb
(d/transact conn-memdb {:tx-data [{:db/ident       :user/name
                                     :db/valueType   :db.type/string
                                     :db/cardinality :db.cardinality/one}]})
=&amp;gt;
{:db-before #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                                :basisT 5,
                                :indexBasisT 0,
                                :index-root-id nil,
                                :asOfT nil,
                                :sinceT nil,
                                :raw nil},
 :db-after #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                               :basisT 6,
                               :indexBasisT 0,
                               :index-root-id nil,
                               :asOfT nil,
                               :sinceT nil,
                               :raw nil},
 :tx-data [#datom[13194139533318 50 #inst&quot;2021-05-09T01:02:57.965-00:00&quot; 13194139533318 true]
           #datom[73 10 :user/name 13194139533318 true]
           #datom[73 40 23 13194139533318 true]
           #datom[73 41 35 13194139533318 true]
           #datom[0 13 73 13194139533318 true]],
 :tempids {}}
(d/transact conn-memdb {:tx-data [(list 'user/my-tx-fn {})]})
=&amp;gt;
{:db-before #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                                :basisT 6,
                                :indexBasisT 0,
                                :index-root-id nil,
                                :asOfT nil,
                                :sinceT nil,
                                :raw nil},
 :db-after #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                               :basisT 7,
                               :indexBasisT 0,
                               :index-root-id nil,
                               :asOfT nil,
                               :sinceT nil,
                               :raw nil},
 :tx-data [#datom[13194139533319 50 #inst&quot;2021-05-09T01:03:08.042-00:00&quot; 13194139533319 true]],
 :tempids {}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Expectation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Transaction functions that use d/with do not throw a ClassCastException. Additionally, the behavior of d/with in all Datomic environments (Cloud, File system, Memdb) is consistent. Given a &lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/datomic-cloud-589-8846/1328&quot;&gt;previous Datomic Cloud release&lt;/a&gt; fixed a problem with using with-db from an Ion, it seems using d/with in a transaction function is a supported behavior.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Actual&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The final d/transact transaction function throws a ClassCastException when using d/with on some internal Datomic code. This only occurs when using a dev-local, file system environment.&lt;/p&gt;
&lt;p&gt;Full stacktrace is pasted below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#error{:cause &quot;class datomic.core.db.Datum cannot be cast to class java.lang.Number (datomic.core.db.Datum is in unnamed module of loader 'app'; java.lang.Number is in module java.base of loader 'bootstrap')&quot;,
       :via [{:type java.lang.ClassCastException,
              :message &quot;class datomic.core.db.Datum cannot be cast to class java.lang.Number (datomic.core.db.Datum is in unnamed module of loader 'app'; java.lang.Number is in module java.base of loader 'bootstrap')&quot;,
              :at [datomic.dev_local.tx$datom_lookup_valfn invokeStatic &quot;tx.clj&quot; 397]}],
       :trace [[datomic.dev_local.tx$datom_lookup_valfn invokeStatic &quot;tx.clj&quot; 397]
               [datomic.dev_local.tx$datom_lookup_valfn invoke &quot;tx.clj&quot; 397]
               [datomic.dev_local.local_log.LocalLog valAt &quot;local_log.clj&quot; 56]
               [clojure.lang.RT get &quot;RT.java&quot; 760]
               [datomic.dev_local.btindex.BTIndex cons &quot;btindex.clj&quot; 281]
               [clojure.lang.RT conj &quot;RT.java&quot; 677]
               [clojure.core$conj__5390 invokeStatic &quot;core.clj&quot; 85]
               [clojure.core$conj__5390 invoke &quot;core.clj&quot; 82]
               [datomic.core.db.Db addData &quot;db.clj&quot; 2322]
               [datomic.core.db$add_ensured_data invokeStatic &quot;db.clj&quot; 3353]
               [datomic.core.db$add_ensured_data invoke &quot;db.clj&quot; 3351]
               [datomic.core.db$with_tx invokeStatic &quot;db.clj&quot; 3370]
               [datomic.core.db$with_tx invoke &quot;db.clj&quot; 3357]
               [datomic.core.db.Db with &quot;db.clj&quot; 2164]
               [datomic.core.local_db$fn__25633 invokeStatic &quot;local_db.clj&quot; 67]
               [datomic.core.local_db$fn__25633 invoke &quot;local_db.clj&quot; 24]
               [datomic.client.api.protocols$fn__11959$G__11877__11966 invoke &quot;protocols.clj&quot; 126]
               [datomic.client.api$with invokeStatic &quot;api.clj&quot; 363]
               [datomic.client.api$with invoke &quot;api.clj&quot; 353]
               [user$my_tx_fn invokeStatic &quot;user.clj&quot; 3]
               [user$my_tx_fn invoke &quot;user.clj&quot; 20]
               [clojure.lang.AFn applyToHelper &quot;AFn.java&quot; 156]
               [clojure.lang.AFn applyTo &quot;AFn.java&quot; 144]
               [clojure.lang.Var applyTo &quot;Var.java&quot; 705]
               [clojure.core$apply invokeStatic &quot;core.clj&quot; 667]
               [clojure.core$apply invoke &quot;core.clj&quot; 660]
               [datomic.core.db.ProcessExpander inject &quot;db.clj&quot; 3229]
               [datomic.core.db.ProcessInpoint inject &quot;db.clj&quot; 2950]
               [datomic.dev_local.btindex_db$expand_tx$inject_all__18586$fn__18587 invoke &quot;btindex_db.clj&quot; 440]
               [clojure.lang.PersistentVector reduce &quot;PersistentVector.java&quot; 343]
               [clojure.core$reduce invokeStatic &quot;core.clj&quot; 6827]
               [clojure.core$reduce invoke &quot;core.clj&quot; 6810]
               [datomic.dev_local.btindex_db$expand_tx$inject_all__18586 invoke &quot;btindex_db.clj&quot; 440]
               [datomic.dev_local.btindex_db$expand_tx invokeStatic &quot;btindex_db.clj&quot; 444]
               [datomic.dev_local.btindex_db$expand_tx invoke &quot;btindex_db.clj&quot; 429]
               [datomic.dev_local.btindex_db$with_tx invokeStatic &quot;btindex_db.clj&quot; 468]
               [datomic.dev_local.btindex_db$with_tx invoke &quot;btindex_db.clj&quot; 461]
               [datomic.dev_local.impl.DurableConnection transact &quot;impl.clj&quot; 161]
               [datomic.client.api$transact invokeStatic &quot;api.clj&quot; 200]
               [datomic.client.api$transact invoke &quot;api.clj&quot; 183]
               [user$eval124260 invokeStatic &quot;user.clj&quot; 25]
               [user$eval124260 invoke &quot;user.clj&quot; 25]
               [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7177]
               [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7132]
               [clojure.core$eval invokeStatic &quot;core.clj&quot; 3214]
               [clojure.core$eval invoke &quot;core.clj&quot; 3210]
               [nrepl.middleware.interruptible_eval$evaluate$fn__959 invoke &quot;interruptible_eval.clj&quot; 91]
               [clojure.main$repl$read_eval_print__9086$fn__9089 invoke &quot;main.clj&quot; 437]
               [clojure.main$repl$read_eval_print__9086 invoke &quot;main.clj&quot; 437]
               [clojure.main$repl$fn__9095 invoke &quot;main.clj&quot; 458]
               [clojure.main$repl invokeStatic &quot;main.clj&quot; 458]
               [clojure.main$repl doInvoke &quot;main.clj&quot; 368]
               [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 1523]
               [nrepl.middleware.interruptible_eval$evaluate invokeStatic &quot;interruptible_eval.clj&quot; 84]
               [nrepl.middleware.interruptible_eval$evaluate invoke &quot;interruptible_eval.clj&quot; 56]
               [nrepl.middleware.interruptible_eval$interruptible_eval$fn__985$fn__989
                invoke
                &quot;interruptible_eval.clj&quot;
                155]
               [clojure.lang.AFn run &quot;AFn.java&quot; 22]
               [nrepl.middleware.session$session_exec$main_loop__1086$fn__1090 invoke &quot;session.clj&quot; 190]
               [nrepl.middleware.session$session_exec$main_loop__1086 invoke &quot;session.clj&quot; 189]
               [clojure.lang.AFn run &quot;AFn.java&quot; 22]
               [java.lang.Thread run &quot;Thread.java&quot; 829]]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Evidence&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The previously pasted example is reproducible and always throws a ClassCastException.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We are unable to test functionality in a consistent manner. Local setups using dev-local file systems will not function as expected. Developers are unable to test features in the same way they will work in production.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/638/classcastexception-d-with-inside-transact-function</guid>
<pubDate>Thu, 24 Jun 2021 14:57:51 +0000</pubDate>
</item>
<item>
<title>d/client external server communication</title>
<link>https://ask.datomic.com/index.php/637/d-client-external-server-communication</link>
<description>&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;com.datomic/client-cloud 0.8.105&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Get the docstring for &lt;code&gt;d/client&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(clojure.repl/doc d/client)
-------------------------
datomic.client.api/client
([arg-map])
  Create a client for a Datomic system. This function does not
communicate with a server and returns immediately.

For a cloud system, arg-map requires:

  :server-type   - :cloud
  :region        - AWS region, e.g. &quot;us-east-1&quot;
  :system        - your system name
  :endpoint      - IP address of your system or query group

Optionally, a cloud system arg-map accepts:

  :creds-provider  - instance of com.amazonaws.auth.AWSCredentialsProvider. Defaults to DefaultAWSCredentialsProviderChain
  :creds-profile   - name of an AWS Named Profile. See http://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html
  :proxy-port      - local port for SSH tunnel to bastion 

  Note: :creds-provider and :creds-profile are mutually exclusive, providing both will result in an error.

For a dev-local system, arg-map comprises:

  :server-type   - :dev-local (required)
  :system        - a system name (required)
  :storage-dir   - optional, overrides :storage-dir in ~/.datomic/dev-local.edn

dev-local stores databases under ${storage-dir}/${system}/${db-name}.

For a peer-server system, arg-map requires:

  :server-type   - :peer-server
  :access-key    - access-key from peer server launch
  :secret        - secret from peer server launch
  :endpoint      - peer server host:port
  :validate-hostnames  - false

Returns a client object.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note the second sentence in the docstring: &quot;This function does not communicate with a server and returns immediately.&quot; Next call &lt;code&gt;d/client&lt;/code&gt; with an endpoint that does not exist.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/client {:server-type :ion
             :system      &quot;my-system&quot;
             :endpoint    &quot;http://i-dont-exist.datomic.net:8182&quot;
             :region      &quot;us-west-2&quot;})
Execution error (ExceptionInfo) at datomic.client.impl.cloud/get-s3-auth-path (cloud.clj:179).
Unable to connect to http://i-dont-exist.datomic.net:8182
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Expectation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Calling &lt;code&gt;d/client&lt;/code&gt; does not communicate with a server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Actual&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Calling &lt;code&gt;d/client&lt;/code&gt; does communicate with a server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evidence&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The above reproducible example indicates the &lt;code&gt;d/client&lt;/code&gt; function call is attempted to communicate the the passing in &lt;code&gt;:endpoint&lt;/code&gt; string given the exception thrown.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;d/client&lt;/code&gt; docstring misleads the user by saying no server communication will occur when it does occur. The result is calls to &lt;code&gt;d/client&lt;/code&gt; can fail in unexpected ways when an external server communication is not accounted for. For example, we spin up Datomic Cloud query groups dynamically and attempt to communicate with the newly spun up cluster. Until the cluster is up and healthy, we expect calls to fail at &lt;code&gt;d/connect&lt;/code&gt; with an unavailable anomaly, and instead the calls would fail at &lt;code&gt;d/client&lt;/code&gt; with an unavailable anomaly.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/637/d-client-external-server-communication</guid>
<pubDate>Thu, 24 Jun 2021 14:55:59 +0000</pubDate>
</item>
<item>
<title>Answered: DDB size reduction after restore</title>
<link>https://ask.datomic.com/index.php/618/ddb-size-reduction-after-restore?show=627#a627</link>
<description>&lt;p&gt;Just curios, how much memory the peer eats? Is it the same size for both DBs?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/618/ddb-size-reduction-after-restore?show=627#a627</guid>
<pubDate>Fri, 18 Jun 2021 14:57:15 +0000</pubDate>
</item>
<item>
<title>Add query group ASG metrics to query group CW dashboard</title>
<link>https://ask.datomic.com/index.php/619/add-query-group-asg-metrics-to-query-group-cw-dashboard</link>
<description>&lt;p&gt;When looking at the query group dashboard, it is helpful to know what &quot;state&quot; the ASG was in when referencing the various dashboard metrics. Currently, I must do one of the following: 1) reference these metrics in the ASG monitoring tab (e.g., &lt;a rel=&quot;nofollow&quot; href=&quot;https://us-west-2.console.aws.amazon.com/ec2autoscaling/home?region=us-west-2#/details/my-query-group?view=monitoring&quot;&gt;https://us-west-2.console.aws.amazon.com/ec2autoscaling/home?region=us-west-2#/details/my-query-group?view=monitoring&lt;/a&gt;), 2) create a CW dashboard of my own, 3) modify the existing Datomic CW dashboard to add this chart. The ASG metrics answer questions like: 1) how many instances was my query group running? 2) was my query group trying to scale out or in? 3) why did my query group not scale out or in? &lt;/p&gt;
&lt;p&gt;I would find the following &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-instance-monitoring.html#available-cloudwatch-metrics&quot;&gt;ASG metrics&lt;/a&gt; (in order of importance) useful additions to the current query group dashboard.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;In Service Instances (Count)&lt;/li&gt;
&lt;li&gt;Minimum Group Size (Count), Maximum Group Size (Count), and Desired Capacity (Count)&lt;/li&gt;
&lt;li&gt;Pending Instances (Count)&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/619/add-query-group-asg-metrics-to-query-group-cw-dashboard</guid>
<pubDate>Thu, 27 May 2021 17:22:27 +0000</pubDate>
</item>
<item>
<title>How might multiple systems serve the same database in different contexts?</title>
<link>https://ask.datomic.com/index.php/617/might-multiple-systems-serve-database-different-contexts</link>
<description>&lt;p&gt;From &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/operation/planning.html#namin&quot;&gt;the guide on naming&lt;/a&gt; there is the following quote:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;Multiple systems might serve the same primary database in different development stages. So you might name systems via the convention &quot;[db]-[stage]&quot;, e.g.&quot;inventory-dev&quot;, &quot;inventory-staging&quot; and &quot;inventory-prod&quot;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I'm trying to understand how this would work, and how I should think about my system, application, and database name, but I'm not really sure how this would work.&lt;/p&gt;
&lt;p&gt;My understanding was that you have one System per Storage stack, plus some number of Compute stacks, and that databases are &quot;owned&quot; by the Storage stack, but that doesn't make sense with the quote above.&lt;/p&gt;
&lt;p&gt;Can anyone give some examples of how this would work? I've read &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/operation/planning.html&quot;&gt;the planning guide&lt;/a&gt; but almost certainly don't fully understand it.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;br&gt;
Evan&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/617/might-multiple-systems-serve-database-different-contexts</guid>
<pubDate>Mon, 24 May 2021 15:16:46 +0000</pubDate>
</item>
<item>
<title>What is a performant way to do &quot;and&quot; matching on attribute values?</title>
<link>https://ask.datomic.com/index.php/613/what-is-performant-way-to-do-and-matching-on-attribute-values</link>
<description>&lt;p&gt;So I can use&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[?entity1 ?attrname1 ?attrval]
[?entity2 ?attrname2 ?attrval]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;in a &lt;code&gt;:where&lt;/code&gt;  clause to get &lt;code&gt;?entity1&lt;/code&gt; and &lt;code&gt;?entity2&lt;/code&gt; where there exists an &lt;code&gt;?attrval&lt;/code&gt; that matches&lt;/p&gt;
&lt;p&gt;I'm using&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  [(q '[:find (seq ?attrval)
        :in $ ?entity ?attrname
        :where [?entity ?attrname ?attrval]]
      db ?entity1 ?attrname1) [[?attrvals1]]]
  [(q '[:find (seq ?attrval)
        :in $ ?entity ?attrname
        :where [?entity ?attrname ?attrval]]
      db ?entity2 ?attrname2) [[?attrvals2]]]
  (not-join [?attrvals1 ?attrvals2]
               [(seq ?attrvals1) [?element ...]]
               (not [(contains? ?attrvals2 ?element)]))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to get &lt;code&gt;?entity1&lt;/code&gt;  and &lt;code&gt;?entity2&lt;/code&gt; where all &lt;code&gt;?attrval&lt;/code&gt;s for &lt;code&gt;?entity1&lt;/code&gt; exist for &lt;code&gt;?entity2&lt;/code&gt;. Is there a more performant way to do this??&lt;br&gt;
(This feels like a directional &quot;and&quot; to the implicit &quot;or&quot; being applied to each &lt;code&gt;attrval&lt;/code&gt; matching in the first case)&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/613/what-is-performant-way-to-do-and-matching-on-attribute-values</guid>
<pubDate>Fri, 21 May 2021 18:04:41 +0000</pubDate>
</item>
<item>
<title>AssertionError shows up as an Event?</title>
<link>https://ask.datomic.com/index.php/609/assertionerror-shows-up-as-an-event</link>
<description>&lt;p&gt;This surprised me.  In a lambda invocation, a failed &lt;code&gt;assert&lt;/code&gt; shows up as an &lt;code&gt;Event&lt;/code&gt;. I would have expected &lt;code&gt;Alert&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;Msg&quot;: &quot;IonLambdaException&quot;,
&quot;Ex&quot;: {
    &quot;Via&quot;: [
        {
            &quot;Type&quot;: &quot;java.lang.AssertionError&quot;,
            &quot;Message&quot;: &quot;Assert failed: (= (count s) 16)&quot;,
        }
    ],
    &quot;Cause&quot;: &quot;Assert failed: (= (count s) 16)&quot;
},
&quot;Type&quot;: &quot;Event&quot;,
&quot;Tid&quot;: 338,
&quot;Timestamp&quot;: 162134781093
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/609/assertionerror-shows-up-as-an-event</guid>
<pubDate>Tue, 18 May 2021 15:33:51 +0000</pubDate>
</item>
<item>
<title>Use Launch Template instead of Launch Configuration</title>
<link>https://ask.datomic.com/index.php/607/use-launch-template-instead-of-launch-configuration</link>
<description>&lt;p&gt;The compute Datomic CloudFormation templates (primary and query groups) create ASGs using launch configurations. Launch configurations do not support the full set of Auto Scaling group features. For example, you cannot create an Auto Scaling group that launches both Spot and On-Demand Instances or that specifies multiple instance types or multiple launch templates. In fact, &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-asg.html&quot;&gt;AWS recommends&lt;/a&gt; creating ASGs using launch templates, not launch configurations. &lt;/p&gt;
&lt;p&gt;We are interested in launch templates for its support for using Spot and On-Demand instances.&lt;/p&gt;
&lt;p&gt;EDIT: As of &lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.amazon.com/blogs/compute/amazon-ec2-auto-scaling-will-no-longer-add-support-for-new-ec2-features-to-launch-configurations/&quot;&gt;2021-10-20&lt;/a&gt;, launch templates will not receive any new EC2 ASG features. &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/607/use-launch-template-instead-of-launch-configuration</guid>
<pubDate>Fri, 07 May 2021 23:38:51 +0000</pubDate>
</item>
<item>
<title>Support for recent AWS instance types</title>
<link>https://ask.datomic.com/index.php/604/support-for-recent-aws-instance-types</link>
<description>&lt;p&gt;AWS has released several new instance types that are much better price per performance. It'd be great to have the Datomic query group template updated to support these instance types. The Datomic query group template currently supports the following instance types: t3.medium, m5.large, i3.large, i3.xlarge. Based on this, I propose the following additions: &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;t3a.medium (~10% cheaper than t3.medium)&lt;/li&gt;
&lt;li&gt;m5a.large (~10% cheaper than m5.large)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If Datomic can run on ARM based processors then further additions can be made with even better price per performance (the new AWS Graviton2 processors are fantastic. &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.honeycomb.io/blog/graviton2-one-year-retrospective/&quot;&gt;Read about Honeycomb's success&lt;/a&gt;).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;t4g.medium (perhaps also large and xlarge, ~20% cheaper than t3.medium)&lt;/li&gt;
&lt;li&gt;m6g.large (~20% cheaper than m5.large)&lt;/li&gt;
&lt;li&gt;r6gd.large	(has NVMe based SSD, 26% cheaper than i3.large)&lt;/li&gt;
&lt;li&gt;I4i (&lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.amazon.com/blogs/aws/new-storage-optimized-amazon-ec2-instances-i4i-powered-by-intel-xeon-scalable-ice-lake-processors/&quot;&gt;released 2022-04-28&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Datomic Solo instance type could also be configurable for some inconsequential savings. See monthly prices below:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;(Current) t3.small primary + t3.nano bastion: $18.90&lt;/li&gt;
&lt;li&gt;t3a.small + t3a.nano: $17.15&lt;/li&gt;
&lt;li&gt;t4g.small + t4g.nano: $15.33&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An example Datomic query group monthly prices. Take a query group with 2 nodes running for the full month. &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;(Current) m5.large: $140.16&lt;/li&gt;
&lt;li&gt;m5a.large: $125.56 ($14.6/month savings)&lt;/li&gt;
&lt;li&gt;m6g.large: $112.42 ($27.74/month savings)&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/604/support-for-recent-aws-instance-types</guid>
<pubDate>Wed, 24 Mar 2021 18:36:03 +0000</pubDate>
</item>
<item>
<title>Make DesiredCapacity an optional parameter in the query group CF template</title>
<link>https://ask.datomic.com/index.php/603/desiredcapacity-optional-parameter-query-group-template</link>
<description>&lt;p&gt;Currently (March 2021) the Datomic query group CF template has the DesiredCapacity parameter marked as required. Because of this, during a CF template update, CF will always set the DesiredCapacity to the CF parameter for DesiredCapacity. This behavior does not work well in the following situation. &lt;/p&gt;
&lt;p&gt;In the query group template I have the &lt;code&gt;DesiredCapacity&lt;/code&gt; at 2, and &lt;code&gt;MaxCount&lt;/code&gt; at 4. I have an ASG scaling policy to target track 50% average CPU utilization. My query group is currently at the max, because the ASG scaling policy scaled up the group DesiredCapacity to 4 (to match my load). My load has increased to the point where 4 nodes is no longer sufficient. I must update the query group CF template to increase the MacCount. The problem is that when you update the MacCount from 4 to 6 via a CF template update and leave the DesiredCapacity at 2, CF will actually set the DesiredCapacity on the ASG to 2 during the high load situation. This worsens the high load situation. &lt;/p&gt;
&lt;p&gt;One option is to query the ASG for its current DesiredCapacity prior to running a CF update and set the CF parameter to the value you retrieved. This approach complicates the update procedure. It also has a &quot;read-modify-write&quot; race condition -- the DesiredCapacity could have changed from the time you read the DesiredCapacity to the time you are performing the CF update. &lt;/p&gt;
&lt;p&gt;A second option is to make the &lt;code&gt;DesiredCapacity&lt;/code&gt; parameter optional. As per the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html#cfn-as-group-desiredcapacity&quot;&gt;CF docs&lt;/a&gt;, &lt;code&gt;DesiredCapacity&lt;/code&gt; is not a required parameter. When it is not present, it defaults to the minimum size of the group. Leaving &lt;code&gt;DesiredCapacity&lt;/code&gt; unset will make it so during a CF update, CF will not modify the &lt;code&gt;DesiredCapacity&lt;/code&gt; at all -- leaving the ASG &quot;in control.&quot;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/603/desiredcapacity-optional-parameter-query-group-template</guid>
<pubDate>Wed, 24 Mar 2021 17:24:25 +0000</pubDate>
</item>
<item>
<title>I am now seeing Iterator+offset is not available doing a an index-pull</title>
<link>https://ask.datomic.com/index.php/601/am-now-seeing-iterator-offset-not-available-doing-index-pull</link>
<description>&lt;p&gt;I am doing an index-pull in Datomic Cloud.  The request was timing out so I addedd :timeout 300000 and not &quot;Iterator+offset is not available&quot; exception starts popping up&lt;/p&gt;
&lt;p&gt;We are on 781-9041&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/601/am-now-seeing-iterator-offset-not-available-doing-index-pull</guid>
<pubDate>Mon, 08 Mar 2021 16:46:35 +0000</pubDate>
</item>
<item>
<title>Answered: Stack creation fails in AWS Control-Tower enrolled account</title>
<link>https://ask.datomic.com/index.php/593/stack-creation-fails-in-aws-control-tower-enrolled-account?show=595#a595</link>
<description>&lt;p&gt;After cleaning out the leftovers from my previous creation attempts, the Cloud Formation succeeded in creating the stack.&lt;/p&gt;
&lt;p&gt;I made sure not to schedule the deletion of the KMS key for datomic, as it might impede the re-creation of the stack.&lt;/p&gt;
&lt;p&gt;I'm not sure what made it pass this time, but it did.&lt;/p&gt;
&lt;p&gt;So if you were wondering like me, it looks like Control Tower's default guardrails are not incompatible with Datomic Cloud.&lt;/p&gt;
&lt;p&gt;This was our second stack under AWS Control Tower, but our previous stack had been created in an AWS account prior to its enrollment in the Organization.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/593/stack-creation-fails-in-aws-control-tower-enrolled-account?show=595#a595</guid>
<pubDate>Fri, 26 Feb 2021 14:40:21 +0000</pubDate>
</item>
<item>
<title>Answered: Are Ions the only way to develop applications with Datomic Cloud?</title>
<link>https://ask.datomic.com/index.php/591/are-ions-the-only-way-develop-applications-with-datomic-cloud?show=592#a592</link>
<description>&lt;p&gt;I'm under the impression that any EC2 instance you stand &lt;strong&gt;in the datomic cloud's VPC&lt;/strong&gt; will be able to connect to Datomic Cloud through the Datomic client-cloud lib.&lt;/p&gt;
&lt;p&gt;I never tried it, though. Please share back if you find a definitive answer!&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/591/are-ions-the-only-way-develop-applications-with-datomic-cloud?show=592#a592</guid>
<pubDate>Fri, 26 Feb 2021 12:41:13 +0000</pubDate>
</item>
<item>
<title>Answered: String length limit cloud vs dev-local</title>
<link>https://ask.datomic.com/index.php/567/string-length-limit-cloud-vs-dev-local?show=568#a568</link>
<description>&lt;p&gt;The limit in Cloud is 4,096 and are correct as documented in both cases.  You should write programs that adhere to this documentation because the implementation could enforce the documented limit at any time.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/567/string-length-limit-cloud-vs-dev-local?show=568#a568</guid>
<pubDate>Tue, 05 Jan 2021 16:04:48 +0000</pubDate>
</item>
<item>
<title>Answered: Can you use d/with inside a Cloud transaction function?</title>
<link>https://ask.datomic.com/index.php/557/can-you-use-d-with-inside-a-cloud-transaction-function?show=565#a565</link>
<description>&lt;p&gt;Found this bug and the discussions says it has been fixed &lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/d-with-not-working-inside-tx-fn/1243&quot;&gt;https://forum.datomic.com/t/d-with-not-working-inside-tx-fn/1243&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;So it seems, that it should be possible.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/557/can-you-use-d-with-inside-a-cloud-transaction-function?show=565#a565</guid>
<pubDate>Mon, 04 Jan 2021 09:12:24 +0000</pubDate>
</item>
<item>
<title>Dev-local query does not support :timeout</title>
<link>https://ask.datomic.com/index.php/564/dev-local-query-does-not-support-timeout</link>
<description>&lt;p&gt;Dev-local 0.9.229 does not appear to support &lt;code&gt;:timeout&lt;/code&gt; when querying. Here is a repro. &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def client (d/client {:server-type :dev-local
                       :system      &quot;example&quot;}))
(d/create-database client {:db-name &quot;example&quot;})
(def conn (d/connect client {:db-name &quot;example&quot;}))
(d/transact conn {:tx-data [{:db/ident       :string
                             :db/cardinality :db.cardinality/one
                             :db/valueType   :db.type/string}]})
(dotimes [n 1000]
  (d/transact conn {:tx-data (map (fn [i]
                                    {:string (str n i)}) (range 1000))}))
(first
  (d/q {:query   '[:find (pull ?e [*])
                   :where
                   [?e :string]]
        :timeout 1000
        :args    [(d/db conn)]}))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The query takes longer than 1s and does not throw. I would have expected an exception thrown. &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/564/dev-local-query-does-not-support-timeout</guid>
<pubDate>Wed, 30 Dec 2020 21:25:39 +0000</pubDate>
</item>
<item>
<title>Allow dev-local import-cloud :source and :dest to work with any :server-type</title>
<link>https://ask.datomic.com/index.php/561/allow-dev-local-import-cloud-source-dest-work-with-server-type</link>
<description>&lt;p&gt;Currently &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/dev-local.html#import-cloud&quot;&gt;import-cloud&lt;/a&gt; requires the &lt;code&gt;:source&lt;/code&gt; client &lt;code&gt;:server-type&lt;/code&gt; to be &lt;code&gt;:cloud&lt;/code&gt; and the &lt;code&gt;:dest&lt;/code&gt; &lt;code&gt;:server-type&lt;/code&gt; to be &lt;code&gt;:dev-local&lt;/code&gt;. It'd be great if this function allowed any &lt;code&gt;:server-type&lt;/code&gt; to be passed for &lt;code&gt;:source&lt;/code&gt; and &lt;code&gt;:dest&lt;/code&gt;. A possible use case would be copying a dev-local database to a cloud system for testing in a staging environment. &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/561/allow-dev-local-import-cloud-source-dest-work-with-server-type</guid>
<pubDate>Sun, 20 Dec 2020 00:37:33 +0000</pubDate>
</item>
</channel>
</rss>