Criar um pipeline de ingestão do ServiceNow
Visualização
O conector ServiceNow está em versão prévia pública fechada. Para participar da pré-visualização, entre em contato com a equipe do Databricks account .
Este artigo descreve como criar uma ingestão do ServiceNow pipeline usando Databricks LakeFlow Connect.
Antes de começar
Para criar um pipeline de ingestão, o senhor deve atender aos seguintes requisitos:
-
Seu workspace está habilitado para Unity Catalog.
-
O compute sem servidor está habilitado para o seu workspace. Consulte Ativar serverless compute .
-
Se você planeja criar uma conexão: Você tem privilégios
CREATE CONNECTION
na metastore.Se você planeja usar uma conexão existente: Você tem privilégios
USE CONNECTION
ouALL PRIVILEGES
no objeto de conexão. -
Você tem privilégios
USE CATALOG
no catálogo de destino. -
Você tem privilégios
USE SCHEMA
eCREATE TABLE
em um esquema existente ou privilégiosCREATE SCHEMA
no catálogo de destino.
Para ingerir a partir do ServiceNow, consulte Configurar o ServiceNow para ingestão do Databricks.
Criar o pipeline de ingestão
Permissões necessárias: USE CONNECTION
ou ALL PRIVILEGES
em uma conexão.
Esta etapa descreve como criar o pipeline de ingestão. Cada tabela ingerida é gravada em uma tabela de transmissão com o mesmo nome.
- Databricks UI
- Databricks notebook
- Databricks CLI
-
In the sidebar of the Databricks workspace, click Data Ingestion.
-
On the Add data page, under Databricks connectors, click ServiceNow.
The ingestion wizard opens.
-
On the Ingestion pipeline page of the wizard, enter a unique name for the pipeline.
-
In the Destination catalog drop-down menu, select a catalog. Ingested data and event logs will be written to this catalog. You’ll select a destination schema later.
-
Select the Unity Catalog connection that stores the credentials required to access the source data.
If there are no existing connections to the source, click Create connection and enter the authentication details you obtained in Configure ServiceNow for Databricks ingestion. You must have
CREATE CONNECTION
privileges on the metastore. -
Click Create pipeline and continue.
-
On the Source page, select the tables to ingest into Databricks, and then click Next.
If you select All tables, the connector writes all existing and future tables in the source schema to the destination schema. There is a maximum of 250 tables per pipeline.
-
On the Destination page, select the Unity Catalog catalog and schema to write to.
If you don't want to use an existing schema, click Create schema. You must have
USE CATALOG
andCREATE SCHEMA
privileges on the parent catalog. -
Click Save pipeline and continue.
-
(Optional) On the Settings page, click Create schedule. Set the frequency to refresh the destination tables.
-
(Optional) Set email notifications for pipeline operation success or failure.
-
Click Save and run pipeline.
-
Generate a personal access token and copy the token so you can paste it into a notebook later. See Databricks personal access tokens for workspace users.
-
Import the following notebook to your workspace:
Create a ServiceNow ingestion pipeline
-
Modify the following values in the notebook:
Cell 1:
api_token
: The personal access token you generated
Cell 3:
-
name
: A name for the pipeline -
connection_name
: The name of the Unity Catalog connection you created in Catalog Explorer (Catalog > External data > Connections). If you don't have an existing connection to the source, you can create one. You must have theCREATE CONNECTION
privilege on the metastore. -
source_table
: The name of the source table -
destination_catalog
: A name for the destination catalog that will contain the ingested data -
destination_schema
: A name for the destination schema that will contain the ingested data -
scd_type
: The SCD method to use:SCD_TYPE_1
orSCD_TYPE_2
.For more information, see SCD type 1 vs. type 2.
-
Click Run all.
To create the pipeline:
databricks pipelines create --json "<pipeline definition or json file path>"
To edit the pipeline:
databricks pipelines update --json "<pipeline definition or json file path>"
To get the pipeline definition:
databricks pipelines get "<pipeline-id>"
To delete the pipeline:
databricks pipelines delete "<pipeline-id>"
For more information, run:
databricks pipelines --help
databricks pipelines <create|update|get|delete|...> --help
Atualize seu programa pipeline e as notificações
-
Depois que o pipeline tiver sido criado, acesse novamente o Databricks workspace e clique em pipeline .
O novo pipeline aparece na lista pipeline.
-
Para acessar view os detalhes de pipeline, clique no nome pipeline.
-
Na página de detalhes do pipeline, o senhor pode programar o pipeline clicando em programar .
-
Para definir notificações no pipeline, clique em Settings (Configurações ) e, em seguida, adicione uma notificação.