Este conteúdo não está disponível no idioma selecionado.

9.11. Import Data from REST Services


Procedure 9.2. Import Data from REST Services

  1. Go into the Model Explorer.
  2. Choose the File - Import action from the toolbar.

    Note

    Alternatively, you can select a project, folder or model from the tree and choose Import...
  3. Select the import option Teiid Designer - File Source (XML) - Source and View Model and click Next.
  4. Select XML file via remote URL and click Next.
  5. Select an existing or previous connection profile from the drop-down selector.
    Alternatively, press the New... button to launch the New Connection Profile dialog or Edit... to modify or change an existing connection profile prior to selection.
  6. If you are creating a new connection profile, choose the REST Web Services URL option when prompted and then click the OK button.
  7. Name your new REST Connection Profile and click Next.
  8. Set your REST URL in the Connection URL text field and your Security Type and credentials, if applicable. Click Next to see a summary of your properties or click Finish to end.
    There is also an option to add Request Header parameters. The importer assumes an Accept header value of application/xml and a Content-Type header value of application/xml. These defaults can be overriden in the Optional Request Header Properties section. You can also add any other header properties required for the service. Click the Test Connection button to validate your connection properties.
  9. After selecting or creating a new Connection Profile, the REST XML result from the connection profile will be displayed in the Available Data Files panel. Check the data file you wish to process.
    The data from this web service, along with your custom import options, will be used to construct a view table with the required SQL transformation for querying your data and returning a result set.
  10. Enter a unique source model name in the Source Model Definition section at the bottom of the page.
    Alternatively, you can select an existing source model using the Browse button.

    Note

    The Model Status section which will indicate the validity of the model name, whether the model exists or not and whether the model already contains the getTextFiles() procedure. In this case, the source model nor the table will be generated.
  11. Click Next.
  12. The primary purpose of this importer is to help you create a view procedure containing the transformations required to query the user-defined data file. The panel contains an XML tree view of your result contents and actions/buttons you can use to create column entries displayed in the middle, Column Information panel.
    The root path is used for xpath parsing of the result document. The importer sets a root path for you. You can change the root path, if needed, by selecting an XML element and right-click select Set as root path action.
    Next, select columns in the tree that you wish to include on your query and select Add button. You can also modify or create custom columns, by using the ADD, DELETE, UP, DOWN to manage the column info in your SQL.
  13. Click Next.
  14. On the View Model Definition page, select the target directory location. This is where your new view model will be created. (You can also select an existing model for your new view tables.)

    Note

    The Model Status section which will indicate the validity of the model name, whether the model exists or not.
  15. Enter a unique, valid view table name.
  16. Click Finish to generate your models and finish the wizard.
Voltar ao topo
Red Hat logoGithubredditYoutubeTwitter

Aprender

Experimente, compre e venda

Comunidades

Sobre a documentação da Red Hat

Ajudamos os usuários da Red Hat a inovar e atingir seus objetivos com nossos produtos e serviços com conteúdo em que podem confiar. Explore nossas atualizações recentes.

Tornando o open source mais inclusivo

A Red Hat está comprometida em substituir a linguagem problemática em nosso código, documentação e propriedades da web. Para mais detalhes veja o Blog da Red Hat.

Sobre a Red Hat

Fornecemos soluções robustas que facilitam o trabalho das empresas em plataformas e ambientes, desde o data center principal até a borda da rede.

Theme

© 2025 Red Hat