Thanks for the demo. Is it possible the code which was showed in the video? Actually, that would help me to learn practically
@awssupportАй бұрын
You can check out the detailed steps and the code here: go.aws/4fnngCi. If you have any follow up tech related questions, please feel welcome to ask them on our re:Post platform: go.aws/aws-repost. ^NR
@SanjeevSharma-jk1br2 ай бұрын
Hey Guys! Thanks for the PDF examples of Bedrock Knowledgebase but its really hard to find examples of Structured Data like CSV or JSON with Array Data Types like Movie Metadata with Genres, Production Companies etc. Can you guys provide an example? AWS Docs are pretty poor on that using Postgres!
@awssupport2 ай бұрын
Hello, here's an example of a table schema for a `movies` table that includes arrays for genres and production companies: ```sql CREATE TABLE movies ( id SERIAL PRIMARY KEY, title TEXT NOT NULL, release_year INTEGER, genres TEXT[] NOT NULL, production_companies TEXT[] ); ``` In this schema, the `genres` column is defined as a `TEXT[]` data type, which represents an array of text values. Similarly, the `production_companies` column is also an array of text values. To insert data into this table, you can use the array literal syntax: ```sql INSERT INTO movies (title, release_year, genres, production_companies) VALUES ( 'The Shawshank Redemption', 1994, ARRAY['Drama', 'Crime'], ARRAY['Castle Rock Entertainment', 'Columbia Pictures'] ); INSERT INTO movies (title, release_year, genres, production_companies) VALUES ( 'The Godfather', 1972, ARRAY['Crime', 'Drama'], ARRAY['Paramount Pictures', 'Alfran Productions'] ); ``` In this example, we're inserting two movies: "The Shawshank Redemption" and "The Godfather". For each movie, we specify the genres and production companies as arrays of text values. To query the data, you can use array operators and functions provided by PostgreSQL: ```sql -- Get movies with the 'Drama' genre SELECT title, genres FROM movies WHERE 'Drama' = ANY(genres); -- Get movies with multiple production companies SELECT title, production_companies FROM movies WHERE array_length(production_companies, 1) > 1; ``` In the first query, we're using the `ANY` operator to find movies where the 'Drama' genre exists in the `genres` array. In the second query, we're using the `array_length` function to find movies where the `production_companies` array has more than one element. PostgreSQL provides many more array functions and operators that you can use to manipulate and query array data types effectively. This is just a simple example, but it should give you an idea of how to store and work with array data types like movie metadata in a PostgreSQL database. The AWS documentation may not cover this specific use case in detail. For additional guidance, please reach out to collective of engineers via: go.aws/aws-repost. ^AR
@arditemАй бұрын
👏
@luiscarlosjaykАй бұрын
Hi team, thanks for sharing this information. I was trying to follow examples to inges files in AuroraPostgres and I was able to sync the Knowledge Base with CSV files, but, when I try to sync with PDF files I get an error that I guess is related to how the KB is trying to insert into the database, I followed tutorials out there from AWS: The vector database encountered an error while processing the request: Named parameter syntax is invalid, input: x-amz-bedrock-kb-document-page-number
@awssupportАй бұрын
Sorry to hear you've run into this error. I was able to find this re:Post submission with additional guidance: go.aws/40cowUg. If you are still experiencing the error, reach out using the resources available here: go.aws/tech-support. ^RS
@luiscarlosjaykАй бұрын
@@awssupport thanks for replying. I've followed those guidelines but it still fails. Will try to see if I can get some support.