At a glance: Set up your cloud service to receive data from Data Locker: GCS, AWS, BigQuery, or Snowflake.
Data Locker enables you to stream data to your selected and owned storage solution, whether it is a bucket or data warehouse. Set up your cloud service using one of the following procedures.
Bucket cloud storage
GCS storage
- The procedure in this section needs to be performed by your Google Cloud admin.
- You can delete files from Data Locker 25 or more hours after they were written. Don't delete them before.
Information for the GCS admin
Data Locker is the AppsFlyer solution for streaming data to storage.
Requirements
- Create a bucket on GCS for the exclusive use of Data Locker. Exclusive means no other service writes data to the bucket.
- Suggested bucket name:
af-datalocker
. - Grant Data Locker permissions using the procedure that follows.
To grant Data Locker permissions:
In this procedure, substitute data-locker-example
using the name of the bucket you previously created for Data Locker.
- Sign in to your GCS console.
- Go to Storage > Storage browser.
- Select the bucket you previously created, for example,
data-locker-example
. - Go to the Permissions tab.
- Click +Add.
The Add members window opens. - Complete as follows:
- Click Save.
AWS storage
- The procedure in this section needs to be performed by your AWS admin.
- You can delete files from Data Locker 25 or more hours after they were written. Please don't delete them before.
Information for the AWS Admin
Data Locker is the AppsFlyer solution for streaming data to storage.
Requirements
- Create an AWS bucket having the name af-datalocker-mybucket. The prefix af-datalocker- is mandatory. The suffix is free text.
- We suggest af-datalocker-yyyy-mm-dd-hh-mm-free-text. Where yyyy-mm-dd-hh-mm is the current date and time, and you add any other text you want as depicted in the figure that follows.
User interface in AWS console
After creating the bucket, grant AppsFlyer permissions using the procedure that follows.
To create a bucket and grant AppsFlyer permissions:
- Sign in to the AWS console.
- Go to the S3 service.
-
To create the bucket:
- Click Create bucket.
- Complete the Bucket name as follows: Start with
af-datalocker-
and then add any other text as described previously. - Specify one of the supported AWS regions.
- Click Create bucket.
-
To grant AppsFlyer permissions:
- Select the bucket.
- Go to the Permissions tab.
- In the Bucket policy section, click Edit.
The Bucket policy window opens. - Paste the following snippet into the window.
{ "Version": "2012-10-17", "Statement": [ { "Sid": "AF_DataLocker_Direct", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::195229424603:user/product=datalocker__envtype=prod__ns=default" }, "Action": [ "s3:GetObject", "s3:ListBucket", "s3:DeleteObject", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::af-datalocker-my-bucket", "arn:aws:s3:::af-datalocker-my-bucket/*" ] } ] }
-
In the snippet, replace
af-data-locker-my-bucket
with the bucket name you created. - [Optional] Add support for KMS encrypted buckets. To do so, in the Key Policy section, choose Switch to policy view and paste the following snippet in the Statement array.
{ "Sid": "Allow use of the key", "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::195229424603:user/product=datalocker__envtype=prod__ns=default" }, "Action": "kms:GenerateDataKey*", "Resource": "*" }
- Click Save changes.
- Complete the Setup Data Locker procedure.
Supported AWS regions
Data Locker supports the following AWS regions:
- Asia Pacific (Tokyo):
ap-northeast-1
- Asia Pacific (Seoul):
ap-northeast-2
- Asia Pacific (Mumbai):
ap-south-1
- Asia Pacific (Singapore):
ap-southeast-1
- Asia Pacific (Sydney):
ap-southeast-2
- Canada (Central):
ca-central-1
- EU (Frankfurt):
eu-central-1
- EU (Ireland):
eu-west-1
- EU (London):
eu-west-2
- South America (Sao Paulo):
sa-east-1
- US East (N. Virginia):
us-east-1
- US East (Ohio):
us-east-2
- US West (N. California):
us-west-1
- US West (Oregon):
us-west-2
[Beta] Azure storage
- The procedure in this section needs to be performed by your Azure Cloud admin.
- You can delete files from Data Locker 25 or more hours after they were written. Don't delete them before.
Information for the Azure admin
Data Locker is the AppsFlyer solution for streaming data to your storage account.
To define a storage account for Data Locker:
- In your Azure portal, go to Azure storage accounts. and click Create to make a new storage account to get your Appsflyer Data.
-
In the Basic tab -> Project details select from the dropdowns:
- A Subscription.
- A Resource Group.
Optional: If no resource group exists, click Create new to create a resource group.
- Under Instance details:
- Enter a Storage account name.
- Select a Region from the dropdown.
- Click Next: Advanced >
- Under the Security tab select Enable Hierarchical namespace.
- Click Review -> Create.
- After deployment has finished, go back to your Azure storage accounts, and select the newly created storage account.
- Go to Access keys and copy your Storage account name and one of your keys.
- Go to Storage browser -> Blob containers and click Add container.
- Enter a Name for the new container.
- Click Create.
- Contact your CSM to enable Azure in Data Locker.
- Once enabled, In AppsFlyer, go to Data Locker -> New connection.
-
In the new connection:
- Name your connection.
- Choose Azure Blob.
- Enter your Azure Container name in the Bucket Name field (the one you made in step 9).
- Enter your copied Storage account name from step 8.
- Enter your copied Key from step 8.
- Click Test connection.
- Save.
[Beta] Yandex Cloud storage
- The procedure in this section needs to be performed by your Yandex Cloud admin.
- You can delete files from Data Locker 25 or more hours after they were written. Don't delete them before.
Information for the Yandex admin
Data Locker is the AppsFlyer solution for streaming data to storage.
To create a bucket and grant Data Locker permissions:
- In your Yandex Cloud console, go to the Service Accounts tab and click Create service account.
- Name the service account, for example,
af-datalocker
. - Create a static access key for the service account. In the service account:
- Click Create a new key.
- Select Create static access key.
- Save the Key ID and Secret Key.
- Give your new service account storage.editor permission.
- In your bucket settings, go to Access Bindings and click Assign bindings.
- For your new service account, add the storage.editor role and click Save.
- Contact your AppsFlyer CSM to enable Yandex in Data Locker.
- Once enabled, use the key ID and secret key during Data Locker setup.
Data warehouse cloud storage
BigQuery
The procedure in this section needs to be performed by your BigQuery admin.
Information for the BigQuery Admin
Data Locker is the AppsFlyer solution for streaming data to storage.
Requirements
-
Create a BigQuery dataset
To create a BigQuery dataset:
- In BigQuery, create a project or use an existing project.
- In the project, click CREATE DATASET.
- Give the dataset a suitable ID.
- Grant AppsFlyer access to the dataset. See Big Query instructions
- For Add principal, use the following AppsFlyer user: datalocker-bq-admin-prod@datalocker-bq-prod.iam.gserviceaccount.com
- For Assign roles, select BigQuery Data Editor.
- Complete the remaining settings as required.
Snowflake
Connect Data Locker to your Snowflake account. By doing so, data is sent to Snowflake and continues to be available in your selected cloud storage.
Considerations for BI developers
- The data freshness rate is the same as that of data provided in a bucket.
- The table and column structure of the data is equivalent to that found in the data available directly from a Data Locker bucket.
- As rows are added to the Snowflake share, the
_ingestion_time
column is populated. To ensure row uniqueness and to prevent ingestion of the same row more than once:- Save the
max_ingestion_time
per table ingested. - Each time you run your ingestion process, ingest only those rows where
_ingestion_time > max_ingestion_time
- Save the
Complete the procedures that follow to connect Snowflake to Data Locker.
Snowflake connector procedures
To get your Snowflake account ID and region:
- In Snowflake, log in to your Snowflake account.
- In the menu bar, select your name.
Your account ID and region display.
To connect Data Locker to Snowflake:
- In AppsFlyer, go to Reports > Data Locker.
- Select Snowflake.
- Enter the Snowflake region and Snowflake account ID using the information you previously got from Snowflake.
- Click Save.
To create a database from a share in Snowflake:
- In Snowflake, log in to your Snowflake account.
- Switch role to Accountadmin. See Create a database from a share.
- Select Shares.
- Select the AppsFlyer share. For example, APPSFLYER_ACC_XXX_DATA_LOCKER.
- Click Create Database from Secure Share, and complete the details required. Note! You must load the data from the shared database into your tables, because data in the shared database is only available for a limited period (currently 14 days).
- In your database, the tables imported display. Table names and structures are equivalent to those in Data Locker buckets.