Slaesforce FAQ

how to run a query on a data extension salesforce

by Pauline Walsh Published 3 years ago Updated 2 years ago
image

Part of a video titled How to create a SQL Query Activity in Salesforce Marketing ...
1:08
5:40
So to create a new query activity we can jump into automation studio into the activities tab andMoreSo to create a new query activity we can jump into automation studio into the activities tab and then click the create activity button and from here we can choose the sql activity. And then go.

How do I create a query activity in Automation Studio?

First create a data extension to store the data you need from these views, then navigate to Automation Studio to create a query activity based on the desired data view table. After you complete and run the automation, the output is stored in your created data extension.

What can I do with SQL queries?

Here is a query example that pulls data from the complaint data view for the last 6 months and provides SubscriberKey, JobIDs, and Bounce Reasons. Beyond data views, SQL queries can also be customized to solve for a variety of business needs.

Why do my queries take so long?

The larger the dataset, the greater time and effort the system has to use to obtain the data. Queries time-out after 30 minutes, and the more data to process, the more likely the query can time out. To help with this, it is more effective to provide the exact fields you are looking for in the query.

How do I query a shared data extension?

You can query data extensions in the Shared Data Extension folder from the parent account by adding the prefix ent. to the data extension name in the query. Sometimes you want everything. Use SELECT * very carefully as this can cause slowness in the system as it is processing a large amount of data.

image

How do I query activity in Salesforce?

Follow these steps to configure a Salesforce Query activity:Step 1: Enter a Name and Select Objects. Provide a name for the activity and select the object(s) to be queried.Step 2: Select Fields and Create Conditions. ... Step 3: Review the Data Schemas.

What is SQL in Sfmc?

SQL (Structured Query Language) is one of the best ways to work with relational databases. And Marketing Cloud's Data Extensions, with the help of Data Designer, offers precisely that. A relational database. Same for system Data Views containing tracking data.

Is not a known data extension or system data view you can only query existing data extensions or system data views?

This error happens if querying on Data Extensions is not enabled in your Marketing Cloud instance. This can be solved in 2 ways: - Log a case with Salesforce support and ask them to enable querying Data Views in your instance. Once they confirm it's enabled, you'll be able to run the query in DESelect without problems.

How do I find data extensions in Salesforce?

View data extension records in Email Studio.Click Subscribers.Click Data Extension.Select the data extension name.Click Records. From here you can review records, export records, import records, and clear data.

How do I run a SQL query in Marketing Cloud?

1:085:40How to create a SQL Query Activity in Salesforce Marketing CloudYouTubeStart of suggested clipEnd of suggested clipSo to create a new query activity we can jump into automation studio into the activities tab andMoreSo to create a new query activity we can jump into automation studio into the activities tab and then click the create activity button and from here we can choose the sql activity. And then go.

What is AMPscript Salesforce?

AMPscript is Marketing Cloud's proprietary scripting language for advanced dynamic content in emails, landing pages, SMS, and push messages. While AMPscript uses basic programming concepts, you don't have to be a coder to understand AMPscript functions and to use it in your emails.

How do you query data view in Marketing Cloud?

Query data views using Automation Studio for up to six months of Marketing Cloud subscriber and journey information. When you create an SQL Query activity, you write the SQL statement that defines the query. You can write the query against a data extension or the data views provided in the system.

How do I check my subscriber in Sfmc?

The subscriber status in Marketing Cloud is indicated by the shirt colour of the icon to the left of the subscriber's email address. The available statuses in Marketing Cloud are: Active, Unsubscribed, Bounced and Held.

What is a data view in Sfmc?

Data views are system-generated tables (or “data extensions, DEs”) in Salesforce Marketing Cloud (SFMC). They contain different information about the subscribers and events such as email/SMS sends, email opens, or links clicked. You can also view behavioral information such as emails that are forwarded to friends.

What is Salesforce data extension?

A data extension is a table that contains your data. With Marketing Cloud Connect, push tracking data from the Marketing Cloud back to your Sales or Service Cloud orgs using Salesforce data extensions (SFDEs).

What are the types of data extensions?

There are three types of data extensions in Marketing Cloud.Standard data extensions are used for building a custom set of fields.Filtered data extensions are used to create a subset/segment from an existing data extension.Random data extensions allow you to randomly select subscribers from a source data extension.

How do I find data extensions in Marketing Cloud?

The first place you'll want to go to find Salesforce Marketing Cloud Data Extensions and create data extensions is in the Email Studio.Step 1: Hover over Email Studio on the top left menu in Marketing Cloud and click Email.Step 2: Next, hover over Subscribers and click Data Extensions.More items...•

How to create a SQL query?

See SQL in Action 1 Click New Automation. 2 Select a starting source from Schedule or File Drop. 3 Drag SQL Query to workflow and click Choose. (You can select an existing query or create a new query.) 4 Select Create New Query Activity. 5 Add query properties: name, external key, folder location, and description. 6 Next, build your SQL query.

How long does a query take to time out?

Queries time-out after 30 minutes, and the more data to process, the more likely the query can time out. To help with this, it is more effective to provide the exact fields you are looking for in the query. SQL is something you can spend years mastering, but for now, you have the basics.

SQL Query Activity

The SQL Query activity requires more attention than the others, simply because it’s so customizable and open-ended. This activity lets you write your own SQL queries and place them in an activity to run immediately or on a schedule.

Put SQL to Work

Let’s take a look at how you can implement your SQL Query activity. Navigate to Automation Studio in Marketing Cloud and create a new automation, then follow these steps.

Validate Your SQL

Writing SQL queries takes some practice, so Automation Studio includes a Validate Syntax button that makes sure your language is structured correctly and that all referenced data sources are available. Always use that button! While this tool helps you avoid some obvious errors, it’s still important that you make sure all attributes match exactly.

image
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9