![]() Use your Experience Platform Database credential value: prod:all.įor more information on finding your database name, host, port, and login credentials, please read the credentials guide. The configuration JSON file for non-expiring credentials is a one-time download during their initialization that Adobe does not keep a copy of. If you want to use non-expiring credentials, this value is the concatenated arguments from the technicalAccountID and the credential downloaded in the configuration JSON file. This alphanumeric string is your Experience Platform Password credential. Leave the field blank to use your Mac login name. You must use port 80 or 5432 to connect with Query Service.Ĭreate a name for your specific connection. Instructions on how to connect to a PostgreSQL server with Postico are also available from the official Postico website. Enter the connection settings listed below. From here, you can enter parameter values to connect with Adobe Experience Platform. The dialog for connection settings appears. To connect Postico to Query Service, open Postico and select New Favorite. More information about Postico can be found in the official Postico documentation.Īdditionally, Postico is only available on macOS devices. Is there something in psycopg2, postico, or postgres itself that might be causing this? and how do we get around it? We don't see any clear cache on postico, or on psycopg2/postgres.This guide assumes you already have access to Postico and are familiar with how to navigate its interface. I suspect caching/memoization but the I'm not really sure that my command really worked. When I have an open connection to the db on ipython on computer A, and I run the delete command, and I open another connector to the db on ipython on computer B and run the count command, I see that the db row count has not changed i.e. However, we get different results when running the command in ipython. When running the delete command manually in psql or in postico, we get the correct results when running the COUNT command in psql or postico respectively. However, when we run the following command (hereafter referred to as the "count" command) on postico (Postgres GUI for Mac): SELECT count(*) from my_table The code executes successfully and without error. 'į'Check logs for traceback (console output by default).') Logging.warning(f'Was not successfully able to truncate logs after retries. # If not able to perform operation after max attempts, log message to indicate failure # Rollback the cursor and get ready to try again ![]() Logging.exception('Got exception when executing query') # Set successful to True if no errors were encountered in the previous line While not successful and attempts < MAX_ATTEMPTS: # While not successful and max attempts not reached Query = 'DELETE FROM my_table WHERE id NOT IN ( SELECT id FROM ( SELECT id FROM my_table ORDER BY id DESC LIMIT 1850 ) foo) ' We're going to refer to this as the "delete" command ![]() # Initiate psycopg2 and instantiate a cursor object it will behave the same as print)ĭatabase_url = os.environ.get('DATABASE_URL')Īssert database_url is not None, 'DATABASE_URL env variable must be set to a postgres connection string.' # By default, this will log te stdout (i.e. # Set basic logging config to debug (i.e. I'm trying to run the following piece of python3 code: import os
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |