Zurich
Account created on 13 December 2010, almost 14 years ago
#

Recent comments

πŸ‡¨πŸ‡­Switzerland janes_p Zurich

Thanks, @uignov - no more error with indexing based on the dev version (and filter left on default, e.g. empty) 😊.

The indexing process reports 1030 indexed entries for my provider table. I have yet to figure out how to retrieve and validate the indexed entries. I will keep you posted.

πŸ‡¨πŸ‡­Switzerland janes_p Zurich

Thanks, @guignonv - this is indeed not obvious and almost impossible to figure out without assistance. That's why documentation and/or generating reasonable defaults for simple cases is so important for a wider usage of this otherwise very useful module!

It appears there is sill a quirk in the code - after having configured the filter fields as per your hint (and cleared numerous caches) I am still getting the same error message when I am calling Search API for indexing:

Query failed: SQLSTATE[42703]: Undefined column: 7 ERROR: column "id" does not exist LINE 1: ...e FROM "plan_e"."provider" p WHERE TRUE ORDER BY id ASC LIM... ^: SELECT p.provider_id, p.provider_name FROM "plan_e"."provider" p WHERE TRUE ORDER BY id ASC LIMIT 100; Array ( )

πŸ‡¨πŸ‡­Switzerland janes_p Zurich

In the meantime I am on D 9.5.2 with my test site. I am also testing functions related to the External Entities module with PostgreSQL access, so some database related modules are now activated (no more plain Drupal site).

With that said, there is no more WSOD when enabling VDC and I can also configure a VDC view without WSOD. I would assume that there are some dependencies to PostgreSQL modules which are not explicitely stated in the dependency tree.

However I am getting an error message while running the underlying PostgreSQL query:

SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "provider" does not exist LINE 3: "provider" "provider" ^: SELECT "provider"."provider_id" AS "provider_id", "provider"."provider_identifier" AS "provider_provider_identifier", "provider"."provider_name" AS "provider_provider_name", "provider"."provider_name_suffix" AS "provider_provider_name_suffix" FROM "provider" "provider" LIMIT 11 OFFSET 0; Array ( )

The structure of the referenced PostgreSQL table is listed below:

        Column        |          Type          | Collation | Nullable |                    Default                    
----------------------+------------------------+-----------+----------+-----------------------------------------------
 provider_id          | integer                |           | not null | nextval('provider_provider_id_seq'::regclass)
 provider_name        | character varying(100) |           | not null | 
 provider_identifier  | bigint                 |           | not null | 
 provider_type        | integer                |           |          | 
 provider_description | text                   |           |          | 
 provider_name_suffix | character varying(100) |           |          | 
 provider_postalcode  | integer                |           |          | 
 provider_city        | character varying(100) |           |          | 
 provider_active      | boolean                |           | not null | 
Indexes:
    "provider_pk" PRIMARY KEY, btree (provider_id)

The configuration of the additional PostgreSQL database in settings.php is listed below:

$databases['plan_e']['default'] = array (
  'database' => 'plan_e',
  'username' => 'plan_e_ro',
  'password' => '*****',
  'prefix' => '',
  'host' => '*****',
  'port' => '5432',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\pgsql',
  'driver' => 'pgsql',
);

Please note that the table is in the schema plan_e (not public).

πŸ‡¨πŸ‡­Switzerland janes_p Zurich

Now struggling with my own example (as simple as possible):

Calling a PostgREST service on a PostgreSQL database - curl http://152.67.66.248:3000/test1 returns this:

[{"test1_id":1,"test1_name":"John"}, 
 {"test1_id":2,"test1_name":"Kate"}, 
 {"test1_id":3,"test1_name":"Bill"}]

You can check for yourself - the service is up and running most of the time.

External entity test_1:

REST storage with endpoint http://152.67.66.248:3000/test1

List parameters, single parameters - format | json

Simple mappings:

ID - test1_id
Title - test1_name

/test_1/1 returns Page not found

Any hint what's missing would be much appreciated!

πŸ‡¨πŸ‡­Switzerland janes_p Zurich

I have installed the Search API module created an index on the external entity rijksmuseum.

It looks like the Search API indexing process doesn't index anything, as per the view based on it (no results shown).

Looking at the RijksData API documentation, it appears the index should look for artObjects (plural, result of request below) instead of artObject, as per field mappings.

Request to retrieve whole collection - curl https://www.rijksmuseum.nl/api/en/collection?key=fpGQTuED&format=json

Where do I need to specify the artObjects target for the indexing process?

πŸ‡¨πŸ‡­Switzerland janes_p Zurich

Showing lists and individual rows/endities is working fine now (same provider table as above):

Read - SELECT provider_id AS "id", * FROM {1:provider} WHERE provider_id = :id
List - SELECT provider_id, provider_name FROM {1:provider} WHERE TRUE :filters
Count - SELECT COUNT(*) FROM {1:provider}

Mappings:

ID - provider_id
Title - provider_name
Description - provider_description
Provider Identifier - provider_identifier

I am now trying to use the external entity in a view (to use formatting options). As per Β«known limitationsΒ» of the External Entities module, the Search API module with an index is required. Creating the index raises an error message:

Query failed: SQLSTATE[42703]: Undefined column: 7 ERROR: column "id" does not exist LINE 1: ...ame FROM "plan_e"."provider" WHERE TRUE ORDER BY id ASC LIM... ^: SELECT provider_id, provider_name FROM "plan_e"."provider" WHERE TRUE ORDER BY id ASC LIMIT 100; Array ( )

Looks like a mixup of placeholders and real column names.

πŸ‡¨πŸ‡­Switzerland janes_p Zurich

#38 +1
Are there any activities / plans for this issue?

Production build 0.71.5 2024