Oracle UCM won't show original pdf file name - oracle

I've been working with Oracle UCM.
All I have to do is to scan some documents, copy those pdf files in the Oracle Content Server, and then I should have access to the site and be able to search those files with their respectives names.
So far so good, but here's where things comes ugly.
Once I'm done searching one file, the UCM site doesn't show me the real name, the one that I gave to the scanned pdf. The site shows the name "sitios" ( "sites" in spanish, I'm in a latin country) instead of the name I gave it in the first place.

Usually files will be stored in two places in file system .
One will be vault location . File will be stored as it is .
Usually file name will be
dID.extension
.
Second will be in weblayout location . File will be stored as web view able version .
Usually file will be stored as
dDocName.extension
If you want to know the original file name in UCM search result , then try to get the
dOriginalName
metadata

Related

File And File Grouping SQL server

I have a filegroup Named (Year2020) which contains There different .ndf files, for example Summer.ndf Winter.ndf, Fall.ndf.
Now I want to create a Fall table and I want my table to be saved in Fall.ndf file not on Summer.ndf not on Winter.ndf Is there a way to do things like this? I am using SQL Server.
The problem is all are in the same filegroup Named year2020....how can we save it exactly where we want ??
When I save the fall table it goes into summer.ndf not on Fall.ndf

Check if the input file names with the file names in the config table

I have a folder which contains many files and I got a configuration table in sql database which contains the list of file names which I need to load to Azure Blob Storage.
I tried getting the file names from the source folder using 'Get Metadata' activity and then used Filter activity to filter the file name but this way I have to hard code the filename inside the filter.
Can someone please let me know a way to do this?
here is an example:
I have below files in a folder.
And the below in sql Config table
This is how the sample pipeline looks like.
1. Lookup list of files from sql config table and using foreach actvity append to an array variable. In my example it is in config_files.
2. Using GetMetadata, list the childItems in the folder, and append the file names into another variable. In my example it is files
3. Use SetVariable activity to store the result i.e. the files that match from the entries in config table.
Expression: #intersection(variables('files'),variables('config_files'))

postgresql update a bytea field with image from desktop

I'm trying to write an update sql statement in postgresql (pg commander) that will update a user profile image column
I've tried this:
update mytable set avatarImg = pg_read_file('/Users/myUser/profile.png')::bytea where userid=5;
got ERROR: absolute path not allowed
Read the file in the client.
Escape the contents as bytea.
Insert into database as normal.
(Elaborating on Richard's correct but terse answer; his should be marked as correct):
pg_read_file is really only intended as an administrative tool, and per the manual:
The functions shown in Table 9-72 provide native access to files on the machine hosting the server. Only files within the database cluster directory and the log_directory can be accessed.
Even if that restriction didn't apply, using pg_read_file would be incorrect; you'd have to use pg_read_binary_file. You can't just read text and cast to bytea like that.
The path restrictions mean that you must read the file using the client application as Richard says. Read the file from the client, set it as a bytea placement parameter in your SQL, and send the query.
Alternately, you could use lo_import to read the server-side file in as a binary large object, then read that as bytea and delete the binary large object.
pg_read_file can read the files only from the data directory path, if you would like to know your data directory path use:
SHOW data_directory;
For example it will show,
/var/lib/postgresql/data
Copy you file to the directory mentioned.
After the you can use only file name in your query.
UPDATE student_card SET student_image = pg_read_file('up.jpg')::bytea;
or can use pg_read_binary_file function.
UPDATE student_card SET student_image = pg_read_binary_file('up.jpg')::bytea;

Implementing Hive UDF

I have a hive table with ip_address column. How can I find country, city and Zip code from that ip_address column?
I see a udf written:
https://github.com/edwardcapriolo/hive-geoip
How do I utilize udf in hive? Can I create function name myself?
The udf says we need separate database:
http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
How do I implement that database on Hive?
Any feedback will be appreciated.
Thanks,
Rio
You utilize UDFs in Hive by adding the jars and creating temporary functions as described by your first link.
add file GeoIP.dat;
add jar geo-ip-java.jar;
add jar hive-udf-geo-ip-jtg.jar;
create temporary function geoip as 'com.jointhegrid.hive.udf.GenericUDFGeoIP';
You may change the function name to whatever you would prefer, simply replace the word after "temporary function" from "geoip" to whatever you want.
Adding the database you linked to is a matter of downloading it to your unix server and then unzipping it using gzip. Once it is in the GeoIP.dat format, move it and the jars you've downloaded into the your /users/(your username)/ directory and then run the code as instructed above. The files must be in your top directory or else explicitly targeted during your add file and add jar statements. by that I mean instead of add file GeoIP.dat; it must be add file /users/wertz/downloads/GeoIP.dat; for example.
Finally, by looking at the code the UDF needs three arguments. The first argument is the IP address, the second argument is what you're looking for (choices appear to be COUNTRY_NAME, COUNTRY_CODE, AREA_CODE, CITY, DMA_CODE, LATITUDE, LONGITUDE, METRO_CODE, POSTAL_CODE, REGION, ORG, or ID) and the final value is the filename of the GeoIP database, which hopefully you have not changed from GeoIP.dat

Display the content of a PDF File in a Text Field

I am newbie in Oracle Forms. I have stored a PDF file in an Oracle database; now I want to read that PDF file and display the content in text field in Oracle Forms.
How should I go about doing this?
Oracle Forms cannot natively display a PDF. If you are storing the actual contents of the PDF in the database, you can look into developing a PJC that leverages an existing Open Source PDF presentation layer, and embed it in the Oracle Form. You would then need to stream the contents of the database into the PJC, which would be tricky (but not impossible).
Your better bet would be to build a small PL/SQL package that can be accessed from a DAD to serve up the document, and fire off a web.show_document call to the URL from Oracle Forms.
There is no built-in to do this.
But if you dont have to use the content of the PDF anywhere
i.e you just want to see the contents of the PDF then you may try this : ( **webutil utility required)
vboolean := webutil_file_transfer.DB_To_Client_With_Progress
( 'D:\files\abc.pdf' , --location of the file with extension
'table_nm', --table name
'field_nm', --field which contains ur PDF
'sr_no=1' , --fetch the PDF of row where sr_no =1
'Downloading from Database',
'Wait to Complete');
client_host('cmd /c start '||vfilename1); --open the file
If you want to make it generic, you can store the extention, append it to the file_nm i.e
1st parameter of DB_To_Client_With_Progress(), then you will be able to open any type of document stored in the database!

Resources