Can I add a SOQL query inside expression to fetch data from salesforce using informatica cloud - informatica-cloud

I have csv file as a source and salesforce as target in informatica cloud. To populate one of the fields on salesforce side, I want to write an IFF expression. If a=true, populate the field with 'xyz' but if a!=true, then run a SQOL query in salesforce, fetch the value and use that value to populate the field.
Is it possible to use a SOQL query inside the expression in informatica when salesforce is on the target side?
Thanks

A supported solution would be to use a Taskflow and first fetch the values from SFDC that you would query against in mapping prior to the insert mapping and in the insert mapping use a lookup in your mapping to do the transformation.

Related

Providing default value for unmapped column in SQL Compare

Is it possible to provide a default value or a query to provide a value to an unmapped column in the target table using Redgate SQL Data Compare?
To explain the scenario I have a configuration database that holds settings data for several database instances. The data is all in the same shape, but the config database has an additional InstanceID field in most tables. This allows me to filter my compare to only compare against the InstanceID relating to the source Instance database. However if I generate Insert scripts they fail because the Target Instance ID fields are non nullable. I want to provide a default value that is then used in the Insert Scripts. Is this doable?
SQL Data Compare doesn't have an easy way of doing this I'm afraid.
There is one way to do it - you could create a view that selects everything from the source table along with a computed column, which just provides the "default value" that you want to insert. Then you can map the view to the table in the target database and compare them, deploying from the result.
I hope this helps.

Biztalk Insert or Update in to database using the SQL bindings

I have a requirement where the data from one database has to be selected and inserted or updated in to the other database depending on the destination. I have used the DBBinding to select from the source.In the destination do I have to use stored procedure to do this or selecting Insert and Update in the DBBinding will work for this.
You can use Insert or Update unless you have some complex requirement to do in stored procedure.
You should probably use a stored procedure for this and perform an upsert within it. You could use a Composite Operation to send all the data across to SQL in one transaction or investigate using a Table Value Parameter so you can send multiple rows to the stored proc (depending on the number of rows!).
To do this you would need to create a MAP between your source data and the Composite Schema.
This way you are only concerened with the schema of the stored procedure and the Composite Schema.
See:
https://msdn.microsoft.com/en-us/library/dd788136.aspx
HTH

Riak search queries via the java client

I am trying to perform queries using the OR operator as following:
MapReduceResult result = riakClient.
mapReduce("some_bucket", "Name:c1 OR c2").
addMapPhase(new NamedJSFunction("Riak.mapValuesJson"), true).
execute();
I only get the 1st object in the query (where name='c1').
If I change the order of the query (i.e. Name:c2 OR c1) again I get only the first object in query (where name='c2').
is the OR operator (and other query operators) supported in the java client?
I got this answer from Basho engeneer, Sean C.:
You either need to group the terms or qualify both of them. Without a field identifier, the search query assumes that the default field is being searched. You can determine how the query will be interpreted by using the 'search-cmd explain' command. Here's two alternate ways to express your query:
Name:c1 OR Name:c2
Name:(c1 OR c2)
both options worked for me!

Creating multiple schemas for a user - Oracle 11g

Can we create multiple schemas for a particular user? I am currently logged in as X/Y user and when I tried creating a schema using create schema authorization sample_schema, I got the error the schema name is missing or is incorrect in an authorization clause of a create schema statement. I do know that a default schema X would have been created.
CREATE SCHEMA in Oracle does - contrary to its name - not create a new schema.
It is merely a shorthand to create several tables in a single statement.
Quote from the manual:
Use the CREATE SCHEMA statement to create multiple tables and views and perform multiple grants in your own schema in a single transaction
and further down the explanation on what the "schema" name parameter is:
The schema name must be the same as your Oracle Database username.
Well you could create a user named sample_schema (From the above example) and give user X/Y permission to use sample_schema tablespace.

MS Access, Pass through query with complex criteria. Criteria include Select statments and vba functions

I currently have multiple queries that query data from a few tables linked through ODBC, and some temporary tables that are edited through the user interface. I have complex criteria in my queries such as:
SELECT * from ThingsData
WHERE (Thing In(SELECT Thing from ListOfThings) AND getThingFlag() = True);
In this case Thing is a field and ListOfThings is a temporary table that the user defines from the user interface. Basically, the user puts together a list of the field Thing that he/she wants to filter the data based on and I want to query only the data that matches the Thing values that the user adds to his/her list. Currently, the data I am querying is in the linked ODBC table, and the temp table ListOfThings is just a regular, local table and everything works peachy. I want to get rid of the linked table and use a pass through query instead. However, when i do that, unless the criteria is incredibly simplistic, i get an error:
"ODBC--Call Failed. Invalid object name ListOfThings."
If I dont have any criteria it works fine.
Long story short: In a pass through query, how do I apply criterias that include SELECTs and functions from my modules and just basically filter the pass through table based on data from my local tables?
What is at the other end of that ODBC link? In a pass-through query you will have to honor the syntax required by the database server, not Access syntax. I would first suspect that you can't have mixed case table names and I would try listofthings as the name.
If you have a tool that can be used to test queries directly against the database server, get the query working there and then simply cut and paste it into an Access pass-through query.

Resources